// JavaScript Document
var oldid="";
	function closediv(url)
	{
		document.getElementById('d1').style.display = 'none';
		document.test.src='img/blank.gif';
	}
	function closethis(url)
	{
		document.getElementById(url).style.display = 'none';
	}
	function select_div(id)
	{
		if(oldid=="")
		{	oldid=id;
			document.getElementById(id).className="bag act";
		
		}
		else
		{
			document.getElementById(oldid).className="bag";
			document.getElementById(id).className="bag act";
			oldid=id;
		}
	}
	function opendiv(url,w,h)
	{
	
		var str=document.test.src;
		if (!str.match(url)){
			
			document.getElementById('d1').style.background= '#fff no-repeat center url(\'img/loading.gif\')';
			document.test.style.opacity = 0;
			document.test.style.filter = 'alpha(opacity=0)';
			document.test.style.MozOpacity = 0;
			document.getElementById('d1').style.display = '';
			
			document.test.src=url;
			document.test.width=w;
			document.test.height=h;
			
	
			
			var iWidth=w;
			var iHeight=h;
			var iRealWidth = iWidth ? iWidth : 800 ;
			var iRealHeight = iHeight ? iHeight : screen.height - 30 ;
			var iLeft = Math.round ((screen.width-w) / 2)-23;


			scrtop=document.documentElement.scrollTop;
			document.getElementById('d1').style.marginTop=scrtop-25+"px";
			document.getElementById('d1').style.marginLeft= iLeft+"px";			
			
		}
	}
	
	function initAppear(){
		for (var i=0;i<11;i++){
			setTimeout('setOpacity('+i+')',35*i);
		}
		document.getElementById('d1').style.background= '#000000';
		return false;
	}

	function setOpacity(value){
		document.test.style.opacity = value/10;
		document.test.style.filter = 'alpha(opacity=' + value*10 + ')';
		document.test.style.MozOpacity = value/10;
	}
