// this loads the 'loading' message images so they'll be 
//ready when other images are loading

dummy_vert_loading = new Image();
dummy_vert_loading.src = "../../images/dummy_vert_loading.gif";

dummy_horiz_loading = new Image();
dummy_horiz_loading.src = "../../images/dummy_horiz_loading.gif";

function photo_on(photo){


	// strip number from passed filename
	captionNumber = parseInt(photo.substring(0, 2), 10) - 1;

	// strip orientation character from passed filename
	orientation = photo.charAt(2);

	// display photo in appropriate picture frame
	if(orientation == "v"){

		document.vert_large.src = "../../images/dummy_vert_loading.gif";
		document.vert_large.src = "images/" + photo;
		document.horiz_large.src = "../../images/dummy_horiz.gif";		

	} else {

		document.horiz_large.src = "../../images/dummy_horiz_loading.gif";
		document.horiz_large.src = "images/" + photo;
		document.vert_large.src = "../../images/dummy_vert.gif";	
	}

	 text = captions[captionNumber];

	if (document.getElementById)
	{
		x = document.getElementById('caption');
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all['caption'];
		x.innerHTML = text;
	}

}

// use this function if calling by onMouseOver/Out rather than onMouseClick
function photo_off(){


	document.vert_large.src = "../../images/dummy_vert.gif";
	document.horiz_large.src = "../../images/dummy_horiz.gif";			

	
	if (document.getElementById)
	{
		x = document.getElementById('caption');
		x.innerHTML = "&nbsp;";
	}
	else if (document.all)
	{
		x = document.all['caption'];
		x.innerHTML = "&nbsp;";
	}

}