		function toggleDiv(whichLayer)
		{
		
		// close all divs before opening a new one
		var toggleDivs = document.getElementsByTagName('div');
		for(i=0; i<toggleDivs.length; i++){
			if(toggleDivs[i].className=='toggle') toggleDivs[i].style.display='none';
		}
		
		// this is the way the standards work
			var style2 = document.getElementById(whichLayer).style;
			if(style2.display == "none"){
				document.getElementById(whichLayer).style.display = "block";
			
			}else if(style2.display == "block"){
				document.getElementById(whichLayer).style.display = "none";
			
			}
		
		
		}

		function fixImgComment(){
			if(document.getElementById("photo_text")){
				document.getElementById("photo_text").style.width = (document.getElementById("text_img").clientWidth-8)+"px";
				document.getElementById("photo_text").style.padding = "4px";
				document.getElementById("photo_text").style.display = "block";

			}
		}
		
		function printPopup(URL){

			day = new Date();
			id = day.getTime();
			eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=650,height=600,left = 315,top = 212');");

		}
		
		
		function gotoPage(url){
			location.href = url;
		
		}
		
		
		
		
		
		function getWindowDimension(axis){

		  var myWidth = 0, myHeight = 0;
		  if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		  }
		
			if(axis == 'h'){
				return myHeight;
			}
			
			if(axis == 'w'){
				return myWidth;
			}
		
		}
		
		
		
		
		function getScroll(axis) {
		  var scrOfX = 0, scrOfY = 0;
		  if( typeof( window.pageYOffset ) == 'number' ) {
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		  }
		  if(axis == 'y'){
		  	return scrOfY;
		  }
		  
		  if(axis == 'x'){
		  	return scrOfX;
		  }
		  
		}
			
			
		function scrollPopupDiv(){
			var x = 0;
			var y = posTop() + 'px';
			
			//moveObjTo('overlay',x,y);
			
			var y = (posTop()+100) + 'px';
			
			moveObjTo('popup_window',x,y);
				
		}
		window.onscroll = scrollPopupDiv;
