//  function isemail(email)   {   
//  var endvalue,allowstrlist;   
//  endvalue=true;   
//  allowstrlist="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-.@";   
//  if   (email.lastIndexOf("@")==-1   ||   email.lastIndexOf(".")==-1)   {   
//  endvalue=false;   
//  }   else   if   (email.indexOf("@",email.indexOf("@")+1)!=-1   ||   email.indexOf(".",email.indexOf("@"))==-1)   {   
//  endvalue=false;   
//  }   else   if   (email.substr(0,1)=="@"   ||   email.substr(0,1)=="."   ||   email.substr(email.length-1,1)=="@"   ||   email.substr(email.length-1,1)==".")   {   
//  endvalue=false;   
//  }   
//  for   (var   i=0;i<email.length;i++)   {   
//  if   (allowstrlist.indexOf(email.substr(i,1))==-1)   {   
//  endvalue=false;   
//  break;   
//  }   
//  }   
//  return(endvalue);   
//  }
  
  function checkSearch()
  {
    if(!CheckIsNull($("WebSiteControl1_txtSearch").value))
    {
        alert("请输入关键字!");
        return false;
    }
  
    return true;
  }
  function document.onkeydown()
    {
     if(event.keyCode==13)
        {
                document.getElementById("WebSiteControl1_btnSearch").click(); 
                return false;     
        }
    }

  
function CheckMes()
{
    if(!CheckIsNull($("txtName").value))
    {
        alert("网站名称不能为空");
        return false;
    }
    else if(!CheckIsNull($("txtWebSite").value))
    {
         alert("网站网址不能为空");
         return false;
    }
    else if(!CheckIsNull($("txtTel1").value))
    {
        alert("电话号码不能为空");
        return false;
    }
    else if(!CheckIsNull($("txtMobil").value))
    {
        alert("手机号码不能为空");
        return false;
    }
    else if(!CheckIsNull($("txtEmail").value))
    {
        alert("email不能为空");
        return false;
    }
    else if(CheckEmaill(document.getElementById("txtEmail").value)==false)
	{
		alert("email格式不正确");
		return false;
	}
    else if(!CheckIsNull($("txtValid").value))
    {
        alert("验证码不能为空");
        return false;
    }
    else if(!CheckIsNull($("txtCompanyInfo").value))
    {
        alert("简介不能为空");
        return false;
    }
    else
    { 
        if(document.getElementById("DDLProvince").options.value=="")
        {
            alert("请选择所在区域");
            return false;
        }
        else
        {
            $("Province").value=$("DDLProvince").options[$("DDLProvince").options.selectedIndex].text;
            $("City").value=$("DDLCity").options[$("DDLCity").options.selectedIndex].text;
            if($("Province").value=="所有省份")
            {
                $("Province").value="";
                alert("请选择您所在省份！");
                return false;
            }
            else if($("City").value=="所有地区")
            {
                $("Province").value="";
                alert("请选择您所在地区！");
                return false;
            }
            else
            {
                return true;
            }
        }
           return true;
     }
   
   
}
