function getRequestBody(oForm){
var aParams=new Array();
for(var i=0;i<oForm.elements.length;i++){
//for(var i=1;i<oForm.elements.length-1;i++){
var sParam=encodeURIComponent(oForm.elements[i].name);
sParam=sParam+"=";
sParam=sParam+encodeURIComponent(oForm.elements[i].value);
//sParam+="=";
//sParam+=encodeURIComponent(oForm.elements[i].value);
aParams.push(sParam);
}
return aParams.join("&");
}

function sendRequest(mb,hf,hf2){
var oForm=document.getElementById("gj_form");
var sBody=getRequestBody(oForm);
//alert(sBody);
try{var oXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){try{var oXmlHttp =new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){var oXmlHttp = new XMLHttpRequest();}}

oXmlHttp.open("post",mb);
oXmlHttp.setRequestHeader("REFERER", location.href);
oXmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");

oXmlHttp.onreadystatechange=function(){
//alert(oXmlHttp.responseText);
if(oXmlHttp.readyState==4 && oXmlHttp.status == 200){
var stt=oXmlHttp.responseText;	
//alert(stt);
var a=stt.indexOf("<head><title>");
stt=stt.substring(0,a);

var all=stt;
var b=stt.indexOf("==");
stt=stt.substring(0,b);

var a1=all.split("==")[1];
//alert(a1);
var arr=a1.split("|");

var a2=all.split("==")[2];
var a3=all.split("==")[3];
var arr3=a3.split("|");
//alert("a2="+a2);
//alert("a3="+a3);
//alert("arr3[0]="+arr3[0]);
//alert("arr[1]="+arr[1]);
//alert(stt);
//------------------------

if(a2=="909"){
try{document.getElementById('gjdlok').innerHTML=a3;}catch(e){};
try{if(stt=="1"){document.getElementById('gjdlzt').style.display="";}else{document.getElementById('gjdlsb').style.display="";}}catch(e){};
try{if(stt=="1"){document.getElementById('gjdlzt1').style.display="";}else{document.getElementById('gjdlsb1').style.display="";}}catch(e){};
try{if(stt=="1"){document.getElementById('gjdlzt2').style.display="";}else{document.getElementById('gjdlsb2').style.display="";}}catch(e){};
try{if(stt=="1"){document.getElementById('gjdlzt3').innerHTML=".";}else{document.getElementById('gjdlzt3').innerHTML="";}}catch(e){};
try{if(stt=="1"){gjdlcg();}else{gjdlsb();}}catch(e){};
try{document.getElementById('username').value="";}catch(e){};
try{document.getElementById('password').value="";}catch(e){};
stt="";
}
else if(a2=="4"){try{gjzjcg();}catch(e){};}
else if(a2=="9093"){
try{document.getElementById('gjzcok').innerHTML=stt;stt="";}catch(e){};
}
else if(a2=="9091"||a2=="9092"||a2=="9000"){ks('909');}
//else if(a2=="9092"){
//var gjsjj =new Date();gjsjj.setTime(gjsjj.getTime()+60*60*1000);
//try{document.cookie="gjdlcsf968=0;path=/;expires="+gjsjj.toGMTString();}catch(e){}
//}
//---9123s-----------
else if(a2=="9123"){
if(a3!=""){
try{document.getElementById('hid_yh_02').value=arr3[0];}catch(e){};
try{document.getElementById('hid_yh_03').value=arr3[1];}catch(e){};
try{document.getElementById('hid_yh_04').value=arr3[2];}catch(e){};
try{document.getElementById('hid_yh_05').value=arr3[3];}catch(e){};
try{document.getElementById('hid_yh_06').value=arr3[4];}catch(e){};
try{document.getElementById('hid_yh_07').value=arr3[5];}catch(e){};
try{document.getElementById('hid_yh_08').value=arr3[6];}catch(e){};
try{document.getElementById('hid_yh_09').value=arr3[7];}catch(e){};
try{document.getElementById('hid_yh_10').value=arr3[8];}catch(e){};
try{document.getElementById('hid_yh_11').value=arr3[9];}catch(e){};
try{document.getElementById('hid_yh_12').value=arr3[10];}catch(e){};
try{document.getElementById('hid_yh_13').value=arr3[11];}catch(e){};
try{document.getElementById('hid_yh_14').value=arr3[12];}catch(e){};
try{document.getElementById('hid_yh_15').value=arr3[13];}catch(e){};
try{document.getElementById('hid_yh_16').value=arr3[14];}catch(e){};
try{document.getElementById('hid_yh_17').value=arr3[15];}catch(e){};

try{document.getElementById('hid_yh_18').innerHTML=arr3[17];}catch(e){};
try{document.getElementById('hid_yh_19').innerHTML=arr3[18];}catch(e){};
try{document.getElementById('hid_yh_20').innerHTML=arr3[19];}catch(e){};
try{document.getElementById('hid_yh_21').innerHTML=arr3[20];}catch(e){};
try{document.getElementById('hid_yh_31').value=arr3[21];}catch(e){};
try{document.getElementById('hid_yh_32').value=arr3[22];}catch(e){};
try{document.getElementById('hid_yh_33').value=arr3[23];}catch(e){};
try{document.getElementById('hid_yh_51').value=arr3[24];}catch(e){};

try{var checkboxs1 = document.getElementsByName("zl1_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[25]){e.checked=true;}}}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl2_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[26]){e.checked=true;}}}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl3_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[27]){e.checked=true;}}}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl4_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[28]){e.checked=true;}}}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl5_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[29]){e.checked=true;}}}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl6_qx");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[30]){e.checked=true;}}}catch(e){};
try{
document.getElementById('tpxs0').innerHTML="<a href=\"../inc/std.aspx?id=" + arr3[31] + "&dx=1&sj=9888\" target=blank ><img src=\"../inc/st.aspx?id=" + arr3[31] + "&dx=2&bl=1&sj=000\" border=0 width=\"70px\" height=\"70px\"></a>";
}catch(e){};
try{var checkboxs1 = document.getElementsByName("zl1_qxxs");
for (var i = 0;i < checkboxs1.length;i++) {var e = checkboxs1[i];if(e.value==arr3[32]){e.checked=true;}}}catch(e){};


}
}
//----9123e----------
else if(a2=="zf"){if(a3=="1"||a3=="2"||a3=="8"){
window.location=stt;stt="";//document.write(stt);
}else{try{document.getElementById('gj_zf_cg').innerHTML=stt;stt="";}catch(e){};}

}
else if(a2=="9092a"||a2=="9091a"){ks('909','1','1');}
else if(a2=="52"){
try{document.getElementById('xh').innerHTML=parseInt(document.getElementById('xh').innerHTML)+1}catch(e){};
try{document.getElementById('spzj').innerHTML=arr3[1];}catch(e){};//location="gwc.html";
}
else if(a2=="528"){
jssc('4','0','ordersp');
}
else if(a2=="528a"){
jssc('4','0','ordersp','1');
}
else if(a2=="zhmm1")
{
try{document.getElementById('gjzhmm1').style.display="none";}catch(e){};
try{document.getElementById('gjzhmm2').style.display="";}catch(e){};
try{document.getElementById('zc3').value=stt;stt="";}catch(e){};
}
else if(a2=="592"){//alert("a3="+a3);
try{document.getElementById('gj_gw_dhnr').innerHTML=arr3[0];}catch(e){};
try{document.getElementById('xh').innerHTML=arr3[3];}catch(e){};
try{document.getElementById('spzj').innerHTML=arr3[2];}catch(e){};
}
else if(a2=="1"){try{hysch();}catch(e){};}
else if(a2=="591"){gw('592','0');}
else if(a2=="591a"){gw('592','0',null,'1');}
else if(a2=="53"||a2=="56"||a2=="54"||a2=="55"){gw('592','0','1');}
else if(a2 == "5678"){try{gjfkhs(stt);}catch(e){gjtsxx("页面中没有设置gjfkhs()js函数");return;};stt="";}
//------------------------
if(stt!=""){gjtsxx(stt);}

//------------------------
}}
oXmlHttp.send(sBody);}

