<!--

//configure the speed of the slideshow, in miliseconds
var slideshowspeed=2000//Default to 2s
var slideShows=new Array()
var preloadedImages=new Array()
var whichSlide = new Array()
var whichimage=0
var activeImage

function setSpeed(spd)
{
	slideshowspeed = spd
}


//Cycle round the images indexed in the array by showNum
//and display in the placeHolder
function slideShow(showNum , placeHolder)
{
	if (!document.images)
	  return
	  	
	document.images[placeHolder].src = slideShows[showNum][whichSlide[showNum]].src
	
	if (whichSlide[showNum] < slideShows[showNum].length-1)
	 whichSlide[showNum]++
	else
	 whichSlide[showNum]=0
	 
  var funcName = "slideShow("+ showNum + ", '"+ placeHolder +"')"
	 
	setTimeout(funcName ,slideshowspeed)
}



//Preload images into slideimages array
function preloadSlideShowimages()
{
	//argument 0 is the slide show number
	
  var tmpSlideImages=new Array()

	for (i=1;i<preloadSlideShowimages.arguments.length;i++)
	{
	  tmpSlideImages[i-1]=new Image()
	  tmpSlideImages[i-1].src=preloadSlideShowimages.arguments[i]
	}
	
	slideShows[ preloadSlideShowimages.arguments[0] ] = tmpSlideImages
	whichSlide[ preloadSlideShowimages.arguments[0] ] = 0
				
}

//General preload images into array
function preloadimages()
{
	for (i=0;i<preloadimages.arguments.length;i++)
	{
	  preloadedImages[i]=new Image()
	  preloadedImages[i].src=preloadimages.arguments[i]
	}
}


function bookMark(url,lnkTitle)
{
	if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
	{
		window.external.AddFavorite (url,lnkTitle);
	}
	else
	{
		var msg = "Don't forget to bookmark us!";
		if(navigator.appName == "Netscape") msg += " (CTRL-D)";
			alert(msg);
	}
}

function loadIndex(openedPage)
{
if (top.location == self.location) { self.location.replace("index.htm") }

//	if (self.name != openedPage)
//	{
//		self.location.replace = 'index.htm' target=openedPage;
//	}
}

function centeredImage(piccy, imageWidth, imageHeight, piccyCaption, hyperLink)
{

var html = '';
html +='<p>';
html +='<center>';
html +='<table BORDER="2">';

if(piccyCaption != "" && piccyCaption != undefined)
	html +='<caption ALIGN="BOTTOM">'+piccyCaption+'</caption>';
html +='<tr>';
if(hyperLink == undefined || hyperLink == "")
	html += '<td>';
else
	html += '<td><a href='+ hyperLink + ' target="main_window">';

if(imageHeight == 0 && imageWidth > 0)
	html +='<img src='+piccy+' alt='+piccy+' width='+imageWidth+'></td>';
if(imageHeight > 0 && imageWidth == 0)
	html +='<img src='+piccy+' alt='+piccy+' width='+imageHeight+'></td>';
if(imageHeight > 0 && imageWidth > 0)
	html +='<img src='+piccy+' alt='+piccy+' width='+imageHeight+' height='+imageHeight+'></td>';
if((imageHeight == 0 && imageWidth == 0) || (imageHeight == "" && imageWidth == ""))
	html +='<img src='+piccy+' alt='+piccy+'></td>';
	
html +='</tr>';
html +='</table>';
html +='</center>';
html +='</p>';

document.write(html);

}


function changePic(img_name,img_src) 
{
	document[img_name].src=img_src;

	var newImageHref = document.getElementById("imageHref");
	newImageHref.href = img_src;
}

//-->
