//// CAMERA-INFO/EXIF section...
	showing = false;
	function toggleInfo() {
			if (showing == false) {
				if (document.all || document.getElementById)
					document.getElementById('imageinfo').style.visibility="visible";	// IE & Gecko
				else
					document.layers['imageinfo'].visibility="show"; // Netscape 4
				showing = true;
			}
			else {
				if (document.all || document.getElementById)
					document.getElementById('imageinfo').style.visibility="hidden";	// IE & Gecko
				else
					document.layers['imageinfo'].visibility="hide";	// Netscape 4
				showing = false;
		}
	}

	//// Slideshow section...
	var timerID = "";
	var seconds = 4;
	var exp = new Date();
	exp.setTime(exp.getTime() + (30*60*1000)); // add 30 minutes

	function nextPage() {
		document.location=nextLoc;
	}

	function prevPage() {
		document.open();
		document.location=prevLoc;
		document.close();
	}

	function setSlideShowStatus(status) {
		if (document.all || document.getElementById) {
			var imgTop=document.getElementById('slide_show_1');
			var imgBottom=document.getElementById('slide_show_2');
			if( status==true ) {
					if(imgTop!=null){
						imgTop.src=pauseImg;
						imgTop.alt=pauseText;
					}
					if(imgBottom!=null){
						imgBottom.src=pauseImg;
						imgBottom.alt=pauseText;
					}	
			} else {
				if(imgTop!=null){
					imgTop.src=playImg;
					imgTop.alt=playText;
				}
				if(imgBottom!=null){
					imgBottom.src=playImg;
					imgBottom.alt=playText;
				}	
			}
		}
	}

	function toggleSlideShow(exp) { //toggle slideshow
		var on = getCookie('slideShowOn');

		if( on!=null )
			dontSlides(exp);
		else
			doSlides(exp);
	}

	function doSlides(exp) { //start slideshow
	   setCookie("slideShowOn", "on", exp);
	   //setCookie("seconds", seconds, exp);
		setSlideShowStatus(true);
	   timerID = setTimeout('nextPage()', seconds * 1000);
	}

	function dontSlides(exp) { //stop slideshow
	   deleteCookie("slideShowOn");
	   //deleteCookie("seconds");
		setSlideShowStatus(false);
	   clearTimeout(timerID);
	}

	function getCookieVal(offset) {
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1)
			endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
	}

	function getCookie(name) {
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		while (i < clen) {
			var j = i + alen;
			if (document.cookie.substring(i, j) == arg)  return getCookieVal (j);
			i = document.cookie.indexOf(" ", i) + 1;
			if (i == 0) break;
		}
		return null;
	}

	function setCookie(name, value) {
		var argv = setCookie.arguments;
		var argc = setCookie.arguments.length;
		var expires = (argc > 2) ? argv[2] : null;
		var path = (argc > 3) ? argv[3] : null;
		var domain = (argc > 4) ? argv[4] : null;
		var secure = (argc > 5) ? argv[5] : false;
		document.cookie = name + "=" + escape (value) +
			((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
			((path == null) ? "" : ("; path=" + path)) +
			((domain == null) ? "" : ("; domain=" + domain)) +
			((secure == true) ? "; secure" : "");
	}

	function deleteCookie(name) {
		var exp = new Date();
		exp.setTime(exp.getTime() - 1);
		var cval = getCookie(name);
		document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
	}

	function pageSetup() {
	  var on = getCookie('slideShowOn');
	  //var seconds = getCookie('seconds');
	  if (on != null)
	    timerID = setTimeout('nextPage()', seconds * 1000);
	}
	
	function preloadBorderImages(resPath){
		var top_left = new Image();
		var top_middle = new Image();
		var top_right = new Image();
		var border_left = new Image();
		var border_right = new Image();
		var bottom_left = new Image();
		var bottom_middle = new Image();
		var bottom_right = new Image();
		var spacer = new Image();
		
		top_left.src = resPath + "/borders/thumbs/border_top_left.gif";
		top_middle.src = resPath + "/borders/thumbs/border_top_middle.gif";
		top_right.src = resPath + "/borders/thumbs/border_top_right.gif";
		border_left.src = resPath + "/borders/thumbs/border_left.gif";
		border_right.src = resPath + "/borders/thumbs/border_right.gif";
		bottom_left.src = resPath + "/borders/thumbs/border_bottom_left.gif";
		bottom_middle.src = resPath + "/borders/thumbs/border_bottom_middle.gif";
		bottom_right.src = resPath + "/borders/thumbs/border_bottom_right.gif";
		spacer.src = resPath + "/spacer.gif";
}