﻿function btn_click(){

   var isValid=  CheckForm(document.getElementById("form_table"));
   
   
        
   if(isValid)
   {
        //现所在地
        var cityID=document.getElementById("jcity1Hidden").value;
        if(cityID.length==0)
        {
            zhPrompt(document.getElementById("jcity1"),zhPromptType.wrong);
            return false;
        }
        else
        {
            zhPrompt(document.getElementById("jcity1"),zhPromptType.ok);       
        }
        
       document.getElementById("ok").value = "提交中，请稍后...";
       document.getElementById("ok").disabled = true;	
       document.forms[0].submit();  
   }
}

function CheckExist(obj)
{
   var userName=obj.value;
   var remoteParm=new Array();
   remoteParm.push(userName);
   zhAjax.stateID="userName_prompt";
   zhAjax.isTimeout=false;
   zhAjax.ajaxStateText.wait="正在检测……";
   zhAjax.ajaxStateText.succeed="";
   zhAjax.simple("CheckExistsUserName",function (_return){
    if(_return!=null)
    {
        if(_return=="True")
        {
            zhAjax.SetText("帐号未被使用，可以注册！","right");
        }
        else
        {
            zhAjax.SetText("帐号已被使用，不能注册，请重新设置帐号！","wrong");
        }
    }
   },remoteParm);
}


