

function open_new(url,w,h,scrol) 
{
	w+=0;h+=100;
	myWin = window.open(url ,'open_new','top=0, left=0, menubar=0, toolbar=0, location=0, directories=0, status=0, scrollbars='+scrol+', resizable=0, width='+w+', height='+h+'');
	var winWidth=w; 
	var winHeight=h;
	//alert(winWidth); 
	myWin.resizeTo(winWidth, winHeight); 
	var winPosX=screen.width/2-winWidth/2; 
	var winPosY=screen.height/2-winHeight/2;  
	myWin.moveTo(winPosX, winPosY); 
	myWin.focus();
}

function sall(){
 if(!document.listmsg.Msg) return;
 if(!document.listmsg.Msg.length)
	document.listmsg.Msg.checked = document.listmsg.Msg.checked ? false : true;
 else
	for(var i=0;i<document.listmsg.Msg.length;i++)
		document.listmsg.Msg[i].checked = document.listmsg.Msg[i].checked ? false : true;
}

function chbg(x,id,c)
{
	if(x=='out'){
		document.getElementById(id).style.backgroundColor = '';
	}
	else{
		document.getElementById(id).style.backgroundColor = c;
	}
}

function chbd(x,id)
{
	if(x=='over'){
		//document.getElementById(id).style.border = '#000000 1px solid;';
	}
	else{
		//document.getElementById(id).style.border = 0;
	}
}




function chbgrM(x,y)
{
	if(y == 1){
		document.getElementById(x).style.backgroundColor = '#FFFFFF';
	}
	if(y == 2){
		document.getElementById(x).style.backgroundColor = '';
	}
}



function showLay(lay)
{
	if(document.getElementById(lay)){
	document.getElementById(lay).style.display='';
	}

}

function hideLay()
{
	
	if(document.getElementById(currLay)){
	document.getElementById(currLay).style.display='none';
	}
	
}