<!--
//********************************************************
// Photo Gallery
// alizesonline.com - Gilles Gomez - April 2004
//********************************************************


ie4 = (document.all)?true:false;					//IE 4/5 compatible
ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)?true:false;		//IE 5.x
dom = (document.getElementById)?true:false;				//DOM compatible


//********************************************************
// Global Variables to be modified if necessary
//********************************************************
var photoLayerName="photo";						//Name of the layer
var photoLayerImageDir="photoGallery/";					//Name of the directory when the photos can be found


//********************************************************
// Do not modify anything below
//********************************************************

var photoLayerObject;
var photoName="";
var htmlPhotoCode="";
var N=0;
var NbMax;


//********************************************************
// Main function
//********************************************************
function photo(change){
	if(!photoLayerObject){							// One time Init
		if(dom)photoLayerObject=document.getElementById(photoLayerName);
		else if(ie4)photoLayerObject=document.all[photoLayerName];	
		NbMax=tableOfImages.length;
	}
	
	if(change=="+"){							// Increment
		N++;
		if(N>NbMax-1) N=0;
	}
	else if(change=="-"){							// Decrement
		N--;
		if(N<0) N=NbMax-1;
	}
	else if(change=="top") N=0;						// Top of images
	
	if(photoLayerObject){							// creates the html code if ok
		
		htmlPhotoCode="<img src='"+ photoLayerImageDir + tableOfImages[N] +".jpg'>\n";
		htmlPhotoCode+="<p>Photo # "+ (N+1) +"/"+ NbMax +"</p>\n";

		photoLayerObject.innerHTML=htmlPhotoCode;							// Display the photo (IE & Dom browsers)
	}
	return false;
}
//-->