function ks(id,xz,sy){
//alert(document.getElementById("hid_gj_ddzj").value);
var h="";var h2="";
document.getElementById("hid_cz").value=id;document.getElementById("hid_xz").value=xz;
if(id=="909"){
try{h=document.getElementById("gjdlok1").innerHTML;}catch(e){h="页面中没有设置登陆后显示的文字";};
try{h2=document.getElementById("gjdlok2").innerHTML;}catch(e){h2="页面中没有设置登出后显示的文字";};
}
var URL="../inc/mzlc.aspx?h="+escape(h)+"&h2="+escape(h2); 
if(sy){URL="inc/mzlc.aspx?h="+escape(h)+"&h2="+escape(h2)+"&sy=1"; }
sendRequest(URL);
}

function gw(cz,id,lx,sy){
var shtml="";
if(cz=="592"){if(lx){
try{shtml=document.getElementById('gj_gw_html').innerHTML;}catch(e){gjtsxx("页面中没有设置控件gj_gw_html");return;}}
}
document.getElementById("hid_cz").value=cz;
document.getElementById("hid_xz").value=id;
//if(id=="909"){
//try{h=document.getElementById("gjdlok1").innerHTML}catch(e){h="页面中没有设置登陆后显示的文字";};
//try{h2=document.getElementById("gjdlok2").innerHTML}catch(e){h2="页面中没有设置登出后显示的文字";};
//}
var URL="../inc/gwc.aspx?shtml="+escape(shtml);
if(sy){URL="inc/gwc.aspx?shtml="+escape(shtml)+"&sy=1"; }
sendRequest(URL);
}

