﻿function checkName()
{
    var name = $("BesName");
    if(name.value == "")
    {
        //name.focus();
        di("BesName" , "姓名不能为空")
        return;
    }
}
function checkAddress()
{
    var address = $("BesAddress")
    if(address.value == "")
    {
        //address.focus();
        di("BesAddress" , "地址不能为空")
        return;
    }
}
function checkPostCode()
{
    var postcode = $("BesPostCode");
    if(postcode.value == "")
    {
        //postcode.focus();
        di("BesPostCode" , "邮编不能为空")
        return;
    }
    else if(!postcode.value.IsPostCode())
    {
        //postcode.focus();
        di("BesPostCode" , "邮编格式不正确");
        return;
    }
}
function checkMobile()
{
    var mobile = $("BesMobile");
    if(mobile.value == "")
    {
        //mobile.focus();
        di("BesMobile" , "手机不能为空");
        return;
    }
    else if(!mobile.value.IsMobile())
    {
        //mobile.focus();
        di("BesMobile" , "手机格式不正确");
        return;
    }
}
function checkCircle()
{
    var cs = $$("BesCircle");
    var b = true;
    for(var i = 0; i<cs.length;i++)
    {
        if(cs[i].checked == true)
        {
            b = false;
            break;    
        }
    }
    if(b)
    {
        //cs[0].focus();
        di("BesCircle" , "请选择您要索订的商圈");
        return;
    }
}
function checkFCategory()
{
    var fcs = $$("BesFCategory");
    var b1 = true;
    for(var i = 0; i<fcs.length;i++)
    {
        if(fcs[i].checked == true)
        {
            b1 = false;
            break;    
        }
    }
    if(b1)
    {
        //fcs[0].focus();
        di("BesFCategory" , "请选择您要索订的分类");
        return;
    }
}