function chklogin(username,userpass)
{
 var uu=$(username).value;
 var uupss=$(userpass).value;
 if(uu=="")
 {
	 alert('用户名不能为空！')
	 }
	 else if(uupss=="")
	 {
		 alert('密码不能为空！')
		 }
		 else
		 {
 var url ='/js/chklogin.aspx';
 var pars ='username='+ escape(uu)+'&userpass='+uupss;
 var myAjax = new Ajax.Request(url,{method: 'get', parameters: pars, onComplete:showResponse});
		 }
		

function showResponse(originalRequest)
{
  var cc = originalRequest.responseText;
  var xmlDoc;
  try
  {
 	 xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  }
  catch(e)
  {
  xmlDoc = document.implementation.createDocument("text/xml", "", null);
  }
  xmlDoc.async=false;
  xmlDoc.loadXML(cc);
  
  var xmlnode=xmlDoc.selectSingleNode("//ds");
  
  var tttt="<table cellspacing=0 cellpadding=0><TR><TD height=25 align=left><SPAN id=Label4>";
 
  for(i=0;i<xmlnode.childNodes.length;i++)
  {
  
 if(xmlnode.childNodes.item(i).getAttribute('ISIN')=="1")
 {
  tttt+="欢迎您："+uu+"进入路安俱乐部网站,</SPAN> </TD></TR><TR><TD height=25 align=left><SPAN id=Label5>感谢您一直对我们的支持！</SPAN></TD></TR><TR><TD align=middle height=25><A  href=/js/logout.aspx>退出登陆</A></TD></TR></table>";
  $('loginboxinfo').innerHTML=tttt;      
	 
	 }
	 else if(xmlnode.childNodes.item(i).getAttribute('ISIN')=="0")
	 {
		 alert("密码错误！或者账号不存在！");
		 }
  
  }

}
}
function chkuserlogin()
{
	if(IsLogin())
	{
		var tttt="<table cellspacing=0 cellpadding=0><TR><TD height=25 align=left><SPAN id=Label4>";
		 tttt+="欢迎您："+getCookie('flag')+"进入路安俱乐部网站,</SPAN> </TD></TR><TR><TD height=25 align=left><SPAN id=Label5>感谢您一直对我们的支持！</SPAN></TD></TR><TR><TD align=middle height=25><A  href=/js/logout.aspx>退出登陆</A></TD></TR></table>";
		 $('loginboxinfo').innerHTML=tttt;
		
		
		}
	}
	
	