function gjtsxx(info,gg){if(gg){try{xs(info,gg);}catch(e){alert("请检查配置信息是否正确。");};}else{try{xs(info);}catch(e){alert(info);};}}

function op2(k,p,y,sb,mk,sc,gl,glid,gllx,gjdd,gjsp,id,sy){
var xsid="gj_ss_dhnr";
try{xsid=document.getElementById('hid_gj_ss_xsid').value;}catch(e){xsid="gj_ss_dhnr";}
var shtml="";
try{shtml=document.getElementById('gj_ss_html').innerHTML;}catch(e){gjtsxx("页面中没有设置控件gj_ss_html");return;}
try{document.getElementById('hid_gj_ss_html').value=shtml;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_html");return;}
try{document.getElementById(xsid).innerHTML;}catch(e){gjtsxx("页面中没有设置控件"+xsid+"");return;}
if(!sc||sc==""){try{sc=document.getElementById('hid_gj_ss_sc').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_sc");return;};}
if(!mk||mk==""){try{mk=document.getElementById('hid_gj_ss_mk').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_mk");};if(mk==""){gjtsxx("页面中模块代号没有设置值");return;};}
if(!y||y==""){try{y=document.getElementById('hid_gj_ss_y').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_y");return;};}
if(!sb||sb==""){try{sb=document.getElementById('hid_gj_ss_sb').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_sb");return;};}
if(!p||p==""){try{p=document.getElementById('hid_gj_ss_p').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_p");return;};}
if(!gl||gl==""){try{gl=document.getElementById('hid_gj_ss_gl').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_gl");return;};}
if(!glid||glid==""){try{glid=document.getElementById('hid_gj_ss_glid').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_glid");return;};}
if(!gllx||gllx==""){try{gllx=document.getElementById('hid_gj_ss_gllx').value;}catch(e){gjtsxx("页面中没有设置控件hid_gj_ss_gllx");return;};}
if(!gjdd||gjdd==""){try{gjdd=document.getElementById('hid_gj_dd').value;}catch(e){gjdd="";};}
if(!gjsp||gjsp==""){try{gjsp=document.getElementById('hid_gj_sp').value;}catch(e){gjsp="";};}
if(!id||id==""){try{id=document.getElementById('hid_gj_ddid').value;}catch(e){id="";};}
var ddhtml="";var zfhtm1="";var zfhtm2="";
try{ddhtml=document.getElementById('gj_ddsp_html').innerHTML;}catch(e){if(gjdd=="1"){gjtsxx("页面中没有设置控件gj_ddsp_html");return;}}
try{zfhtm1=document.getElementById('gj_yzf_html').innerHTML;}catch(e){}
try{zfhtm2=document.getElementById('gj_wzf_html').innerHTML;}catch(e){}
try{document.getElementById('hid_gj_ddsp_html').value=ddhtml;}catch(e){if(gjdd=="1"){gjtsxx("页面中没有设置控件hid_gj_ddsp_html");return;}}
try{document.getElementById('hid_gj_yzf_html').value=zfhtm1;}catch(e){if(zfhtm1!=""){gjtsxx("页面中没有设置控件hid_gj_yzf_html");return;}}
try{document.getElementById('hid_gj_wzf_html').value=zfhtm2;}catch(e){if(zfhtm2!=""){gjtsxx("页面中没有设置控件hid_gj_wzf_html");return;}}
//var URL="../inc/ge2.aspx?id="+id+"&gjsp="+gjsp+"&gjdd="+gjdd+"&glid="+glid+"&gllx="+gllx+"&gl="+gl+"&mk="+mk+"&sc="+sc+"&y="+y+"&sb="+sb+"&page="+p+"&shtml="+escape(shtml)+"&ddhtml="+escape(ddhtml)+"&zfhtm1="+escape(zfhtm1)+"&zfhtm2="+escape(zfhtm2)+"&k="+escape(k);
//if(sy){URL="inc/ge2.aspx?id="+id+"&gjsp="+gjsp+"&gjdd="+gjdd+"&glid="+glid+"&gllx="+gllx+"&gl="+gl+"&mk="+mk+"&sc="+sc+"&y="+y+"&sb="+sb+"&page="+p+"&shtml="+escape(shtml)+"&ddhtml="+escape(ddhtml)+"&zfhtm1="+escape(zfhtm1)+"&zfhtm2="+escape(zfhtm2)+"&k="+escape(k);}
//URL="../inc/ge2.aspx?id="+id+"&gjsp="+gjsp+"&gjdd="+gjdd+"&glid="+glid+"&gllx="+gllx+"&gl="+gl+"&mk="+mk+"&sc="+sc+"&y="+y+"&sb="+sb+"&shtml="+escape(shtml)+"&ddhtml="+escape(ddhtml)+"&zfhtm1="+zfhtm1;
var URL="../inc/ge2.aspx?id="+id+"&gjsp="+gjsp+"&gjdd="+gjdd+"&glid="+glid+"&gllx="+gllx+"&gl="+gl+"&mk="+mk+"&sc="+sc+"&y="+y+"&sb="+sb+"&page="+p+"&k="+escape(k);
if(sy){URL="inc/ge2.aspx?id="+id+"&gjsp="+gjsp+"&gjdd="+gjdd+"&glid="+glid+"&gllx="+gllx+"&gl="+gl+"&mk="+mk+"&sc="+sc+"&y="+y+"&sb="+sb+"&page="+p+"&k="+escape(k);}
document.getElementById(xsid).innerHTML="<div style=\"margin-top:30px;margin-bottom:30px;text-align:center;\">正在读取数据，请稍候...</div>";

var oForm=document.getElementById("gj_form");var sBody=getRequestBody(oForm);
if (window.ActiveXObject){var x = new ActiveXObject("Microsoft.XMLHTTP");}
else if (window.XMLHttpRequest){var x = new XMLHttpRequest();}
x.open("post",URL);x.setRequestHeader("REFERER",location.href);
x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
x.onreadystatechange = function(){
//alert(x.responseText);
if(x.readyState==4){if(x.status == 200){
var stt=x.responseText;
if(stt.indexOf("暂无")!=-1){var gjerr="";try{gjerr=document.getElementById('gj_err').value;stt=gjerr;}catch(e){}}
document.getElementById(xsid).innerHTML=stt;
}}}
x.send(sBody);}

function jssc(cz,id,spmk,sy){
document.getElementById("hid_cz").value=cz;
document.getElementById("hid_xz").value="";
var url="../inc/xx1c.aspx";
if(spmk){url="../inc/xx1c.aspx?spmk="+spmk;}//比如结算页面可能提交多个表单的时候会用到，提交商品信息。
if(sy){
URL="inc/xx1c.aspx";
if(spmk){url="inc/xx1c.aspx?spmk="+spmk;}
}
sendRequest(url);
}

function gjsjbj(sj1,id){
var dtimer;try{var stt="";
sj1=sj1.replace("-","/");
var sj2=new Date();
var sj3=new Date(Date.parse(sj1));
var sjc=(sj2.getTime()-sj3.getTime());
var ts=sjc/1000;if (ts < 60){stt = Math.round(ts) + "秒前";}
else{ts=ts/60;if (ts < 60){stt = Math.round(ts) + "分钟前";}
else{ts=ts/60;if (ts < 24){stt = Math.round(ts) + "小时前";}
else{ts=ts/24;if (ts < 30){stt = Math.round(ts) + "天前";}
else{ts=ts/30;if (ts < 12){stt = Math.round(ts) + "个月前";}
else{ts=ts/12;stt = Math.round(ts) + "年前";
}}}}}document.getElementById(id).innerHTML=stt;dtimer=setTimeout("gjsjbj('"+sj1+"','"+id+"')",1000);}catch(exp){}}

function yhg(p,pid,id,sy){
var shtml="";
try{shtml=document.getElementById('gj_yhlb_html').innerHTML;}catch(e){gjtsxx("页面中没有设置ID是gj_yhlb_html的div标签");return;}
try{document.getElementById('hid_gj_yh_html').value=shtml;}catch(e){gjtsxx("页面中没有设置控件hid_gj_yh_html");return;}

try{document.getElementById('gj_yhlb_dhnr').innerHTML;}catch(e){gjtsxx("页面中没有设置ID是gj_yhlb_dhnr的div标签");return;}
if(!id||id==""){try{id=document.getElementById('hid_gj_yhid').value;}catch(e){id="";};}
if(pid=="0"){
document.getElementById('gj_yhlb_dhnr').innerHTML="<div style=\"margin-top:30px;margin-bottom:30px;text-align:center;\">正在读取数据，请稍候...</div>";}
else{
try{document.getElementById('jzz'+pid).innerHTML="正在读取数据，请稍候...";}
catch(e){gjtsxx("页面中没有设置ID是[$dhid$]的div导航标签");return;}
document.getElementById('gj_yhlb_dhnr').scrollTop = document.getElementById('gj_yhlb_dhnr').scrollHeight;}
//var URL="../inc/ge2yh.aspx?id="+id+"&page="+p+"&shtml="+escape(shtml);
//if(sy){ URL="inc/ge2yh.aspx?id="+id+"&page="+p+"&sy="+sy+"&shtml="+escape(shtml);}
var URL="../inc/ge2yh.aspx?id="+id+"&page="+p;
if(sy){ URL="inc/ge2yh.aspx?id="+id+"&page="+p+"&sy="+sy}
var oForm=document.getElementById("gj_form");var sBody=getRequestBody(oForm);
if (window.ActiveXObject){var x = new ActiveXObject("Microsoft.XMLHTTP");}
else if (window.XMLHttpRequest){var x = new XMLHttpRequest();}x.open("POST",URL);
x.setRequestHeader("REFERER",location.href);
x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
x.onreadystatechange = function(){if(x.readyState == 4){var stt=x.responseText;
if(pid=="0"){
document.getElementById('gj_yhlb_dhnr').innerHTML=stt;}
else{document.getElementById('gj_yhlb_dhnr').innerHTML=document.getElementById('gj_yhlb_dhnr').innerHTML+stt;
try{document.getElementById('jzz'+pid).style.display="none";}
catch(e){gjtsxx("页面中没有设置ID是[$dhid$]的div导航标签");return;}
document.body.scrollTop = document.body.scrollHeight;
}}}
x.send(sBody);}

function ourl(id,ck){window.location=id;}

var oba;
var obb="";

function sbyg(obj)
{
var obj;
var ooo= document.getElementById(obj);
if(ooo==oba){}
else
{
ooo.style.background='#f2f2f2';
}
}

function sbyk(obj)
{
var obj;
var ooo= document.getElementById(obj);
if(ooo==oba){}
else
{
ooo.style.background='#ffffff';
}
}


//var gjsjj =new Date();gjsjj.setTime(gjsjj.getTime()+60*60*1000);
//function gjdlcshc1(){try{document.cookie="gjdlcsf968=0;path=/;expires="+gjsjj.toGMTString();}catch(e){}}
//function gjdlcshc2(){try{document.cookie="gjdlcsf968a=0;path=/;expires="+gjsjj.toGMTString();}catch(e){}}

//function gjdlyms1(){
//var gjdldk=0;
//try{gjdldk=document.cookie.match(new RegExp("(^| )gjdlcsf968=([^;]*)(;|$)"));gjdldk=unescape(parseInt((gjdldk)[2])+1);}catch(e){gjdlcshc1();}
//try{document.cookie="gjdlcsf968="+gjdldk+ ";path=/;expires="+gjsjj.toGMTString();}catch(e){}
////alert("当前打开页面数="+gjdldk);
//}
//function gjdlyms2(){
//var gjdlgb=0;
//try{gjdlgb=document.cookie.match(new RegExp("(^| )gjdlcsf968a=([^;]*)(;|$)"));gjdlgb=unescape(parseInt((gjdlgb)[2])+1);}catch(e){gjdlcshc2();}
//try{document.cookie="gjdlcsf968a="+gjdlgb+ ";path=/;expires="+gjsjj.toGMTString();}catch(e){}
////alert("当前关闭页面数="+gjdlgb);
//}

////gjdlcshc1();gjdlcshc2();
//window.onload=function(){if(document.referrer==""){gjdlyms1();}}
//window.onunload=function(){gjgbpd();if(self.screenTop>9000){ks('9092');ks('9092','1','1');}}

//function gjgbpd(){
//if(navigator.userAgent.indexOf("irefox")>=0){
//if(document.documentElement.scrollWidth!=0){
////alert("刷新d或离开");
//}else{gjdlgb();}
//}else{
//if(event.clientX<=0 || event.clientY<0){gjdlgb();}else{
////alert("刷新d或离开");
//}
//}
//}

//function gjdlgb(){
//var gjdldk=0;
//try{gjdldk=document.cookie.match(new RegExp("(^| )gjdlcsf968=([^;]*)(;|$)"));gjdldk=unescape(parseInt((gjdldk)[2]));}catch(e){gjdlcshc1();}
//var gjdlgb=0;
//try{gjdlgb=document.cookie.match(new RegExp("(^| )gjdlcsf968a=([^;]*)(;|$)"));gjdlgb=unescape(parseInt((gjdlgb)[2]));}catch(e){gjdlcshc2();}
////alert("gjdldk="+gjdldk+"，gjdlgb="+gjdlgb);
//if(parseInt(gjdldk)<=(parseInt(gjdlgb))){ks('9092');ks('9092','1','1');gjdlcshc2();gjdlcshc1();
////alert("关闭网页并退出操作");
//}else{
//gjdlyms2();
////alert("关闭网页");
//}
//}
