// JavaScript Document
	function closediv2(url,w,h){
		document.getElementById('d1').style.display = 'none';
		document.test.src='img/blank.gif';
	}
	
	function opendiv2(url,w,h){
	
		var str=document.test.src;
		if (!str.match(url)){
			
			document.getElementById('d1').style.background= '#f5f5e8 no-repeat center url(\'img/loader.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 - iRealWidth) / 2)-23;
			var iTop =  Math.round ((screen.height - iRealHeight) / 2) - 80 ;
			document.getElementById('d1').style.left= iLeft ;	
		  
			if(document.all) {
				document.getElementById('d1').style.top= iTop + document.body.scrollTop;
			}
			else if(document.getElementById) {
				document.getElementById('d1').style.top= iTop + window.pageYOffset;
			}
		}
	}
	
	
	var oldid="";
	function closediv(url,w,h)
	{
		if(oldid!="")
		{
		   document.getElementById(oldid).className="image";
		}
		document.getElementById('d1').style.display = 'none';
		document.test.src='img/blank.gif';
	}

	function select_div(id)
	{
		if(oldid=="")
		{	oldid=id;
			document.getElementById(id).className="image active";
		
		}
		else
		{
			document.getElementById(oldid).className="image";
			document.getElementById(id).className="image active";
			oldid=id;
		}
	}
	function opendiv(url,w,h){
	
		var str=document.test.src;
		if (!str.match(url)){
			
			document.getElementById('d1').style.background= '#f5f5e8 no-repeat center url(\'img/loader.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 - iRealWidth) / 2)-23;
			var iTop =  Math.round ((screen.height - iRealHeight) / 2) - 80 ;
			document.getElementById('d1').style.left= iLeft ;	
		  
			if(document.all) {
				document.getElementById('d1').style.top= iTop + document.body.scrollTop;
			}
			else if(document.getElementById) {
				document.getElementById('d1').style.top= iTop + window.pageYOffset;
			}
		}
	}
	
	
	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;
	}
