// JavaScript Document
function closephoto(){
	
	//show all select elements
	if (document.all && !window.opera){
		for (var j=0; j<document.getElementsByTagName("select").length; j++) {
			document.getElementsByTagName("select")[j].style.visibility = 'visible';
		}
	}
	
	document.getElementById('ph1').style.display = 'none';
}

function openphoto(){
		
	//hidden all select elements
	if (document.all && !window.opera){
		for (var j=0; j<document.getElementsByTagName("select").length; j++) {
			document.getElementsByTagName("select")[j].style.visibility = 'hidden';
		}
	}
	
	document.getElementById('ph1').style.display = '';
	
	var iWidth=document.photocomp.offsetWidth;
	var iHeight=document.photocomp.offsetHeight;
	var iRealWidth = iWidth ? iWidth : 800 ;
	var iRealHeight = iHeight ? iHeight : screen.height - 30 ;
	var iLeft = Math.round ((screen.width - iRealWidth) / 2)-23;
	var iTop =  Math.round ((screen.height - iRealHeight) / 2) - 80 ;
	document.getElementById('ph1').style.left= iLeft ;	
  
	if(document.all) {
		document.getElementById('ph1').style.top= iTop + document.body.scrollTop;
	}
	else if(document.getElementById) {
		document.getElementById('ph1').style.top= iTop + window.pageYOffset;
	}
}

function initAppear2(){
	for (var i=0;i<11;i++)
		setTimeout('setOpacity2('+i+')',35*i);
	return false;
}

function setOpacity2(value){
	document.photocomp.style.opacity = value/10;
	document.photocomp.style.filter = 'alpha(opacity=' + value*10 + ')';
	document.photocomp.style.MozOpacity = value/10;
}