// JavaScript Document
function changeImage(picName,imgName){
	if (document.images){
		imgOn=eval(imgName + ".src");
		urlOn=eval(imgName + ".url");
		txtOn=eval(imgName + ".txt");
		//document[picName].src= imgOn;
		document.getElementById('zoom').href= urlOn;
		//document.getElementById('caption').innerHTML = txtOn;
	}
	if(currentdiv){
		olddiv = document.getElementById(currentdiv);
		if(olddiv){
			if(olddiv.className == 'current'){
				olddiv.className = '';
			}
		}
	}
}
function showCaption(){
	document.getElementById('caption').innerHTML = "Click to expand";
}
function hideCaption(){
	document.getElementById('caption').innerHTML = "";
}
function changeClass(wdiv,bool) {
	thediv = document.getElementById("page"+wdiv);
	if(thediv.className != 'current'){
		thediv.className = 'current';
	}
	if(wdiv==lastID){
		thediv.className = 'current last';
	}
	if(!bool){
		olddiv = document.getElementById("page"+currentdiv);
		if(olddiv != thediv){
			if(olddiv.className == 'current'){
				olddiv.className = '';
			}
			if(currentdiv==lastID){
				olddiv.className = 'last';
			}
			currentdiv = wdiv;
		}
	}
	showImage(wdiv);
}
