﻿//<--=============== 创 建 xmlHttpRequest 对 象 ===================-->
//声明XMLHttpRequest函数
var xmlHttp;
function CreateXMLHTTP()
{
    //IE浏览器创建XmlHttpRequest对象
    if(window.ActiveXObject)
    {
       try
       {
            xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");//ie老版本
       }
       catch(e)
       {
            try
               {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");//ie新版本
               }
               catch(e)
               {
                    xmlHttp=false;
               }
       }
    }
    //非IE浏览器创建XmlHttpRequest对象
    else if(window.XMLHttpRequest)
    {
       xmlHttp=new XMLHttpRequest();
    }
    if(!xmlHttp)
    {
        window.alert("数据异常");
        return false;
    }
}

function checkNull()
{
    
    if(document.getElementById("TB_UserName").value=="")
    {
        alert("用户名不能为空");
        document.getElementById("TB_UserName").focus();
        return;
    }
    else if(document.getElementById("TB_PassWord").value=="")
    {
        alert("密码不能为空");
        document.getElementById("TB_PassWord").focus();
        return;
    }
    else if(document.getElementById("TB_PassWord").value!=document.getElementById("TB_PassSure").value)
    {
        alert("两次密码输入不一致");
        document.getElementById("TB_PassWord").focus();
        return;
    }
    if(document.getElementById("TB_Email").value=="")
    {
        alert("电子邮箱不能为空");
        document.getElementById("TB_Email").focus();
        return;
    }
    else if(document.getElementById("TB_RealName").value=="")
    {
        alert("真实姓名不能为空");
        document.getElementById("TB_RealName").focus();
        return;
    }
    else if(document.getElementById("TB_Station").value=="")
    {
        alert("您的职位不能为空");
        document.getElementById("TB_Station").focus();
        return;
    }
    else if(document.getElementById("TB_yzm").value=="")
    {
        alert("验证码不能为空");
        document.getElementById("TB_yzm").focus();
        return;
    }
}
function checkBasicNull()
{
    if(document.getElementById("TB_IncName").value=="")
    {
        alert("公司名称不能为空");
        document.getElementById("TB_IncName").focus();
        return false;
    }
    else if(document.getElementById("DDL_BizMode").value=="")
    {
        alert("经营模式不能为空");
        document.getElementById("DDL_BizMode").focus();
        return false;
    }
    else if(document.getElementById("RI_MainPro").value=="")
    {
        alert("主营产品不能为空");
        document.getElementById("RI_MainPro").focus();
        return false;
    }
    else if(document.getElementById("TB_AddressMinute").value=="")
    {
        alert("经营地址不能为空");
        document.getElementById("TB_AddressMinute").focus();
        return false;
    }
    else
    {
        return true;
    }
}
