
      	var http_request;
           function checkCustomerExist()
           {
        	  var userName=document.getElementById("frmDeposit").loginname.value;
              if (userName==""||userName.length<3||userName.length>8||isSsnString(userName)==false) 
              {					
					alert("请输入正确的账号");
					document.getElementById("frmDeposit").loginname.focus();
              }			  
              else{
					 if (window.XMLHttpRequest)
					 { // if Mozilla, Safari etc
					   http_request=new XMLHttpRequest()
					   if (http_request.overrideMimeType)
						 http_request.overrideMimeType('text/xml');
					  }
					  else if (window.ActiveXObject)
					  { // if IE
						try {
						  http_request=new ActiveXObject("Msxml2.XMLHTTP");
						}
						catch (e){
						  try{
							 http_request=new ActiveXObject("Microsoft.XMLHTTP");
						  }
						  catch (e){}
						}
					  }
	
					 
					 http_request.onreadystatechange=process;
					 http_request.open("GET","CheckCustomerExist.do?userName=m"+userName);
					 http_request.send(null);  
              }     

          }
          
          function process()
          {
             if(http_request.readyState==4)
             {
               var chkResult = http_request.responseText;   
			   
			   var userName=document.getElementById("frmDeposit").loginname.value;
			   var LoginName="m"+userName+",";
               //alert(chkResult);

               if(chkResult==1)
               {    
                	//document.getElementById("chkName").innerHTML="<font color='red'>ϲûʹ!</font>";
                	alert(LoginName+"该帐号已经被使用,请另选一个!");
               }
               else
               {
                 	//document.getElementById("chkName").innerHTML="<font color='red'>ûѾ!뻻һû!</font>";
                 	alert(LoginName+"该帐号可以使用");
               }
            
            }
          }
