﻿// JScript 文件

function CheckForm()
{
     
    if ($("txttitle").value == ""){
        $("txttitle").focus();
        alertmsg(false,'求购主题不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    if ($("txtsl").value == ""){
        $("txtsl").focus();
        alertmsg(false,'求购数量不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    if ($("txtlxr").value == ""){
        $("txtlxr").focus();
        alertmsg(false,'联系人不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    if ($("txttel").value == ""){
        $("txttel").focus();
        alertmsg(false,'联系电话不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    if ($("txtcompanyname").value == ""){
        $("txtcompanyname").focus();
        alertmsg(false,'公司名称不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    if ($("txtadd").value == ""){
        $("txtadd").focus();
        alertmsg(false,'公司地址不能为空！',config.WebURL+"quickbuy."+config.Suffix); 
        return false;
    }
    
   
	 
      
    return true;
}



function SubmitBuy()
{
    if(CheckForm())$("frmbuy").submit();
}


function CheckForm2()
{
    if ($("txttitle2").value == ""){
        $("txttitle2").focus();
        alert('求购主题不能为空！'); 
        return false;
    }
    
    if ($("txtlxr").value == ""){
        $("txtlxr").focus();
        alert('联系人不能为空！'); 
        return false;
    }
    if ($("txttel").value == ""){
        $("txttel").focus();
        alert('联系电话不能为空！'); 
        return false;
    }
    if ($("txtcompanyname").value == ""){
        $("txtcompanyname").focus();
        alert('公司名称不能为空！'); 
        return false;
    }
    
    
   
	 
      
    return true;
}


function SubmitBuy2()
{
    if(CheckForm2())
    {
    $("qbtag").value ="1";
    $("frmbuy").submit();
    }
}