<!--
//---------------sellbuy----------------------------------
function showSellUser(id){
    createXMLHttpRequest();		  
    XMLHttpReq.open("GET",web_url+"sellbuy/User_Ajax.asp?id="+id,true);
    XMLHttpReq.onreadystatechange=function(){
        if(XMLHttpReq.readyState==4){
            if(XMLHttpReq.status==200){
                var msg=unescape(XMLHttpReq.responseText);
                document.getElementById("Hx_menu").innerHTML=msg;
                
            } else{
                window.alert(msg_err);	
            }
        }
    }
    XMLHttpReq.send(null); 
}
function checkFormsell(){
    if(getObjValues("title")==""||getObjValues("desc")==""||getObjValues("lxr")==""||getObjValues("tel")==""||getObjValues("email")==""){
	alert("请将带*项目填写完整！");
	return false;
    }
    if(getObjValues("c_id")==""){
	alert("请选择信息分类");
	return false;
    }
    if(getObjValues("title").length>50){
	alert("标题不能大于50字");
	return false;
    }
    if(getObjValues("desc").length>5000){
	alert("信息内容不能大于5000字");
	return false;
    }
    if(getObjValues("sellCode")==""){
	alert("请输入验证码！");
	return false;
    }
    return true;
}
function sendsell(){
    if(checkFormsell()){
        createXMLHttpRequest();
       	XMLHttpReq.open("POST","../inc/cmssell_ajax.asp",true);
        XMLHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
        XMLHttpReq.onreadystatechange=function(){
            if(XMLHttpReq.readyState==4){
                if(XMLHttpReq.status==200){
                    var msg=unescape(XMLHttpReq.responseText);
                    if(msg == "1"){
	                document.getElementById("sellBody").innerHTML="已成功发布了一条供求信息！请等待管理员审核通过……";
	            } else if(msg == "0"){
	                document.getElementById("sellBody").innerHTML="已成功发布了一条供求信息！";
	            } else if(msg == "Err_100"){
		        window.alert("对不起，验证码不正确！");
	            } else if(msg == "Err_101"){
		        window.alert("对不起，请将带*项目填写完整！！");
	            } else if(msg == "Err_102"){
			window.alert("对不起，提交的参数非法！");
	            } else if(msg == "Err_103"){
			window.alert("对不起，Email格式不正确！");
	            } else if(msg == "Err_104"){
			window.alert("你发表的内容中包含系统禁止字符！");
	            }
                 } else{
                     window.alert(msg_err);	
                 }
             }
        }
 	var strA = "title="+ escape(getObjValues("title"));
	strA += "&c_id=" + escape(getObjValues("c_id"));
	strA += "&types=" + escape(getObjValues("types"));
	strA += "&infoadd=" + escape(getObjValues("infoadd"));
	strA += "&infodate=" + escape(getObjValues("infodate"));
	strA += "&desc=" + escape(getObjValues("desc"));
	strA += "&lxr=" + escape(getObjValues("lxr"));
	strA += "&tel=" + escape(getObjValues("tel"));
	strA += "&email=" + escape(getObjValues("email"));
	strA += "&companyName=" + escape(getObjValues("companyName"));
	strA += "&adds=" + escape(getObjValues("adds"));
	strA += "&Postalcode=" + escape(getObjValues("Postalcode"));
	strA += "&fax=" + escape(getObjValues("fax"));
	strA += "&homepage=" + escape(getObjValues("homepage"));
	strA += "&qq=" + escape(getObjValues("qq"));
	strA += "&sellCode=" + escape(getObjValues("sellCode"));
        XMLHttpReq.send(strA);
    }
}
//-->