	
	function cent(){
		if (document.getElementById('imgdiv')) {
			theBox=document.getElementById('imgdiv');
			var pageCoords = getPageCoords();
			theBox.style.marginTop = parseInt(pageCoords[2] + (pageCoords[0])/2*0) + 'px';
			
			theBox=document.getElementById('imgdiv2');
			var pageCoords = getPageCoords();
			theBox.style.marginTop = parseInt(pageCoords[2] + (pageCoords[0])/2*0) + 'px';
		}
	}
    
	function hidshow(){
		$selects = document.getElementsByTagName("select");
		for ($z = 0; $z < $selects.length; $z++) {
			$selects[$z].style.display = "";
		}
		document.getElementById('imgdiv').style.visibility='hidden';
		document.getElementById('imgdiv2').style.visibility='hidden';
		document.location.href = document.location.href;
	}

	
	//window.onscroll=cent;
	//window.onresize=cent;
	
	function getPageCoords() {
		var coords = [0, 0, 0]; // height of window, document, scroll pos
		// all except IE
		if (window.innerHeight) {
			coords[0] = window.innerHeight;
			coords[2] = window.pageYOffset;
		}
		// IE 6 Strict
		else if (document.documentElement && document.documentElement.clientHeight != 0) {
			coords[0] = document.documentElement.clientHeight;
			coords[2] = document.documentElement.scrollTop;
		}
		else if (document.body) {
			coords[0] = document.body.clientHeight;
			coords[2] = document.body.scrollTop;
		}
		var test1 = document.body.scrollHeight;
		var test2 = document.body.offsetHeight;
		if (test1 > test2) {
			coords[1] = document.body.scrollHeight;
		} else {
			coords[1] = document.body.offsetHeight;
		}
		if (coords[1] < coords[0]) coords[1] = coords[0];
		return coords;
	}