// JavaScript Document

<!--
function usercheck()
{
		userlogin.ReturnLocation.value=window.location.toString();
	//alert (userlogin.ReturnLocation.value);
	userlogin.submit();
	
}
function verify()
{
	var k=document.userlogin;
	if (k.UserId.value==""){alert("请输入用户帐号！");return false;}
	if (k.Pass.value==""){alert("请输入用户密码！");return false;}
	if (k.verifycode.value==""){alert("请输入验证码！");return false;}
	
	//usercheck();
}

function KeyEvent()
{
	if (window.event.keyCode==13){
		verify();
	}
}

function KeyEvent2()
{
	if (window.event.keyCode==13){
		gosearch();
	}
}

function gosearch()
{
	form1.submit();
}

function regsort()
{
	if (userlogin.UserSort.value=="0"){top.location.href="Userreg.asp";}
}

function Login_Focus()
{
	document.userlogin.UserId.focus();
	window.scroll(0,0);
	var obj=document.createElement("IMG");
	var img_link="<% =img_link %>";
	obj.src=img_link+"images/denglu.gif";
	document.getElementById("UserId").onkeydown=function(){	document.all.helpdiv.style.display="none";	}
	//alert (getCoordinate(document.userlogin.UserId,"X"));
	//document.all.helpdiv.style.display="";
	//document.all.helpdiv.style.left=getCoordinate(document.userlogin.UserId,"X")-(-70);
	//document.all.helpdiv.style.top=getCoordinate(document.userlogin.UserId,"Y")-(+50);}
}
	function getCoordinate(e,o)
	{
		var l=e.offsetLeft;
		var t=e.offsetTop;
		while(e=e.offsetParent)
		{
			l+=e.offsetLeft;
			t+=e.offsetTop;
		}
		if (o=="X")
		{
			return l;
		}
		else if(o=="Y")
		{
			return t;
		}
		else
			return l+","+t;
	}
//-->
