/*

The variables
MsIExplorer, currentphoto and maxphotos
must be defined in the calling code

photoview is an image object
phototext is a div text tag
*/

function previousphoto()
	{ 
		if(document.images) { 
			currentphoto--; 
			if(currentphoto<1) currentphoto=maxphotos; 
			document.images['photoview'].src=photo[currentphoto].src; 

			if (MsIExplorer)
			{
				document.all['phototext'].innerText = Imagetext[currentphoto]; 
			}
			else
			{
				document.getElementById('phototext').removeChild(document.getElementById('phototext').childNodes[0]);
				var newText=document.createTextNode(Imagetext[currentphoto]);
				document.getElementById('phototext').appendChild(newText);							
			}							

		} 
	} 

function nextphoto()
	{ 
		if(document.images) { 
			currentphoto++; 
			if(currentphoto>maxphotos) currentphoto=1; 
			document.images['photoview'].src=photo[currentphoto].src; 						

			if (MsIExplorer)
			{
				document.all['phototext'].innerText = Imagetext[currentphoto]; 
			}
			else
			{
				document.getElementById('phototext').removeChild(document.getElementById('phototext').childNodes[0]);
				var newText=document.createTextNode(Imagetext[currentphoto]);
				document.getElementById('phototext').appendChild(newText);							
			}							


		}
	}



