//Functions used for creating gallery thumbnail pages and full size slide show
//This file MUST be loaded BEFORE the xxxgallery.js because n must be declared first
var thumbs=new Array();
var n=0;
var showNo; //Global so new window opened can see it. Value defined in slideshow function

function slideshow(picNo)	{
	showNo=picNo;
	var winHt=650;
	var winWt=820;
	//Fudge because Chrome browser doesn't open a new window to correct size!
	if(window.navigator.appVersion.indexOf("Chrome")>=0)	{
		winHt=winHt+50;
	}
	var slidewin=window.open("slideshw.html","Slides","menubar=no,toolbar=no,status=no,width="+winWt+",height="+winHt+",top=0,scrollbars=yes,resizable=yes");
	slidewin.moveTo((screen.width-winWt)/2,(screen.height-winHt)/4);
	slidewin.focus();
}

function getThumb(which)	{
	var myThumb="&nbsp;";
	if (which[1]!="&nbsp;")	{
		myThumb='<IMG class=gallerythumb SRC="'+which[0]+'/th'+which[1]+'.jpg">';
	}
	return myThumb;
}

function anchor(which)	{
	var Atag="";
	Atag="<A HREF=javascript:slideshow("+which+")>" 
	return Atag;
}


