// JavaScript Document

function hidepopup(idm){
	document.getElementById(idm).style.display = 'none';
	}

lidm = 0;

function showmonth(idm){
	if(lidm!=0)
		{
		document.getElementById(lidm).className = '';
		document.getElementById(lidm+'_a').className = '';
		}
		
	if(lidm == idm){
		document.getElementById(lidm).className = '';
		document.getElementById(lidm+'_a').className = '';
		lidm = 0;
		}
		else{	
		element = document.getElementById(idm);
                element.className = 'yearact';		
		document.getElementById(idm+'_a').className = 'smact'; 
		lidm = idm;
		}		
	}

function showlayer(src){	
	document.getElementById('thumbprev').style.display = 'block';
	document.getElementById('thumbprev').innerHTML = '<img height="426" width="426" src="'+src+'" />';
	
	}

function hidelayer(){
	document.getElementById('thumbprev').style.display = 'none';
	document.getElementById('thumbprev').innerHTML="";	
	}
	
	
function WinResize(){
	var width = document.body.clientWidth;
	//alert(width);
	if(width>1100) {
		document.getElementById("main").className="main m1066";
		}
	else document.getElementById("main").className="main";	
	}

			function ch_a_chl(id)
			{	
				if( document.getElementById(id).style.display == 'none')
				{
				document.getElementById(id).style.display = 'block';
				}
				else
				{
				document.getElementById(id).style.display = 'none';
				}
			}
	
	
	function open_window(url,w,h)
{
var left = parseInt( (document.body.clientWidth/2) - w/2 );
var window_name ="window"+Math.floor(Math.random()*100)+1;
window.open(url, window_name,"width="+w+",height="+h+",top=50%,left="+left+",resizable=no,location=no,scrollbars=1,status=no,toolbar=no,directories=no,menubar=no");

}
	
	
	function ImgShw(ID, width, height, alt)
{
	var scroll = "no";
	var top=0, left=0;
	if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
	if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
	if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
	width = Math.min(width, screen.width-10);
	height = Math.min(height, screen.height-28);
	var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
	wnd.document.write(
		"<html><head>"+
		"<"+"script type=\"text/javascript\">"+
		"function KeyPress()"+
		"{"+
		"	if(window.event.keyCode == 27) "+
		"		window.close();"+
		"}"+
		"</"+"script>"+
		"<title></title></head>"+
		"<body topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">"+
		"<img src=\""+ID+"\" border=\"0\" alt=\""+alt+"\" />"+
		"</body></html>"
	);
	wnd.document.close();
}

	
window.onload=WinResize;
window.onresize=WinResize;