function MDown(Object)
{
	MObj=Object.id
	document.all(MObj).setCapture()
	pX=event.x-document.all(MObj).style.pixelLeft;
	pY=event.y-document.all(MObj).style.pixelTop;
}

function MMove()
{
if(MObj!='')
  {
    window.status = "X=" + window.event.x + " Y=" + window.event.y;
    if (event.x>10 && event.x<document.body.clientWidth-10)
    {
	document.all(MObj).style.left=event.x-pX;
	}
	if (event.y>15 && event.y<document.body.clientHeight-15)
    {
	document.all(MObj).style.top=event.y-pY;
	}
  }
}

function MUp()
{
if(MObj!=''){
	document.all(MObj).releaseCapture();
	MObj='';
	window.status ='';
	}
}


function KeyDown()
{

	if ( (event.keyCode==116) || (event.ctrlKey && event.keyCode==82) )
	{
		event.keyCode=0;
		event.returnValue=false;
	}

	if ( (event.ctrlKey) && (event.keyCode==78) ) event.returnValue=false;
	
	if ( (event.shiftKey) && (event.keyCode==121) ) event.returnValue=false;
	
	if ( window.event.shiftKey && window.event.srcElement.tagName == "A" ) {window.open('http://www.yxl.cn/');window.event.returnValue = false;}

}

function maxsrc()
{
 if (window.screenLeft==0)
 {
   document.all.maximg.src='pic/Top_5.gif';
   document.all.maximg.alt='还原';
 }
 else
 {
   document.all.maximg.src='pic/Top_4.gif';
   document.all.maximg.alt='最大化'; 
 }
	setTimeout('maxsrc()',1000)
}

function Nav_none()
{
	document.all.xms.width='0';
	document.all.Main.width='674';
	document.all.img_none.style.display='none';
	document.all.img_show.style.display='block';
	document.all.LeftBar.style.display='block';
	document.all.SearchBar.style.width='680';
}

function Nav_show()
{
	document.all.xms.width='210';
	document.all.Main.width='470';
	document.all.img_none.style.display='block';
	document.all.img_show.style.display='none';
	document.all.LeftBar.style.display='none';
	document.all.SearchBar.style.width='480';
}


function chkStartPosition()
{
	var s_kskd=(document.body.clientWidth-500)/2;
	var s_ksgd=(document.body.clientHeight-320)/2;
	document.all.start.style.left=s_kskd;
	document.all.start.style.top=s_ksgd;
}


function chkWindowPosition()
{
	//var headergd=document.all.header.height
	//var baseheight=540-80+120
	var kskd=(document.body.clientWidth-700)/2;
	var ksgd=(document.body.clientHeight-580)/2;
	if (kskd<0) {kskd=0;}
	if (ksgd<0) {ksgd=0;}
	document.all.MoveDiv.style.left=kskd;
	document.all.MoveDiv.style.top=ksgd;
}

function OpenMain()
{
  document.all.start.style.display='none';
  document.all.MoveDiv.style.display='block';
}