/**
 * 初始化ajax
 */
function creat_Object() { 
var xmlhttp; 
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
try { 
xmlhttp = new XMLHttpRequest(); 
} 
catch (e) { 
alert("Your browser is not supporting XMLHTTPRequest");
 xmlhttp = false; 
} 
} 
else { 
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} 
return xmlhttp; 
} 
var ajax = creat_Object(); 

document.write("<script src='/a_Inc/Md5.js' type='text/javascript'></script>");

/**
 * 非中文判断
 */
function is_zw(str){
	exp=/^[A-Za-z0-9]*$/;
	if(exp.test(str))
	{
		return false;
	}
	return true;
}


/**
 * 中文及表情符号转unicode码
 */
function  parseStandard(str){
    if(str.length==1){
     return "000"+str;
    }else if(str.length==2){
     return "00"+str;
    }else if(str.length==3){
     return "0"+str;
    }else{
     return str;
    }
}

function encode(s){
       var t='';
       for(i=0;i<s.length;i++){
        t+='@u'+parseStandard(s.charCodeAt(i).toString(16));
      }
    //alert(t);
	return t;
    //var t=eval_r('\''+t.replace(/\\\\/g, '\\')+'\'');
    //alert(t);
}


/**
 * 弹出层隐藏/显示
 */
function showDiv(tag,w,h,url,postStr){
var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');

light.style.display='block';

light.style.width=w+"px";
light.style.height=h+"px";
light.style.marginLeft=-Math.round(w/2)+"px";
light.style.marginTop=-Math.round(h/2)+"px";

Iframe.style.display='block';
fade.style.display='block';

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		
		document.getElementById(tag+"Count").innerHTML = ajax.responseText;
		


	}
}
}

function hideDiv(tag){
var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');
light.style.display='none';
Iframe.style.display='none';
fade.style.display='none';
document.getElementById(tag+"Count").innerHTML = "加载中...";
}








function topUrl(url){
$("#IndexUrl").attr("src",url);
}

function topparentUrl(url){
$('#IndexUrl', window.parent.document).attr("src",url);
}


function topUrlr(url){
$("#IndexUrlr").attr("src",url);
}










//修改密码
function uPasstheFormSave(){
var ids = document.theForm.ids.value;
var selfids = document.theForm.selfids.value;
var old_uPass = document.theForm.old_uPass.value;
var new_uPass = document.theForm.new_uPass.value;
var new_uPass2 = document.theForm.new_uPass2.value;
	
if(old_uPass==""){
		scscms_alert("请填写旧密码","","",1);
	return false;
}
if(new_uPass==""){
		scscms_alert("请填写新密码","","",1);
	return false;
}
if(new_uPass2==""){
		scscms_alert("请确认密码","","",1);
	return false;
}	
if(new_uPass!=new_uPass2){
		scscms_alert("确认密码有误","","",1);
	return false;
}
	
var d = new Date();
var url = "u.Pass.ok.asp";
var postStr = "ids="+ids+"&selfids="+selfids+"&old_uPass="+old_uPass+"&new_uPass="+new_uPass+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");								
        
		if(v[0]=="ok"){
			//alert(v[1]);
			//top.location.href='Login.asp';
			scscms_alert(v[1],"ok",function(){top.location.href = "Login.asp"});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }
}




//修改联系资料
function uDatatheFormSave(){
var ids = document.theForm.ids.value;
var a_tel = document.theForm.a_tel.value;
var a_qq = document.theForm.a_qq.value;
var a_w = document.theForm.a_w.value;
	
if(a_tel==""){
		scscms_alert("请填写手机号","","",1);
	return false;
}
if(a_qq==""){
		scscms_alert("请填写QQ号","","",1);
	return false;
}
if(a_w==""){
		scscms_alert("请填写微信号","","",1);
	return false;
}	
	
var d = new Date();
var url = "u.Data.ok.asp";
var postStr = "ids="+ids+"&a_tel="+a_tel+"&a_qq="+a_qq+"&a_w="+a_w+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");								

			scscms_alert(vs,"","",1);

    }
  }
}







//保存系统设置
function WangpuDatatheFormCheck(){
if (document.theForm.a_name.value==""){
 scscms_alert("请填写系统名称","","",1);
 return false;
}
if (document.theForm.a_weixinpic1.value==""){
 scscms_alert("请上传装修主图","","",1);
 return false;
}
if (document.theForm.jsday.value<0){
 scscms_alert("请填写结算周期","","",1);
 return false;
}
}







//保存微信设置
function WangpuWXtheFormCheck(){
if (document.theForm.a_weixinid.value==""){
 scscms_alert("请填写微信公众平台微信号","","",1);
 return false;
}
if (document.theForm.pic.value==""){
 scscms_alert("请上传微信公众平台二维码","","",1);
 return false;
}
//if (document.theForm.a_weixintoken.value==""){
// scscms_alert("请填写Token(令牌)","","",1);
// return false;
//}
//if (document.theForm.a_weixinappid.value==""){
// scscms_alert("请填写AppID(应用ID)","","",1);
// return false;
//}
//if (document.theForm.a_weixinsecret.value==""){
// scscms_alert("请填写AppSecret(应用密钥)","","",1);
// return false;
//}
}





//自助激活微信系统
function ActivationWx(flag){
var url = "Wangpu.wx.activation.asp";
var postStr = "flag="+flag;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
	scscms_alert(ajax.responseText,"ok",function(){location.href = "Wangpu.wx.asp"});
  }
 }

}







//保存自定义回复
function WangpureplytheFormCheck(){
if (document.theForm.keys.value==""){
 scscms_alert("请填写回复关键词","","",1);
 return false;
}
if (document.theForm.title.value==""){
 scscms_alert("请填写标题","","",1);
 return false;
}
}







//选择菜单功能
function WangpuMenutheFormSelected(ID){
var cVatxt0=document.getElementById('cVatxt0');
var cVatxt2=document.getElementById('cVatxt2');
var cVatxt3=document.getElementById('cVatxt3');
  if(ID==0){
	cVatxt0.style.display='block';  
	cVatxt2.style.display='none'; 
	cVatxt3.style.display='none'; 
  }else if(ID==2){
	cVatxt0.style.display='none';  
	cVatxt2.style.display='block'; 
	cVatxt3.style.display='none'; 
  }else if(ID==3){
	cVatxt0.style.display='none';  
	cVatxt2.style.display='none'; 
	cVatxt3.style.display='block'; 
  }
}




//保存自定义菜单
function WangpuMenutheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var pid = document.theForm.pid.value;
var title = document.theForm.title.value;
var ppid = document.theForm.ppid.value;

var cCount = document.getElementsByName("c");
var c="";
for (var i=0;i<cCount.length;i++ ){
if(cCount[i].checked){ //判断复选框是否选中
c = cCount[i].value;
}
}

var syskey0 = document.theForm.syskey0.value;
var syskey2 = document.theForm.syskey2.value;
var syskey3 = document.theForm.syskey3.value;
var num = document.theForm.num.value;
	  
if(title==""){
scscms_alert("请填写菜单名称","","",1);
return false;
}

if(num==""){
scscms_alert("请填写序号","","",1);
return false;
}

var d = new Date();
var url = "Wangpu.menu.edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&title="+title+"&ppid="+ppid+"&c="+c+"&syskey0="+syskey0+"&syskey2="+syskey2+"&syskey3="+syskey3+"&num="+num+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+title;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}














//保存个人结算设置
function WangpuJstheFormCheck(){
var gourl = document.WangpuJstheForm.gourl.value;

var a_ali = document.WangpuJstheForm.a_ali.value;
var a_u = document.WangpuJstheForm.a_u.value;

if(a_ali=="" || a_u==""){
	  scscms_alert("请填写个人微信结算账户设置","","",1);
	  return false;
}


  
}







//推广层级
function WangpuTkfenchengbili(){
var a_tkcj = document.theForm.a_tkcj.value;

var d = new Date();
var url = "Wangpu.tk.ceng.asp";
var postStr = "a_tkcj="+a_tkcj+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							

			document.getElementById("tkcjArr").innerHTML = vs;

    }
  }
}





//保存社区标签
function SysSnsSofttheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var gtitle = document.theForm.gtitle.value;
var tt = document.theForm.tt.value;
var amount = document.theForm.amount.value;
	  
if(gtitle==""){
scscms_alert("请填写群名称","","",1);
return false;
}

var d = new Date();
var url = "Sns.soft.edit.ok.asp";
var postStr = "IDs="+IDs+"&gtitle="+gtitle+"&tt="+tt+"&amount="+amount+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+gtitle;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}





//删除社区动态附图
function DelVewPic(id){
document.getElementById("pic2ser"+id).value = "";
document.getElementById("pic2vv"+id).style.display = 'none';
}




//保存社区动态
function SnsEdittheFormCheck(){
if (document.theForm.n_contentz.value==""){
 scscms_alert("请填写动态","","",1);
 return false;
}
if (document.theForm.n.value==0){
 scscms_alert("请选择标签","","",1);
 return false;
}
}




//保存自定义装修页
function WangpuzzspagetheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var title = document.theForm.title.value;
var dem = document.theForm.dem.value;
	  
if(title==""){
scscms_alert("请填写网页名称","","",1);
return false;
}

if(dem==""){
scscms_alert("请填写实例名称","","",1);
return false;
}

var d = new Date();
var url = "Wangpu.zzs.page.edit.ok.asp";
var postStr = "IDs="+IDs+"&title="+title+"&dem="+dem+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+title;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}






//帮助动态回复保存
function SnsReplytheFormSave(){
var IDs = document.theForm.IDs.value;
var SIDs = document.theForm.SIDs.value;
var Htx = document.theForm.Htx.value;
var n_content = encode(document.theForm.n_content.value);
var n_userid = document.theForm.n_userid.value;
	  
if(n_content==""){
scscms_alert("请填写回复内容","","",1);
return false;
}

var d = new Date();
var url = "Sns.mess.reply.ok.asp";
var postStr = "IDs="+IDs+"&SIDs="+SIDs+"&Htx="+Htx+"&n_content="+n_content+"&n_userid="+n_userid+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        v = new Array;
        v = vs.split("$$$");
		document.getElementById("replymore").innerHTML = v[0];
		document.theForm.lastid.value = v[1];
    }
  }

}



//删除帮助动态回复
function SnsReplytheFormDel(ID,Nid){
var d = new Date();
var url = "Sns.mess.reply.del.asp";
var postStr = "IDs="+ID+"&Nid="+Nid+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("replytxt"+ID).style.display='none';
    }
  }	
}



//加载更多帮助动态回复
function SnsReplytheFormMore(){
var el = document.getElementById('replymore');
var li = document.createElement('li');
var IDs = document.theForm.IDs.value;
var lastid = document.theForm.lastid.value;

var postStr = "IDs="+IDs+"&lastid="+lastid;
ajax.open("POST", "Sns.mess.reply.more.asp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
					
    vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
					  					
    li.innerHTML = v[0];
    document.theForm.lastid.value = v[1];

  }
  el.appendChild(li, el.childNodes[0]);
 }	
}


//加载更多帮助动态回复
function SnsReplytheFormUserID(Uid){
document.theForm.n_content.value="@"+Uid+"　";	
}












//保存社区标签
function AddressSofttheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var ft_name = document.theForm.ft_name.value;
var ft_factor = document.theForm.ft_factor.value;
var ft_ccc = document.theForm.ft_ccc.value;
	  
if(ft_name==""){
scscms_alert("请填写等级名称","","",1);
return false;
}

if(ft_factor=="" || Number(ft_factor)<0 || Number(ft_factor)>100){
scscms_alert("请填写供应价比例","","",1);
return false;
}

if(ft_ccc=="" || Number(ft_ccc)<0){
scscms_alert("请填写可导入的商品数量","","",1);
return false;
}

var d = new Date();
var url = "Address.soft.edit.ok.asp";
var postStr = "IDs="+IDs+"&ft_name="+ft_name+"&ft_factor="+ft_factor+"&ft_ccc="+ft_ccc;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+ft_name;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}




//分销商查询
function AddresstheFormSearch(){
var gourl = document.theForm.gourl.value;

var keyuser = document.theForm.keyuser.value;
var keyw = document.theForm.keyw.value;
var keyq = document.theForm.keyq.value;
var keyt = document.theForm.keyt.value;

var keyusefulness1rr = document.getElementsByName("keyusefulness1");
var keyusefulness1="";
for (var i=0;i<keyusefulness1rr.length;i++ ){
if(keyusefulness1rr[i].checked){ //判断单选框是否选中
keyusefulness1 = keyusefulness1rr[i].value;
}
}

var keyusefulness0rr = document.getElementsByName("keyusefulness0");
var keyusefulness0="";
for (var i=0;i<keyusefulness0rr.length;i++ ){
if(keyusefulness0rr[i].checked){ //判断单选框是否选中
keyusefulness0 = keyusefulness0rr[i].value;
}
}

var keygongyingtt1rr = document.getElementsByName("keygongyingtt1");
var keygongyingtt1="";
for (var i=0;i<keygongyingtt1rr.length;i++ ){
if(keygongyingtt1rr[i].checked){ //判断单选框是否选中
keygongyingtt1 = keygongyingtt1rr[i].value;
}
}

var keygongyingtt0rr = document.getElementsByName("keygongyingtt0");
var keygongyingtt0="";
for (var i=0;i<keygongyingtt0rr.length;i++ ){
if(keygongyingtt0rr[i].checked){ //判断单选框是否选中
keygongyingtt0 = keygongyingtt0rr[i].value;
}
}

var keybtime = document.theForm.keybtime.value;
var keyetime = document.theForm.keyetime.value;

document.listform.action = gourl+"?keyuser="+keyuser+"&keyw="+keyw+"&keyq="+keyq+"&keyt="+keyt+"&keyusefulness1="+keyusefulness1+"&keyusefulness0="+keyusefulness0+"&keygongyingtt1="+keygongyingtt1+"&keygongyingtt0="+keygongyingtt0+"&keybtime="+keybtime+"&keyetime="+keyetime;
document.listform.submit();	  
}






//保存分销等级
function AddressFttheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var ft = document.theForm.ft.value;

if (ft==0){
 scscms_alert("请选择等级","","",1);
 return false;
}

var url = "Address.ft.ok.asp";
var postStr = "IDs="+IDs+"&ft="+ft ;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
				
		    hideDiv('addDiv');
			scscms_alert(v[0],"","",1);
			document.getElementById(backdiv).innerHTML = v[1];


  }
 }	
}



//保存分销商
function AddresstheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var a_user = document.theForm.a_user.value;
var uPass = document.theForm.uPass.value;
var uPass2 = document.theForm.uPass2.value;
var a_w = document.theForm.a_w.value;
var a_q = document.theForm.a_q.value;
var a_t = document.theForm.a_t.value;

if (uPass!=""){
 if (uPass!=uPass2){
   scscms_alert("确认密码不正确","","",1);
   return false;
 }
}

//if (a_w==""){
// scscms_alert("请填写微信号","","",1);
// return false;
//}
//
//if (a_q==""){
// scscms_alert("请填写QQ号","","",1);
// return false;
//}
//
//if (a_t==""){
// scscms_alert("请填写电话","","",1);
// return false;
//}

var d = new Date();
var url = "Address.edit.ok.asp";
var postStr = "IDs="+IDs+"&a_user="+a_user+"&uPass="+uPass+"&a_w="+a_w+"&a_q="+a_q+"&a_t="+a_t+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).style.color = "#CCCCCC";

    }
  }
}




//粉丝查询
function AddressFanstheFormSearch(){
var gourl = document.theForm.gourl.value;
var keywww = document.theForm.keywww.value;
var keynice = document.theForm.keynice.value;
var keywx = document.theForm.keywx.value;
var keytel = document.theForm.keytel.value;
var keytkid = document.theForm.keytkid.value;
document.listform.action = gourl+"?keywww="+keywww+"&keywx="+keywx+"&keynice="+keynice+"&keytel="+keytel+"&keytkid="+keytkid;
document.listform.submit();	  
}



//保存粉丝信息
function AddressFanstheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var pid = document.theForm.pid.value;

var www = document.theForm.www.value;
var ex_mtel = document.theForm.ex_mtel.value;
var ex_pass = document.theForm.ex_pass.value;
var ex_pass2 = document.theForm.ex_pass2.value;
var ex_ww = document.theForm.ex_ww.value;
var ex_email = document.theForm.ex_email.value;
var ex_name = document.theForm.ex_name.value;
var ex_sex = document.theForm.ex_sex.value;
var ex_weixin = document.theForm.ex_weixin.value;
var ex_add = document.theForm.ex_add.value;
var ex_fxuser = document.theForm.ex_fxuser.value;

//if(ex_mtel!=""){
//if(ex_pass==""){
//scscms_alert("请填写密码","","",1);
//return false;
//}
//if(ex_pass!=ex_pass2){
//scscms_alert("两次密码不一致","","",1);
//return false;
//}
//}

var d = new Date();
var url = "Address.fans.Edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&ex_ww="+ex_ww+"&ex_email="+ex_email+"&ex_mtel="+ex_mtel+"&ex_name="+ex_name+"&ex_sex="+ex_sex+"&ex_weixin="+ex_weixin+"&ex_add="+ex_add+"&ex_fxuser="+ex_fxuser+"&d="+d+"&ex_pass="+ex_pass+"&ex_pass2="+ex_pass2+"&www="+www;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).style.color = "#CCCCCC";

    }
  }
}





//推客查询
function AddressTktheFormSearch(){
var gourl = document.theForm.gourl.value;
var keywww = document.theForm.keywww.value;
var keywx = document.theForm.keywx.value;
var keytel = document.theForm.keytel.value;
document.listform.action = gourl+"?keywww="+keywww+"&keywx="+keywx+"&keytel="+keytel;
document.listform.submit();	
}



//保存粉丝推客
function AddressTktheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var uName = document.theForm.uName.value;
var uPass = document.theForm.uPass.value;
var uPass2 = document.theForm.uPass2.value;
var uAlipay = document.theForm.uAlipay.value;
var uAlipayname = document.theForm.uAlipayname.value;
var uWX = document.theForm.uWX.value;
var uTitle = document.theForm.uTitle.value;

if (uPass!=""){
 if (uPass!=uPass2){
   scscms_alert("确认密码不正确","","",1);
   return false;
 }
}

var d = new Date();
var url = "Address.tk.edit.ok.asp";
var postStr = "IDs="+IDs+"&uName="+uName+"&uPass="+uPass+"&uAlipay="+uAlipay+"&uAlipayname="+uAlipayname+"&uWX="+uWX+"&uTitle="+uTitle;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).style.color = "#CCCCCC";

    }
  }
}




//保存员工账户
function uUserselftheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var s_user = document.theForm.s_user.value;
var s_name = document.theForm.s_name.value;
var s_openid = document.theForm.s_openid.value;
var s_pass = document.theForm.s_pass.value;

var a_settingCount = document.getElementsByName("a_setting");
var a_setting="";
for (var i=0;i<a_settingCount.length;i++ ){
if(a_settingCount[i].checked){ //判断复选框是否选中
a_setting = a_setting+","+a_settingCount[i].value;
}
}
	  
if(s_user==""){
scscms_alert("请填写用户名","","",1);
return false;
}
if(s_name==""){
scscms_alert("请填写姓名","","",1);
return false;
}

var d = new Date();
var url = "u.Userself.edit.ok.asp";
var postStr = "IDs="+IDs+"&s_user="+s_user+"&s_name="+s_name+"&s_openid="+s_openid+"&s_pass="+s_pass+"&a_setting="+a_setting+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;						
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }

}






//删除推客申请消息
function delMessTkList(ID,Nid){
var d = new Date();
var url = "Frame.Mess.tk.del.asp";
var postStr = "IDs="+ID+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById(Nid).style.display='none';
    }
  }	
}














//删除消息申请消息
function delMessList(ID,Nid){
var d = new Date();
var url = "Frame.Mess.del.asp";
var postStr = "IDs="+ID+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById(Nid).style.display='none';
    }
  }	
}






//装修DIv层切换
function setZzsDiv(cursel){
for(i=1;i<=10;i++){
	
var div = document.getElementById("zzs_"+i);
    div.style.display=i==cursel?"block":"none";
	
	//清空文本
	EditorObject.html("");
	document.theForm.ID1.value = 0;
	
	//清空商品
	document.theForm.ID2.value = 0;
	document.theForm.ID2num.value = 0;
	document.getElementById("prolist").innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=1')><img src='Images/zzs_pro.png' /></div>";
	
	var propicrr = document.getElementsByName("propic");
	for (var x=0;x<propicrr.length;x++ ){
	    if(x == 2){
		    propicrr[x].checked=true;
	    }
	}

	document.theForm.protitle.checked=false;
	document.theForm.propay.checked=false;
	
	document.getElementById("adtxt2").innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=2')><img src='Images/zzs_pro.png' /></div>";
	
	//清空广告
	document.theForm.ID3.value = 0;		
	document.theForm.adpic.value = "";
	document.theForm.adtype.value = 0;
	adtypeZZS3(0);
	document.theForm.adprostr.value = "";
	document.theForm.adurl.value = "";
	document.theForm.adpromenu.value = "";
	document.theForm.adpromenutitle.value = "";
	
	//清空标题
	document.theForm.ID4.value = 0;		
	document.theForm.tit1.value = "";
	document.theForm.tit2.value = "";
	document.theForm.titcenter.value = "center";
	document.theForm.titcolor.value = "";
	document.theForm.titcolor2.value = "";
	
	//清空文本链接
	document.theForm.ID5.value = 0;	
	document.theForm.linktit.value = "";	
	document.theForm.linktype.value = 0;
	adtypeZZS5(1);
	document.theForm.linknum.value = 5;
	document.theForm.linkurl.value = "";
	document.theForm.linkpromenu.value = "";
	document.theForm.linkpromenutitle.value = "";
	
	//清空图片链接
	document.theForm.ID6.value = 0;			
	document.theForm.piclinktype.value = 0;	
	piclinktypeZZS6(0);	
			
	document.theForm.piclinkpic1.value = "";
	document.theForm.piclink1_type.value = 0;
	piclink1_typeZZS6(0);
	document.getElementById('piclink1_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=3')><img src='Images/zzs_pro.png' /></div>";
	document.theForm.piclink1_prostr.value = "";
	document.theForm.piclink1_url.value = "";
	document.theForm.piclink1_promenu.value = "";
	document.theForm.piclink1_promenutitle.value = "";
		
	document.theForm.piclinkpic2.value = "";
	document.theForm.piclink2_type.value = 0;
	piclink2_typeZZS6(0);
	document.getElementById('piclink2_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=4')><img src='Images/zzs_pro.png' /></div>";
	document.theForm.piclink2_prostr.value = "";
	document.theForm.piclink2_url.value = "";
	document.theForm.piclink2_promenu.value = "";
	document.theForm.piclink2_promenutitle.value = "";
		
	document.theForm.piclinkpic3.value = "";
	document.theForm.piclink3_type.value = 0;
	piclink3_typeZZS6(0);
	document.getElementById('piclink3_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=5')><img src='Images/zzs_pro.png' /></div>";
	document.theForm.piclink3_prostr.value = "";
	document.theForm.piclink3_url.value = "";
	document.theForm.piclink3_promenu.value = "";
	document.theForm.piclink3_promenutitle.value = "";
		
	document.theForm.piclinkpic4.value = "";
	document.theForm.piclink4_type.value = 0;
	piclink4_typeZZS6(0);
	document.getElementById('piclink4_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=6')><img src='Images/zzs_pro.png' /></div>";
	document.theForm.piclink4_prostr.value = "";
	document.theForm.piclink4_url.value = "";
	document.theForm.piclink4_promenu.value = "";
	document.theForm.piclink4_promenutitle.value = "";


}	
}

//删除已添加的内容模板
function delZZS(Id){
var url = "Wangpu.zzs.del.asp";
var postStr = "ID="+ Id;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("zzsview"+Id).style.display = "none";
    }
  }	
  
}

//模块向下移一格
function dnZZS(Id){
var M = document.theForm.M.value;

var url = "Wangpu.zzs.dn.asp";
var postStr = "ID="+ Id +"&M="+ M;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("word_count").innerHTML = ajax.responseText;
    }
  }
}

//模块向上移一格
function upZZS(Id){
var M = document.theForm.M.value;

var url = "Wangpu.zzs.up.asp";
var postStr = "ID="+ Id +"&M="+ M;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("word_count").innerHTML = ajax.responseText;
    }
  }
}



//保存装修文本
function saveZZS1(){
var ID = document.theForm.ID1.value;
var M = document.theForm.M.value;
var content = EditorObject.fullHtml();

if (content==""){
 scscms_alert("请填写文本内容","","",1);
 return false;
}

var url = "Wangpu.zzs.1.asp";
var postStr = "ID="+ID+"&M="+M+"&content="+encodeURIComponent(content);

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		EditorObject.html("");
		document.theForm.ID1.value = 0;
    }
  }	
  
}



//修改装修文本
function editZZS1(ID){

var url = "Wangpu.zzs.1.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.theForm.ID1.value = ID;
		EditorObject.html(ajax.responseText);
		
		for(i=1;i<=10;i++){
	
		var div = document.getElementById("zzs_"+i);
        div.style.display=i==1?"block":"none";

        }
    }
  }	
}





//加载更多商品
function zzsProMore(){
var el = document.getElementById('promore');
var li = document.createElement('li');
var sel = document.porlistForm.sel.value;
var key_n_goodsno = document.porlistForm.key_n_goodsno.value;
var lastnum = document.porlistForm.lastnum.value;

var url = "Wangpu.zzs.prolist.more.asp";
var postStr = "sel="+sel+"&key_n_goodsno="+key_n_goodsno+"&lastnum="+lastnum;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
					
    vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
	
    if (v[0]==""){
     scscms_alert("已无商品信息","","",1);
     return false;
    }else{			  					
    li.innerHTML = v[0];
    document.porlistForm.lastnum.value = v[1];
    }
  }
  el.appendChild(li, el.childNodes[0]);
 }

}



//查询商品
function zzsProSearch(){
var sel = document.porlistForm.sel.value;
var key_n_goodsno = document.porlistForm.key_n_goodsno.value;

var key_n_artCount = document.getElementsByName("key_n_art");
var key_n_art=0;
for (var i=0;i<key_n_artCount.length;i++ ){
if(key_n_artCount[i].checked){ //判断复选框是否选中
key_n_art = key_n_artCount[i].value;
}
}

if (key_n_goodsno==""){
 scscms_alert("请输入查找内容","","",1);
 return false;
}

var url = "Wangpu.zzs.prolist.search.asp";
var postStr = "sel="+sel+"&key_n_goodsno="+key_n_goodsno+"&key_n_art="+key_n_art;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
        document.getElementById("promore").innerHTML = v[0];
		document.porlistForm.lastnum.value = v[1];

    }
  }	
}



//选中商品
function zzsprosel(id,pay,title,pic,art){
var prolist = document.getElementById('prolist');
var num = Number(document.theForm.ID2num.value) + 1;

prolist.innerHTML += "<div class='zzs2propic' id='prolist_co"+num+"'><input type='hidden' name='prostr' id='prostr_li"+num+"' value='"+id+"|"+pay+"|"+title+"|"+pic+"|"+art+"'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel("+num+")' /></div>";
document.theForm.ID2num.value = num;

}



//删除选中商品
function zzsproseldel(id){
var prolist_co = document.getElementById('prolist_co'+id);
var prostr_li = document.getElementById('prostr_li'+id);
prolist_co.style.display = "none";
prostr_li.value = "";
}



//添加商品
function saveZZS2(){

var ID = document.theForm.ID2.value;
var M = document.theForm.M.value;

var prostrArr="";

var prostr = document.getElementsByName("prostr");

for(var i=0;i<prostr.length;i++){
	prostrva = prostr[i].value;
	if(prostrva!=""){
        prostrArr = prostrArr+"$$$"+prostr[i].value;
	}
}

var propicrr = document.getElementsByName("propic");
var propic="";
for (var i=0;i<propicrr.length;i++ ){
if(propicrr[i].checked){
propic = propicrr[i].value;
}
}

var protitlerr = document.getElementsByName("protitle");
var protitle="";
for (var i=0;i<protitlerr.length;i++ ){
if(protitlerr[i].checked){
protitle = protitlerr[i].value;
}
}

var propayrr = document.getElementsByName("propay");
var propay="";
for (var i=0;i<propayrr.length;i++ ){
if(propayrr[i].checked){
propay = propayrr[i].value;
}
}

if (prostrArr==""){
 scscms_alert("请选择商品","","",1);
 return false;
}

var url = "Wangpu.zzs.2.asp";
var postStr = "ID="+ID+"&M="+M+"&propic="+propic+"&protitle="+protitle+"&propay="+propay+"&prostrArr="+prostrArr;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		document.getElementById("prolist").innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=1')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.ID2.value = 0;
    }
  }	

}



//修改装修商品
function editZZS2(ID){

var url = "Wangpu.zzs.2.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
		if(vs!=""){
			document.getElementById("prolist").innerHTML = v[0];
			document.theForm.ID2num.value = v[1];
			
			var propicrr = document.getElementsByName("propic");
			for (var i=0;i<propicrr.length;i++ ){
			    if(i == v[2]){
			       propicrr[i].checked=true;
			    }
			}

			if(v[3]==1){document.theForm.protitle.checked=true}else{document.theForm.protitle.checked=false}
			if(v[4]==1){document.theForm.propay.checked=true}else{document.theForm.propay.checked=false}
			
		    document.theForm.ID2.value = ID;
		}
		
		for(i=1;i<=10;i++){	
		    var div = document.getElementById("zzs_"+i);
            div.style.display=i==2?"block":"none";
        }
    }
  }	
}



//广告链接类型选择
function adtypeZZS3(t){
var adtxt1 = document.getElementById("adtxt1");
var adtxt2 = document.getElementById("adtxt2");
var adtxt3 = document.getElementById("adtxt3");
var adtxt4 = document.getElementById("adtxt4");
var adtxt5 = document.getElementById("adtxt5");
if(t==1){
  adtxt1.style.display = "block";
  adtxt2.style.display = "none";
  adtxt3.style.display = "none";
  adtxt4.style.display = "none";
  adtxt5.style.display = "none";
}else if(t==2){
  adtxt1.style.display = "none";
  adtxt2.style.display = "block";
  adtxt3.style.display = "none";
  adtxt4.style.display = "none";
  adtxt5.style.display = "none";
}else if(t==3){
  adtxt1.style.display = "none";
  adtxt2.style.display = "none";
  adtxt3.style.display = "block";
  adtxt4.style.display = "none";
  adtxt5.style.display = "none";
}else if(t==4){
  adtxt1.style.display = "none";
  adtxt2.style.display = "none";
  adtxt3.style.display = "none";
  adtxt4.style.display = "block";
  adtxt5.style.display = "none";
}else if(t==5){
  adtxt1.style.display = "none";
  adtxt2.style.display = "none";
  adtxt3.style.display = "none";
  adtxt4.style.display = "none";
  adtxt5.style.display = "block";
}else{
  adtxt1.style.display = "none";
  adtxt2.style.display = "none";
  adtxt3.style.display = "none";
  adtxt4.style.display = "none";
  adtxt5.style.display = "none";
}
}



//广告选中商品
function zzsprosel2(id,pay,title,pic,art){
var adtxt2 = document.getElementById('adtxt2');

adtxt2.innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=2')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='adprolist_co1'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel2(1)' /></div>";
document.theForm.adprostr.value = id+"|"+pay+"|"+title+"|"+pic+"|"+art;
}


//删除选中商品
function zzsproseldel2(id){
var adprolist_co = document.getElementById('adprolist_co'+id);
adprolist_co.style.display = "none";
document.theForm.adprostr.value = "";
}




//添加广告
function saveZZS3(){

var ID = document.theForm.ID3.value;
var M = document.theForm.M.value;

var adpic = document.theForm.adpic.value;

var adtyperr = document.getElementsByName("adtype");
var adtype="";
for (var i=0;i<adtyperr.length;i++ ){
if(adtyperr[i].checked){
adtype = adtyperr[i].value;
}
}

var adsys = document.theForm.adsys.value;
var adprostr = document.theForm.adprostr.value;
var adurl = document.theForm.adurl.value;
var adpromenu = document.theForm.adpromenu.value;
var adpromenutitle =  document.theForm.adpromenutitle.value;
var adselfpage =  document.theForm.adselfpage.value;

if(adtype==2){
if(adprostr==""){
 scscms_alert("请选择商品","","",1);
 return false;
}
}
if(adtype==3){
if(adurl==""){
 scscms_alert("请填写跳转链接","","",1);
 return false;
}
}


var url = "Wangpu.zzs.3.asp";
var postStr = "ID="+ID+"&M="+M+"&adpic="+adpic+"&adtype="+adtype+"&adsys="+adsys+"&adprostr="+adprostr+"&adurl="+adurl+"&adpromenu="+adpromenu+"&adpromenutitle="+adpromenutitle+"&adselfpage="+adselfpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		document.getElementById("adtxt2").innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=2')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.ID3.value = 0;		
		document.theForm.adpic.value = "";
		document.theForm.adtype.value = 0;
		adtypeZZS3(0);
		document.theForm.adprostr.value = "";
		document.theForm.adurl.value = "";
		document.theForm.adpromenu.value = "";
		document.theForm.adpromenutitle.value = "";
    }
  }	

}


//选中商品类目
function zzspromenusel(menu,title){

document.theForm.adpromenutitle.value = title;
document.theForm.adpromenu.value = menu;

}



//修改装修广告
function editZZS3(ID){

var url = "Wangpu.zzs.3.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
		if(vs!=""){
			
			document.theForm.adpic.value = v[1];
			adtypeZZS3(v[2]);
			
			var adtyperr = document.getElementsByName("adtype");
			for (var i=0;i<adtyperr.length;i++ ){
			    if(i == v[2]){
			       adtyperr[i].checked=true;
				   
				   if(i==1){
					   var adsysrr = document.getElementsByName("adsys"); 
					   for (var x=0;x<adsysrr.length;x++ ){
						   if(adsysrr[x].value==v[3]){adsysrr[x].selected=true;}						   
					   }
				   }
					   
				   if(i==2){
					   p = new Array;
                       p = v[3].split("|");
					   document.theForm.adprostr.value = v[3];
					   document.getElementById("adtxt2").innerHTML = v[0]+"<div class='zzs2propic' id='adprolist_co1'><img src='"+p[3]+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel2(1)' /></div>";
					   }else{document.getElementById("adtxt2").innerHTML = v[0];}
				   
				   if(i==3){document.theForm.adurl.value=v[3]}
				   if(i==4){
					   q = new Array;
                       q = v[3].split("|");
					   document.theForm.adpromenu.value = q[0];
					   document.theForm.adpromenutitle.value = q[1]
					   }
				   if(i==5){document.theForm.adselfpage.value=v[3]}
			    }
			}
			
		    document.theForm.ID3.value = ID;
		}
		
		for(i=1;i<=10;i++){	
		    var div = document.getElementById("zzs_"+i);
            div.style.display=i==3?"block":"none";
        }
    }
  }	
}



//添加标题
function saveZZS4(){

var ID = document.theForm.ID4.value;
var M = document.theForm.M.value;

var tit1 = document.theForm.tit1.value;
var tit2 = document.theForm.tit2.value;

var titcenterrr = document.getElementsByName("titcenter");
var titcenter="";
for (var i=0;i<titcenterrr.length;i++ ){
if(titcenterrr[i].checked){
titcenter = titcenterrr[i].value;
}
}

var titcolor = document.theForm.titcolor.value;
var titcolor2 = document.theForm.titcolor2.value;

if(tit1==""){
 scscms_alert("请填写主标题","","",1);
 return false;
}

var url = "Wangpu.zzs.4.asp";
var postStr = "ID="+ID+"&M="+M+"&tit1="+tit1+"&tit2="+tit2+"&titcenter="+titcenter+"&titcolor="+titcolor+"&titcolor2="+titcolor2;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;

		document.theForm.ID4.value = 0;		
		document.theForm.tit1.value = "";
		document.theForm.tit2.value = "";
		document.theForm.titcenter.value = "center";
		document.theForm.titcolor.value = "";
		document.theForm.titcolor2.value = "";
    }
  }	

}


//修改装修标题
function editZZS4(ID){

var url = "Wangpu.zzs.4.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
		if(vs!=""){
			
			document.theForm.tit1.value = v[0];
			document.theForm.tit2.value = v[1];
			
			var titcenterrr = document.getElementsByName("titcenter");
			for (var i=0;i<titcenterrr.length;i++ ){
			    if(titcenterrr[i].value == v[2]){
			       titcenterrr[i].checked=true;
			    }
			}
			document.theForm.titcolor.value = v[3];
			document.theForm.titcolor2.value = v[4];
		    document.theForm.ID4.value = ID;
		}
		
		for(i=1;i<=10;i++){	
		    var div = document.getElementById("zzs_"+i);
            div.style.display=i==4?"block":"none";
        }
    }
  }	
}




//文字链接类型选择
function adtypeZZS5(t){
var linktxt0 = document.getElementById("linktxt0");
var linktxt1 = document.getElementById("linktxt1");
var linktxt3 = document.getElementById("linktxt3");
var linktxt4 = document.getElementById("linktxt4");
var linktxt5 = document.getElementById("linktxt5");
if(t==1){
  linktxt0.style.display = "none";
  linktxt1.style.display = "block";
  linktxt3.style.display = "none";
  linktxt4.style.display = "none";
  linktxt5.style.display = "none";
}else if(t==3){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt3.style.display = "block"; 
  linktxt4.style.display = "none";
  linktxt5.style.display = "none";
}else if(t==4){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt3.style.display = "none"; 
  linktxt4.style.display = "block";
  linktxt5.style.display = "none";
}else if(t==5){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt3.style.display = "none"; 
  linktxt4.style.display = "none";
  linktxt5.style.display = "block";
}else{
  linktxt0.style.display = "block";
  linktxt1.style.display = "none";
  linktxt3.style.display = "none";
  linktxt4.style.display = "none";
  linktxt5.style.display = "none";
}
}



//选中商品类目
function zzspromenusel2(menu,title){

document.theForm.linkpromenutitle.value = title;
document.theForm.linkpromenu.value = menu;

}


//保存文字链接
function saveZZS5(){

var ID = document.theForm.ID5.value;
var M = document.theForm.M.value;

var linktit = document.theForm.linktit.value;

var linktyperr = document.getElementsByName("linktype");
var linktype="";
for (var i=0;i<linktyperr.length;i++ ){
if(linktyperr[i].checked){
linktype = linktyperr[i].value;
}
}

var linknum = document.theForm.linknum.value;
var linksys = document.theForm.linksys.value;
var linkurl = document.theForm.linkurl.value;
var linkpromenu = document.theForm.linkpromenu.value;
var linkpromenutitle = document.theForm.linkpromenutitle.value;
var linkselfpage = document.theForm.linkselfpage.value;

if(linktit==""){
 scscms_alert("请填写链接名称","","",1);
 return false;
}

var url = "Wangpu.zzs.5.asp";
var postStr = "ID="+ID+"&M="+M+"&linktit="+linktit+"&linktype="+linktype+"&linknum="+linknum+"&linksys="+linksys+"&linkurl="+linkurl+"&linkpromenu="+linkpromenu+"&linkpromenutitle="+linkpromenutitle+"&linkselfpage="+linkselfpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;

		document.theForm.ID5.value = 0;	
		document.theForm.linktit.value = "";	
		document.theForm.linktype.value = 0;
		document.theForm.linknum.value = 5;
		document.theForm.linkurl.value = "";
		document.theForm.linkpromenu.value = "";
		document.theForm.linkpromenutitle.value = "";
    }
  }	

}



//修改文字链接
function editZZS5(ID){

var url = "Wangpu.zzs.5.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
		if(vs!=""){
			
			document.theForm.linktit.value = v[0];
			document.theForm.linktype.value = v[1];
			adtypeZZS5(v[1])
			
			if(v[1]==0){document.theForm.linknum.value = v[2]}
			if(v[1]==1){document.theForm.linksys.value = v[2]}
			if(v[1]==3){document.theForm.linkurl.value = v[2]}
			if(v[1]==4){
				m = new Array;
                m = v[2].split("|");
			    document.theForm.linkpromenu.value = m[0];
			    document.theForm.linkpromenutitle.value = m[1];
			}
			if(v[1]==5){document.theForm.linkselfpage.value = v[2]}
		    document.theForm.ID5.value = ID;
		}
		
		for(i=1;i<=10;i++){	
		    var div = document.getElementById("zzs_"+i);
            div.style.display=i==5?"block":"none";
        }
    }
  }	
}



//图文链接列数选择
function piclinktypeZZS6(t){
var piclinklie1 = document.getElementById("piclinklie1");
var piclinklie2 = document.getElementById("piclinklie2");
if(t==1){
  piclinklie1.style.display = "block";
  piclinklie2.style.display = "none";
}else if(t==2){
  piclinklie1.style.display = "block";
  piclinklie2.style.display = "block";
}else{
  piclinklie1.style.display = "none";
  piclinklie2.style.display = "none";
}
}


//图文链接第1列类型选择
function piclink1_typeZZS6(t){
var piclink1_txt1 = document.getElementById("piclink1_txt1");
var piclink1_txt2 = document.getElementById("piclink1_txt2");
var piclink1_txt3 = document.getElementById("piclink1_txt3");
var piclink1_txt4 = document.getElementById("piclink1_txt4");
var piclink1_txt5 = document.getElementById("piclink1_txt5");
if(t==1){
  piclink1_txt1.style.display = "block";
  piclink1_txt2.style.display = "none";
  piclink1_txt3.style.display = "none";
  piclink1_txt4.style.display = "none";
  piclink1_txt5.style.display = "none";
}else if(t==2){
  piclink1_txt1.style.display = "none";
  piclink1_txt2.style.display = "block";
  piclink1_txt3.style.display = "none";
  piclink1_txt4.style.display = "none";
  piclink1_txt5.style.display = "none";
}else if(t==3){
  piclink1_txt1.style.display = "none";
  piclink1_txt2.style.display = "none";
  piclink1_txt3.style.display = "block";
  piclink1_txt4.style.display = "none";
  piclink1_txt5.style.display = "none";
}else if(t==4){
  piclink1_txt1.style.display = "none";
  piclink1_txt2.style.display = "none";
  piclink1_txt3.style.display = "none";
  piclink1_txt4.style.display = "block";
  piclink1_txt5.style.display = "none";
}else if(t==5){
  piclink1_txt1.style.display = "none";
  piclink1_txt2.style.display = "none";
  piclink1_txt3.style.display = "none";
  piclink1_txt4.style.display = "none";
  piclink1_txt5.style.display = "block";
}else{
  piclink1_txt1.style.display = "none";
  piclink1_txt2.style.display = "none";
  piclink1_txt3.style.display = "none";
  piclink1_txt4.style.display = "none";
  piclink1_txt5.style.display = "none";
}
}


//选中第1列商品
function zzsprosel3(id,pay,title,pic,art){
var piclink1_txt2 = document.getElementById('piclink1_txt2');

piclink1_txt2.innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=3')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink1list_co1'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel3(1)' /></div>";
document.theForm.piclink1_prostr.value = id+"|"+pay+"|"+title+"|"+pic+"|"+art;
}

//删除选中商品
function zzsproseldel3(id){
var piclink1list_co = document.getElementById('piclink1list_co'+id);
piclink1list_co.style.display = "none";
document.theForm.piclink1_prostr.value = "";
}

//选中第1列商品类目
function zzspromenusel3(menu,title){

document.theForm.piclink1_promenutitle.value = title;
document.theForm.piclink1_promenu.value = menu;

}


//图文链接第2列类型选择
function piclink2_typeZZS6(t){
var piclink2_txt1 = document.getElementById("piclink2_txt1");
var piclink2_txt2 = document.getElementById("piclink2_txt2");
var piclink2_txt3 = document.getElementById("piclink2_txt3");
var piclink2_txt4 = document.getElementById("piclink2_txt4");
var piclink2_txt5 = document.getElementById("piclink2_txt5");
if(t==1){
  piclink2_txt1.style.display = "block";
  piclink2_txt2.style.display = "none";
  piclink2_txt3.style.display = "none";
  piclink2_txt4.style.display = "none";
  piclink2_txt5.style.display = "none";
}else if(t==2){
  piclink2_txt1.style.display = "none";
  piclink2_txt2.style.display = "block";
  piclink2_txt3.style.display = "none";
  piclink2_txt4.style.display = "none";
  piclink2_txt5.style.display = "none";
}else if(t==3){
  piclink2_txt1.style.display = "none";
  piclink2_txt2.style.display = "none";
  piclink2_txt3.style.display = "block";
  piclink2_txt4.style.display = "none";
  piclink2_txt5.style.display = "none";
}else if(t==4){
  piclink2_txt1.style.display = "none";
  piclink2_txt2.style.display = "none";
  piclink2_txt3.style.display = "none";
  piclink2_txt4.style.display = "block";
  piclink2_txt5.style.display = "none";
}else if(t==5){
  piclink2_txt1.style.display = "none";
  piclink2_txt2.style.display = "none";
  piclink2_txt3.style.display = "none";
  piclink2_txt4.style.display = "none";
  piclink2_txt5.style.display = "block";
}else{
  piclink2_txt1.style.display = "none";
  piclink2_txt2.style.display = "none";
  piclink2_txt3.style.display = "none";
  piclink2_txt4.style.display = "none";
  piclink2_txt5.style.display = "none";
}
}


//选中第2列商品
function zzsprosel4(id,pay,title,pic,art){
var piclink2_txt2 = document.getElementById('piclink2_txt2');

piclink2_txt2.innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=4')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink2list_co1'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel4(1)' /></div>";
document.theForm.piclink2_prostr.value = id+"|"+pay+"|"+title+"|"+pic+"|"+art;
}

//删除选中商品
function zzsproseldel4(id){
var piclink2list_co = document.getElementById('piclink2list_co'+id);
piclink2list_co.style.display = "none";
document.theForm.piclink2_prostr.value = "";
}

//选中第2列商品类目
function zzspromenusel4(menu,title){

document.theForm.piclink2_promenutitle.value = title;
document.theForm.piclink2_promenu.value = menu;

}


//图文链接第3列类型选择
function piclink3_typeZZS6(t){
var piclink3_txt1 = document.getElementById("piclink3_txt1");
var piclink3_txt2 = document.getElementById("piclink3_txt2");
var piclink3_txt3 = document.getElementById("piclink3_txt3");
var piclink3_txt4 = document.getElementById("piclink3_txt4");
var piclink3_txt5 = document.getElementById("piclink3_txt5");
if(t==1){
  piclink3_txt1.style.display = "block";
  piclink3_txt2.style.display = "none";
  piclink3_txt3.style.display = "none";
  piclink3_txt4.style.display = "none";
  piclink3_txt5.style.display = "none";
}else if(t==2){
  piclink3_txt1.style.display = "none";
  piclink3_txt2.style.display = "block";
  piclink3_txt3.style.display = "none";
  piclink3_txt4.style.display = "none";
  piclink3_txt5.style.display = "none";
}else if(t==3){
  piclink3_txt1.style.display = "none";
  piclink3_txt2.style.display = "none";
  piclink3_txt3.style.display = "block";
  piclink3_txt4.style.display = "none";
  piclink3_txt5.style.display = "none";
}else if(t==4){
  piclink3_txt1.style.display = "none";
  piclink3_txt2.style.display = "none";
  piclink3_txt3.style.display = "none";
  piclink3_txt4.style.display = "block";
  piclink3_txt5.style.display = "none";
}else if(t==5){
  piclink3_txt1.style.display = "none";
  piclink3_txt2.style.display = "none";
  piclink3_txt3.style.display = "none";
  piclink3_txt4.style.display = "none";
  piclink3_txt5.style.display = "block";
}else{
  piclink3_txt1.style.display = "none";
  piclink3_txt2.style.display = "none";
  piclink3_txt3.style.display = "none";
  piclink3_txt4.style.display = "none";
  piclink3_txt5.style.display = "none";
}
}


//选中第3列商品
function zzsprosel5(id,pay,title,pic,art){
var piclink3_txt2 = document.getElementById('piclink3_txt2');

piclink3_txt2.innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=5')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink3list_co1'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel5(1)' /></div>";
document.theForm.piclink3_prostr.value = id+"|"+pay+"|"+title+"|"+pic+"|"+art;
}

//删除选中商品
function zzsproseldel5(id){
var piclink3list_co = document.getElementById('piclink3list_co'+id);
piclink3list_co.style.display = "none";
document.theForm.piclink3_prostr.value = "";
}

//选中第3列商品类目
function zzspromenusel5(menu,title){

document.theForm.piclink3_promenutitle.value = title;
document.theForm.piclink3_promenu.value = menu;

}


//图文链接第4列类型选择
function piclink4_typeZZS6(t){
var piclink4_txt1 = document.getElementById("piclink4_txt1");
var piclink4_txt2 = document.getElementById("piclink4_txt2");
var piclink4_txt3 = document.getElementById("piclink4_txt3");
var piclink4_txt4 = document.getElementById("piclink4_txt4");
var piclink4_txt5 = document.getElementById("piclink4_txt5");
if(t==1){
  piclink4_txt1.style.display = "block";
  piclink4_txt2.style.display = "none";
  piclink4_txt3.style.display = "none";
  piclink4_txt4.style.display = "none";
  piclink4_txt5.style.display = "none";
}else if(t==2){
  piclink4_txt1.style.display = "none";
  piclink4_txt2.style.display = "block";
  piclink4_txt3.style.display = "none";
  piclink4_txt4.style.display = "none";
  piclink4_txt5.style.display = "none";
}else if(t==3){
  piclink4_txt1.style.display = "none";
  piclink4_txt2.style.display = "none";
  piclink4_txt3.style.display = "block";
  piclink4_txt4.style.display = "none";
  piclink4_txt5.style.display = "none";
}else if(t==4){
  piclink4_txt1.style.display = "none";
  piclink4_txt2.style.display = "none";
  piclink4_txt3.style.display = "none";
  piclink4_txt4.style.display = "block";
  piclink4_txt5.style.display = "none";
}else if(t==5){
  piclink4_txt1.style.display = "none";
  piclink4_txt2.style.display = "none";
  piclink4_txt3.style.display = "none";
  piclink4_txt4.style.display = "none";
  piclink4_txt5.style.display = "block";
}else{
  piclink4_txt1.style.display = "none";
  piclink4_txt2.style.display = "none";
  piclink4_txt3.style.display = "none";
  piclink4_txt4.style.display = "none";
  piclink4_txt5.style.display = "none";
}
}


//选中第4列商品
function zzsprosel6(id,pay,title,pic,art){
var piclink4_txt2 = document.getElementById('piclink4_txt2');

piclink4_txt2.innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=6')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink4list_co1'><img src='"+pic+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel6(1)' /></div>";
document.theForm.piclink4_prostr.value = id+"|"+pay+"|"+title+"|"+pic+"|"+art;
}

//删除选中商品
function zzsproseldel6(id){
var piclink4list_co = document.getElementById('piclink4list_co'+id);
piclink4list_co.style.display = "none";
document.theForm.piclink4_prostr.value = "";
}

//选中第4列商品类目
function zzspromenusel6(menu,title){

document.theForm.piclink4_promenutitle.value = title;
document.theForm.piclink4_promenu.value = menu;

}






//保存图片链接
function saveZZS6(){

var ID = document.theForm.ID6.value;
var M = document.theForm.M.value;

var piclinktyperr = document.getElementsByName("piclinktype");
var piclinktype="";
for (var i=0;i<piclinktyperr.length;i++ ){
if(piclinktyperr[i].checked){
piclinktype = piclinktyperr[i].value;
}
}

var piclinkpic1 = document.theForm.piclinkpic1.value;
var piclink1_typerr = document.getElementsByName("piclink1_type");
var piclink1_type="";
for (var i=0;i<piclink1_typerr.length;i++ ){
if(piclink1_typerr[i].checked){
piclink1_type = piclink1_typerr[i].value;
}
}
var piclink1_sys = document.theForm.piclink1_sys.value;
var piclink1_prostr = document.theForm.piclink1_prostr.value;
var piclink1_url = document.theForm.piclink1_url.value;
var piclink1_promenu = document.theForm.piclink1_promenu.value;
var piclink1_promenutitle = document.theForm.piclink1_promenutitle.value;
var piclink1_selfpage = document.theForm.piclink1_selfpage.value;

var piclinkpic2 = document.theForm.piclinkpic2.value;
var piclink2_typerr = document.getElementsByName("piclink2_type");
var piclink2_type="";
for (var i=0;i<piclink2_typerr.length;i++ ){
if(piclink2_typerr[i].checked){
piclink2_type = piclink2_typerr[i].value;
}
}
var piclink2_sys = document.theForm.piclink2_sys.value;
var piclink2_prostr = document.theForm.piclink2_prostr.value;
var piclink2_url = document.theForm.piclink2_url.value;
var piclink2_promenu = document.theForm.piclink2_promenu.value;
var piclink2_promenutitle = document.theForm.piclink2_promenutitle.value;
var piclink2_selfpage = document.theForm.piclink2_selfpage.value;

var piclinkpic3 = document.theForm.piclinkpic3.value;
var piclink3_typerr = document.getElementsByName("piclink3_type");
var piclink3_type="";
for (var i=0;i<piclink3_typerr.length;i++ ){
if(piclink3_typerr[i].checked){
piclink3_type = piclink3_typerr[i].value;
}
}
var piclink3_sys = document.theForm.piclink3_sys.value;
var piclink3_prostr = document.theForm.piclink3_prostr.value;
var piclink3_url = document.theForm.piclink3_url.value;
var piclink3_promenu = document.theForm.piclink3_promenu.value;
var piclink3_promenutitle = document.theForm.piclink3_promenutitle.value;
var piclink3_selfpage = document.theForm.piclink3_selfpage.value;

var piclinkpic4 = document.theForm.piclinkpic4.value;
var piclink4_typerr = document.getElementsByName("piclink4_type");
var piclink4_type="";
for (var i=0;i<piclink4_typerr.length;i++ ){
if(piclink4_typerr[i].checked){
piclink4_type = piclink4_typerr[i].value;
}
}
var piclink4_sys = document.theForm.piclink4_sys.value;
var piclink4_prostr = document.theForm.piclink4_prostr.value;
var piclink4_url = document.theForm.piclink4_url.value;
var piclink4_promenu = document.theForm.piclink4_promenu.value;
var piclink4_promenutitle = document.theForm.piclink4_promenutitle.value;
var piclink4_selfpage = document.theForm.piclink4_selfpage.value;

if(piclinktype>=0){
if(piclinkpic1==""){
 scscms_alert("请上传第1列图","","",1);
 return false;
}
if(piclinkpic2==""){
 scscms_alert("请上传第2列图","","",1);
 return false;
}
}

if(piclinktype>=1){
if(piclinkpic3==""){
 scscms_alert("请上传第3列图","","",1);
 return false;
}
}

if(piclinktype==2){
if(piclinkpic4==""){
 scscms_alert("请上传第4列图","","",1);
 return false;
}
}

var url = "Wangpu.zzs.6.asp";
var postStr = "ID="+ID+"&M="+M+"&piclinktype="+piclinktype+"&piclinkpic1="+piclinkpic1+"&piclink1_type="+piclink1_type+"&piclink1_sys="+piclink1_sys+"&piclink1_prostr="+piclink1_prostr+"&piclink1_url="+piclink1_url+"&piclink1_promenu="+piclink1_promenu+"&piclink1_promenutitle="+piclink1_promenutitle+"&piclink1_selfpage="+piclink1_selfpage+"&piclinkpic2="+piclinkpic2+"&piclink2_type="+piclink2_type+"&piclink2_sys="+piclink2_sys+"&piclink2_prostr="+piclink2_prostr+"&piclink2_url="+piclink2_url+"&piclink2_promenu="+piclink2_promenu+"&piclink2_promenutitle="+piclink2_promenutitle+"&piclink2_selfpage="+piclink2_selfpage+"&piclinkpic3="+piclinkpic3+"&piclink3_type="+piclink3_type+"&piclink3_sys="+piclink3_sys+"&piclink3_prostr="+piclink3_prostr+"&piclink3_url="+piclink3_url+"&piclink3_promenu="+piclink3_promenu+"&piclink3_promenutitle="+piclink3_promenutitle+"&piclink3_selfpage="+piclink3_selfpage+"&piclinkpic4="+piclinkpic4+"&piclink4_type="+piclink4_type+"&piclink4_sys="+piclink4_sys+"&piclink4_prostr="+piclink4_prostr+"&piclink4_url="+piclink4_url+"&piclink4_promenu="+piclink4_promenu+"&piclink4_promenutitle="+piclink4_promenutitle+"&piclink4_selfpage="+piclink4_selfpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;

		document.theForm.ID6.value = 0;			
		document.theForm.piclinktype.value = 0;	
		piclinktypeZZS6(0);	
			
		document.theForm.piclinkpic1.value = "";
		document.theForm.piclink1_type.value = 0;
		piclink1_typeZZS6(0);
		document.getElementById('piclink1_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=3')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.piclink1_prostr.value = "";
		document.theForm.piclink1_url.value = "";
		document.theForm.piclink1_promenu.value = "";
		document.theForm.piclink1_promenutitle.value = "";
		
		document.theForm.piclinkpic2.value = "";
		document.theForm.piclink2_type.value = 0;
		piclink2_typeZZS6(0);
		document.getElementById('piclink2_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=4')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.piclink2_prostr.value = "";
		document.theForm.piclink2_url.value = "";
		document.theForm.piclink2_promenu.value = "";
		document.theForm.piclink2_promenutitle.value = "";
		
		document.theForm.piclinkpic3.value = "";
		document.theForm.piclink3_type.value = 0;
		piclink3_typeZZS6(0);
		document.getElementById('piclink3_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=5')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.piclink3_prostr.value = "";
		document.theForm.piclink3_url.value = "";
		document.theForm.piclink3_promenu.value = "";
		document.theForm.piclink3_promenutitle.value = "";
		
		document.theForm.piclinkpic4.value = "";
		document.theForm.piclink4_type.value = 0;
		piclink4_typeZZS6(0);
		document.getElementById('piclink4_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=6')><img src='Images/zzs_pro.png' /></div>";
		document.theForm.piclink4_prostr.value = "";
		document.theForm.piclink4_url.value = "";
		document.theForm.piclink4_promenu.value = "";
		document.theForm.piclink4_promenutitle.value = "";
    }
  }	

}



//修改图片链接
function editZZS6(ID){

var url = "Wangpu.zzs.6.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
		
		if(vs!=""){
			
			document.theForm.piclinktype.value = v[0];
			piclinktypeZZS6(v[0]);
			
			if(v[0]>=0){
				a = new Array;
                a = v[1].split("|||");
				document.theForm.piclinkpic1.value = a[0];
		        document.theForm.piclink1_type.value = a[1];
		        piclink1_typeZZS6(a[1]);
				if(a[1]==1){document.theForm.piclink1_sys.value = a[2]}
				if(a[1]==2){
				aa = new Array;
                aa = a[2].split("|");
		        document.getElementById('piclink1_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=3')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink1list_co1'><img src='"+aa[3]+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel3(1)' /></div>";
		        document.theForm.piclink1_prostr.value = a[2];
				}
				if(a[1]==3){document.theForm.piclink1_url.value = a[2]}
		        if(a[1]==4){
		        document.theForm.piclink1_promenu.value = a[2];
		        document.theForm.piclink1_promenutitle.value = a[3];
				}
				if(a[1]==5){document.theForm.piclink1_selfpage.value = a[2]}
				
				b = new Array;
                b = v[2].split("|||");
				document.theForm.piclinkpic2.value = b[0];
		        document.theForm.piclink2_type.value = b[1];
		        piclink2_typeZZS6(b[1]);
				if(b[1]==1){document.theForm.piclink2_sys.value = b[2]}
				if(b[1]==2){
				bb = new Array;
                bb = b[2].split("|");
		        document.getElementById('piclink2_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=4')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink2list_co1'><img src='"+bb[3]+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel4(1)' /></div>";
		        document.theForm.piclink2_prostr.value = b[2];
				}
				if(b[1]==3){document.theForm.piclink2_url.value = b[2]}
		        if(b[1]==4){
		        document.theForm.piclink2_promenu.value = b[2];
		        document.theForm.piclink2_promenutitle.value = b[3];
				}
				if(b[1]==5){document.theForm.piclink2_selfpage.value = b[2]}
			}
			if(v[0]>=1){
				c = new Array;
                c = v[3].split("|||");
				document.theForm.piclinkpic3.value = c[0];
		        document.theForm.piclink3_type.value = c[1];
		        piclink3_typeZZS6(c[1]);
				if(c[1]==1){document.theForm.piclink3_sys.value = c[2]}
				if(c[1]==2){
				cc = new Array;
                cc = c[2].split("|");
		        document.getElementById('piclink3_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=5')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink3list_co1'><img src='"+cc[3]+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel5(1)' /></div>";
		        document.theForm.piclink3_prostr.value = c[2];
				}
				if(c[1]==3){document.theForm.piclink3_url.value = c[2]}
		        if(c[1]==4){
		        document.theForm.piclink3_promenu.value = c[2];
		        document.theForm.piclink3_promenutitle.value = c[3];
				}
				if(c[1]==5){document.theForm.piclink3_selfpage.value = c[2]}
			}
			if(v[0]==2){
				d = new Array;
                d = v[4].split("|||");
				document.theForm.piclinkpic4.value = d[0];
		        document.theForm.piclink4_type.value = d[1];
		        piclink4_typeZZS6(d[1]);
				if(d[1]==1){document.theForm.piclink4_sys.value = d[2]}
				if(d[1]==2){
				dd = new Array;
                dd = d[2].split("|");
		        document.getElementById('piclink4_txt2').innerHTML = "<div class='zzs2pro' onClick=showDiv('addDiv',600,400,'Wangpu.zzs.prolist.asp','sel=6')><img src='Images/zzs_pro.png' /></div><div class='zzs2propic' id='piclink3list_co1'><img src='"+dd[3]+"' width='40' height='40' style='border-radius:3px;' /><img src='images/icon/close.gif' style='position:absolute; top:1px; right:1px;' onClick='zzsproseldel6(1)' /></div>";
		        document.theForm.piclink4_prostr.value = d[2];
				}
				if(d[1]==3){document.theForm.piclink4_url.value = d[2]}
		        if(d[1]==4){
		        document.theForm.piclink4_promenu.value = d[2];
		        document.theForm.piclink4_promenutitle.value = d[3];
				}
				if(d[1]==5){document.theForm.piclink4_selfpage.value = d[2]}
			}
		    document.theForm.ID6.value = ID;
		}
		
		for(i=1;i<=10;i++){	
		    var div = document.getElementById("zzs_"+i);
            div.style.display=i==6?"block":"none";
        }
    }
  }	
}






//保存搜索框
function saveZZS7(){
var ID = document.theForm.ID7.value;
var M = document.theForm.M.value;
var searchcolor = document.theForm.searchcolor.value;

if (searchcolor==""){
 scscms_alert("请选择边框色","","",1);
 return false;
}

var url = "Wangpu.zzs.7.asp";
var postStr = "ID="+ID+"&M="+M+"&searchcolor="+searchcolor;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		document.theForm.searchcolor.value = "";
		document.theForm.ID7.value = 0;
    }
  }	
  
}



//修改搜索框
function editZZS7(ID){

var url = "Wangpu.zzs.7.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.theForm.ID7.value = ID;
		document.theForm.searchcolor.value = ajax.responseText;
		
		for(i=1;i<=10;i++){
	
		var div = document.getElementById("zzs_"+i);
        div.style.display=i==7?"block":"none";

        }
    }
  }	
}






//保存辅助线
function saveZZS8(){
var ID = document.theForm.ID8.value;
var M = document.theForm.M.value;
var linecolor = document.theForm.linecolor.value;

if (linecolor==""){
 scscms_alert("请选择辅助线颜色","","",1);
 return false;
}

var url = "Wangpu.zzs.8.asp";
var postStr = "ID="+ID+"&M="+M+"&linecolor="+linecolor;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		document.theForm.linecolor.value = "";
		document.theForm.ID8.value = 0;
    }
  }	
  
}



//修改辅助线
function editZZS8(ID){

var url = "Wangpu.zzs.8.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.theForm.ID8.value = ID;
		document.theForm.linecolor.value = ajax.responseText;
		
		for(i=1;i<=10;i++){
	
		var div = document.getElementById("zzs_"+i);
        div.style.display=i==8?"block":"none";

        }
    }
  }	
}







//保存空白
function saveZZS9(){
var ID = document.theForm.ID9.value;
var M = document.theForm.M.value;
var kongheight = document.theForm.kongheight.value;
var kongcolor = document.theForm.kongcolor.value;

if (kongheight==""){
 scscms_alert("请填写空白高度","","",1);
 return false;
}

var url = "Wangpu.zzs.9.asp";
var postStr = "ID="+ID+"&M="+M+"&kongheight="+kongheight+"&kongcolor="+kongcolor;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count").innerHTML = ajax.responseText;
		document.theForm.kongheight.value = "";
		document.theForm.kongcolor.value = "";
		document.theForm.ID9.value = 0;
    }
  }	
  
}



//修改空白
function editZZS9(ID){

var url = "Wangpu.zzs.9.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID9.value = ID;
		document.theForm.kongheight.value = v[0];
		document.theForm.kongcolor.value = v[1];
		
		for(i=1;i<=10;i++){
	
		var div = document.getElementById("zzs_"+i);
        div.style.display=i==9?"block":"none";

        }
    }
  }	
}



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var zzsdhcount = 25;


//装修导航切换
function setZzsDHDiv(cursel){
for(i=1;i<=zzsdhcount;i++){
	
var div = document.getElementById("zzsdh_"+i);
    div.style.display=i==cursel?"block":"none";
	
	//清空自定义
	document.theForm.ID2.value = 0;
	document.theForm.selfpic.value = "";
    document.theForm.selfpage.value = "";
	
	//清空分销加盟
	document.theForm.ID3.value = 0;
	document.theForm.fanspic.value = "";
	
	//清空多级推广
	document.theForm.ID4.value = 0;
	document.theForm.pushpic.value = "";
	
	//清空商品类目
	document.theForm.ID5.value = 0;
	document.theForm.shopmenupic.value = "";
	
	//清空所有商品
	document.theForm.ID6.value = 0;
	document.theForm.shoppic.value = "";
	
	//清空限时商品
	document.theForm.ID7.value = 0;
	document.theForm.gamepic.value = "";
	
	//清空砍价商品
	document.theForm.ID8.value = 0;
	document.theForm.kanpic.value = "";
	
	//清空购物车
	document.theForm.ID9.value = 0;
	document.theForm.buypic.value = "";
	
	//清空订单
	document.theForm.ID10.value = 0;
	document.theForm.paypic.value = "";
	
	//清空会员卡
	document.theForm.ID11.value = 0;
	document.theForm.kapic.value = "";
	
	//清空社区
	document.theForm.ID12.value = 0;
	document.theForm.snspic.value = "";
	
	//清空联系掌柜
	document.theForm.ID13.value = 0;
	document.theForm.messpic.value = "";
	
	//清空附近商户
	document.theForm.ID14.value = 0;
	document.theForm.nearpic.value = "";
	
	//清空收藏
	document.theForm.ID15.value = 0;
	document.theForm.favoritespic.value = "";
	
	//清空金币
	document.theForm.ID16.value = 0;
	document.theForm.jinbipic.value = "";
	
	//清空签到
	document.theForm.ID17.value = 0;
	document.theForm.chinkinpic.value = "";
	
	//清空优惠买单
	document.theForm.ID18.value = 0;
	document.theForm.checkpic.value = "";
	
	//清空首页
	document.theForm.ID19.value = 0;
	document.theForm.aboutpic.value = "";
	
	//清空预约
	document.theForm.ID20.value = 0;
	document.theForm.bookingpic.value = "";
	
	//清空摇奖
	document.theForm.ID21.value = 0;
	document.theForm.erniepic.value = "";
	
	//清空附近商户
	document.theForm.ID22.value = 0;
	document.theForm.nearshoppic.value = "";
	
	//清空入驻
	document.theForm.ID23.value = 0;
	document.theForm.regpic.value = "";
	
	//清空夺宝
	document.theForm.ID24.value = 0;
	document.theForm.baopic.value = "";

}	
}

//删除已添加的内容模板
function delZZSDH(Id){
var url = "Wangpu.zzs.dh.del.asp";
var postStr = "ID="+ Id;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("zzsdhview"+Id).style.display = "none";
    }
  }	
  
}

//模块向下移一格
function dnZZSDH(Id){
var M = document.theForm.M.value;

var url = "Wangpu.zzs.dh.dn.asp";
var postStr = "ID="+ Id +"&M="+ M;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("word_count_dh").innerHTML = ajax.responseText;
    }
  }
}

//模块向上移一格
function upZZSDH(Id){
var M = document.theForm.M.value;

var url = "Wangpu.zzs.dh.up.asp";
var postStr = "ID="+ Id +"&M="+ M;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		document.getElementById("word_count_dh").innerHTML = ajax.responseText;
    }
  }
}




//背景色选项卡
function bgcolor_typeZZSDH1(t){
var bgcolor_txt1 = document.getElementById("bgcolor_txt1");
var bgcolor_txt2 = document.getElementById("bgcolor_txt2");
if(t==1){
  bgcolor_txt1.style.display = "none";
  bgcolor_txt2.style.display = "block";
}else{
  bgcolor_txt1.style.display = "block";
  bgcolor_txt2.style.display = "none";
}
}




//保存背景
function saveZZSDH1(){

var bgcolortyperr = document.getElementsByName("bgcolortype");
var bgcolortype="";
for (var i=0;i<bgcolortyperr.length;i++ ){
if(bgcolortyperr[i].checked){
bgcolortype = bgcolortyperr[i].value;
}
}

var bgcolorpic = document.theForm.bgcolorpic.value;
var bgcolorfont = document.theForm.bgcolorfont.value;

if (bgcolortype==0){
if (bgcolorpic==""){
 scscms_alert("请上传背景图","","",1);
 return false;
}
}
if (bgcolortype==1){
if (bgcolorfont==""){
 scscms_alert("请选择背景色","","",1);
 return false;
}
}

var url = "Wangpu.zzs.dh.1.asp";
var postStr = "bgcolortype="+bgcolortype+"&bgcolorpic="+bgcolorpic+"&bgcolorfont="+bgcolorfont;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        scscms_alert('已保存','ok',function(){location.href = 'Wangpu.zzs.dh.asp'});
    }
  }	
  
}




//保存自定义
function saveZZSDH2(){
var ID = document.theForm.ID2.value;
var M = document.theForm.M.value;

var selfpic = document.theForm.selfpic.value;
var selfpage = document.theForm.selfpage.value;

if (selfpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.2.asp";
var postStr = "ID="+ID+"&M="+M+"&selfpic="+selfpic+"&selfpage="+selfpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.selfpic.value = "";
		document.theForm.ID2.value = 0;
    }
  }	
  
}


//修改自定义
function editZZSDH2(ID){

var url = "Wangpu.zzs.dh.2.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID2.value = ID;
		document.theForm.selfpic.value = v[0];
		document.theForm.selfpage.value = v[1];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==2?"block":"none";
        }
    }
  }	
}





//保存分销加盟
function saveZZSDH3(){
var ID = document.theForm.ID3.value;
var M = document.theForm.M.value;

var fanspic = document.theForm.fanspic.value;
var fanspage = document.theForm.fanspage.value;

if (fanspic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.3.asp";
var postStr = "ID="+ID+"&M="+M+"&fanspic="+fanspic+"&fanspage="+fanspage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.fanspic.value = "";
		document.theForm.ID3.value = 0;
    }
  }	
  
}


//修改分销加盟
function editZZSDH3(ID){

var url = "Wangpu.zzs.dh.3.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID3.value = ID;
		document.theForm.fanspic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==3?"block":"none";
        }
    }
  }	
}






//保存多级推广
function saveZZSDH4(){
var ID = document.theForm.ID4.value;
var M = document.theForm.M.value;

var pushpic = document.theForm.pushpic.value;
var pushpage = document.theForm.pushpage.value;

if (pushpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.4.asp";
var postStr = "ID="+ID+"&M="+M+"&pushpic="+pushpic+"&pushpage="+pushpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.pushpic.value = "";
		document.theForm.ID4.value = 0;
    }
  }	
  
}


//修改多级推广
function editZZSDH4(ID){

var url = "Wangpu.zzs.dh.4.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID4.value = ID;
		document.theForm.pushpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==4?"block":"none";
        }
    }
  }	
}






//保存商品类目
function saveZZSDH5(){
var ID = document.theForm.ID5.value;
var M = document.theForm.M.value;

var shopmenupic = document.theForm.shopmenupic.value;
var shopmenupage = document.theForm.shopmenupage.value;

if (shopmenupic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.5.asp";
var postStr = "ID="+ID+"&M="+M+"&shopmenupic="+shopmenupic+"&shopmenupage="+shopmenupage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.shopmenupic.value = "";
		document.theForm.ID5.value = 0;
    }
  }	
  
}


//修改商品类目
function editZZSDH5(ID){

var url = "Wangpu.zzs.dh.5.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID5.value = ID;
		document.theForm.shopmenupic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==5?"block":"none";
        }
    }
  }	
}






//保存所有商品
function saveZZSDH6(){
var ID = document.theForm.ID6.value;
var M = document.theForm.M.value;

var shoppic = document.theForm.shoppic.value;
var shoppage = document.theForm.shoppage.value;

if (shoppic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.6.asp";
var postStr = "ID="+ID+"&M="+M+"&shoppic="+shoppic+"&shoppage="+shoppage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.shoppic.value = "";
		document.theForm.ID6.value = 0;
    }
  }	
  
}


//修改所有商品
function editZZSDH6(ID){

var url = "Wangpu.zzs.dh.6.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID6.value = ID;
		document.theForm.shoppic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==6?"block":"none";
        }
    }
  }	
}






//保存限时商品
function saveZZSDH7(){
var ID = document.theForm.ID7.value;
var M = document.theForm.M.value;

var gamepic = document.theForm.gamepic.value;
var gamepage = document.theForm.gamepage.value;

if (gamepic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.7.asp";
var postStr = "ID="+ID+"&M="+M+"&gamepic="+gamepic+"&gamepage="+gamepage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.gamepic.value = "";
		document.theForm.ID7.value = 0;
    }
  }	
  
}


//修改限时商品
function editZZSDH7(ID){

var url = "Wangpu.zzs.dh.7.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID7.value = ID;
		document.theForm.gamepic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==7?"block":"none";
        }
    }
  }	
}






//保存砍价商品
function saveZZSDH8(){
var ID = document.theForm.ID8.value;
var M = document.theForm.M.value;

var kanpic = document.theForm.kanpic.value;
var kanpage = document.theForm.kanpage.value;

if (kanpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.8.asp";
var postStr = "ID="+ID+"&M="+M+"&kanpic="+kanpic+"&kanpage="+kanpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.kanpic.value = "";
		document.theForm.ID8.value = 0;
    }
  }	
  
}


//修改砍价商品
function editZZSDH8(ID){

var url = "Wangpu.zzs.dh.8.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID8.value = ID;
		document.theForm.kanpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==8?"block":"none";
        }
    }
  }	
}






//保存购物车
function saveZZSDH9(){
var ID = document.theForm.ID9.value;
var M = document.theForm.M.value;

var buypic = document.theForm.buypic.value;
var buypage = document.theForm.buypage.value;

if (buypic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.9.asp";
var postStr = "ID="+ID+"&M="+M+"&buypic="+buypic+"&buypage="+buypage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.buypic.value = "";
		document.theForm.ID9.value = 0;
    }
  }	
  
}


//修改购物车
function editZZSDH9(ID){

var url = "Wangpu.zzs.dh.9.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID9.value = ID;
		document.theForm.buypic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==9?"block":"none";
        }
    }
  }	
}






//保存订单
function saveZZSDH10(){
var ID = document.theForm.ID10.value;
var M = document.theForm.M.value;

var paypic = document.theForm.paypic.value;
var paypage = document.theForm.paypage.value;

if (paypic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.10.asp";
var postStr = "ID="+ID+"&M="+M+"&paypic="+paypic+"&paypage="+paypage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.paypic.value = "";
		document.theForm.ID10.value = 0;
    }
  }	
  
}


//修改订单
function editZZSDH10(ID){

var url = "Wangpu.zzs.dh.10.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID10.value = ID;
		document.theForm.paypic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==10?"block":"none";
        }
    }
  }	
}






//保存会员卡
function saveZZSDH11(){
var ID = document.theForm.ID11.value;
var M = document.theForm.M.value;

var kapic = document.theForm.kapic.value;
var kapage = document.theForm.kapage.value;

if (kapic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.11.asp";
var postStr = "ID="+ID+"&M="+M+"&kapic="+kapic+"&kapage="+kapage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.kapic.value = "";
		document.theForm.ID11.value = 0;
    }
  }	
  
}


//修改会员卡
function editZZSDH11(ID){

var url = "Wangpu.zzs.dh.11.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID11.value = ID;
		document.theForm.kapic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==11?"block":"none";
        }
    }
  }	
}






//保存社区
function saveZZSDH12(){
var ID = document.theForm.ID12.value;
var M = document.theForm.M.value;

var snspic = document.theForm.snspic.value;
var snspage = document.theForm.snspage.value;

if (snspic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.12.asp";
var postStr = "ID="+ID+"&M="+M+"&snspic="+snspic+"&snspage="+snspage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.snspic.value = "";
		document.theForm.ID12.value = 0;
    }
  }	
  
}


//修改社区
function editZZSDH12(ID){

var url = "Wangpu.zzs.dh.12.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID12.value = ID;
		document.theForm.snspic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==12?"block":"none";
        }
    }
  }	
}






//保存联系掌柜
function saveZZSDH13(){
var ID = document.theForm.ID13.value;
var M = document.theForm.M.value;

var messpic = document.theForm.messpic.value;
var messpage = document.theForm.messpage.value;

if (messpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.13.asp";
var postStr = "ID="+ID+"&M="+M+"&messpic="+messpic+"&messpage="+messpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.messpic.value = "";
		document.theForm.ID13.value = 0;
    }
  }	
  
}


//修改联系掌柜
function editZZSDH13(ID){

var url = "Wangpu.zzs.dh.13.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID13.value = ID;
		document.theForm.messpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==13?"block":"none";
        }
    }
  }	
}






//保存附近商户
function saveZZSDH14(){
var ID = document.theForm.ID14.value;
var M = document.theForm.M.value;

var nearpic = document.theForm.nearpic.value;
var nearpage = document.theForm.nearpage.value;

if (nearpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.14.asp";
var postStr = "ID="+ID+"&M="+M+"&nearpic="+nearpic+"&nearpage="+nearpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.nearpic.value = "";
		document.theForm.ID14.value = 0;
    }
  }	
  
}


//修改附近商户
function editZZSDH14(ID){

var url = "Wangpu.zzs.dh.14.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID14.value = ID;
		document.theForm.nearpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==14?"block":"none";
        }
    }
  }	
}


//保存收藏
function saveZZSDH15(){
var ID = document.theForm.ID15.value;
var M = document.theForm.M.value;

var favoritespic = document.theForm.favoritespic.value;
var favoritespage = document.theForm.favoritespage.value;

if (favoritespic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.15.asp";
var postStr = "ID="+ID+"&M="+M+"&favoritespic="+favoritespic+"&favoritespage="+favoritespage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.favoritespic.value = "";
		document.theForm.ID15.value = 0;
    }
  }	
  
}


//修改收藏
function editZZSDH15(ID){

var url = "Wangpu.zzs.dh.15.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID15.value = ID;
		document.theForm.favoritespic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==15?"block":"none";
        }
    }
  }	
}


//保存金币
function saveZZSDH16(){
var ID = document.theForm.ID16.value;
var M = document.theForm.M.value;

var jinbipic = document.theForm.jinbipic.value;
var jinbipage = document.theForm.jinbipage.value;

if (jinbipic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.16.asp";
var postStr = "ID="+ID+"&M="+M+"&jinbipic="+jinbipic+"&jinbipage="+jinbipage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.jinbipic.value = "";
		document.theForm.ID16.value = 0;
    }
  }	
  
}


//修改金币
function editZZSDH16(ID){

var url = "Wangpu.zzs.dh.16.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID16.value = ID;
		document.theForm.jinbipic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==16?"block":"none";
        }
    }
  }	
}


//保存签到
function saveZZSDH17(){
var ID = document.theForm.ID17.value;
var M = document.theForm.M.value;

var chinkinpic = document.theForm.chinkinpic.value;
var chinkinpage = document.theForm.chinkinpage.value;

if (chinkinpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.17.asp";
var postStr = "ID="+ID+"&M="+M+"&chinkinpic="+chinkinpic+"&chinkinpage="+chinkinpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.chinkinpic.value = "";
		document.theForm.ID17.value = 0;
    }
  }	
  
}


//修改签到
function editZZSDH17(ID){

var url = "Wangpu.zzs.dh.17.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID17.value = ID;
		document.theForm.chinkinpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==17?"block":"none";
        }
    }
  }	
}


//保存签到
function saveZZSDH18(){
var ID = document.theForm.ID18.value;
var M = document.theForm.M.value;

var checkpic = document.theForm.checkpic.value;
var checkpage = document.theForm.checkpage.value;

if (checkpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.18.asp";
var postStr = "ID="+ID+"&M="+M+"&checkpic="+checkpic+"&checkpage="+checkpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.checkpic.value = "";
		document.theForm.ID18.value = 0;
    }
  }	
  
}


//修改签到
function editZZSDH18(ID){

var url = "Wangpu.zzs.dh.18.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID18.value = ID;
		document.theForm.checkpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==18?"block":"none";
        }
    }
  }	
}


//保存首页
function saveZZSDH19(){
var ID = document.theForm.ID19.value;
var M = document.theForm.M.value;

var aboutpic = document.theForm.aboutpic.value;
var aboutpage = document.theForm.aboutpage.value;

if (aboutpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.19.asp";
var postStr = "ID="+ID+"&M="+M+"&aboutpic="+aboutpic+"&aboutpage="+aboutpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.aboutpic.value = "";
		document.theForm.ID19.value = 0;
    }
  }	
  
}


//修改签到
function editZZSDH19(ID){

var url = "Wangpu.zzs.dh.19.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID19.value = ID;
		document.theForm.aboutpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==19?"block":"none";
        }
    }
  }	
}


//保存预约
function saveZZSDH20(){
var ID = document.theForm.ID20.value;
var M = document.theForm.M.value;

var bookingpic = document.theForm.bookingpic.value;
var bookingpage = document.theForm.bookingpage.value;

if (bookingpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.20.asp";
var postStr = "ID="+ID+"&M="+M+"&bookingpic="+bookingpic+"&bookingpage="+bookingpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.bookingpic.value = "";
		document.theForm.ID20.value = 0;
    }
  }	
  
}


//修改签到
function editZZSDH20(ID){

var url = "Wangpu.zzs.dh.20.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID20.value = ID;
		document.theForm.bookingpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==20?"block":"none";
        }
    }
  }	
}


//保存摇奖
function saveZZSDH21(){
var ID = document.theForm.ID21.value;
var M = document.theForm.M.value;

var erniepic = document.theForm.erniepic.value;
var erniepage = document.theForm.erniepage.value;

if (erniepic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.21.asp";
var postStr = "ID="+ID+"&M="+M+"&erniepic="+erniepic+"&erniepage="+erniepage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.erniepic.value = "";
		document.theForm.ID21.value = 0;
    }
  }	
  
}


//修改签到
function editZZSDH21(ID){

var url = "Wangpu.zzs.dh.21.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID21.value = ID;
		document.theForm.erniepic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==21?"block":"none";
        }
    }
  }	
}


//保存附近商家
function saveZZSDH22(){
var ID = document.theForm.ID22.value;
var M = document.theForm.M.value;

var nearshoppic = document.theForm.nearshoppic.value;
var nearshoppage = document.theForm.nearshoppage.value;

if (nearshoppic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.22.asp";
var postStr = "ID="+ID+"&M="+M+"&nearshoppic="+nearshoppic+"&nearshoppage="+nearshoppage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.nearshoppic.value = "";
		document.theForm.ID22.value = 0;
    }
  }	
  
}


//修改附近商家
function editZZSDH22(ID){

var url = "Wangpu.zzs.dh.22.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID22.value = ID;
		document.theForm.nearshoppic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==22?"block":"none";
        }
    }
  }	
}




//保存入驻
function saveZZSDH23(){
var ID = document.theForm.ID23.value;
var M = document.theForm.M.value;

var regpic = document.theForm.regpic.value;
var regpage = document.theForm.regpage.value;

if (regpic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.23.asp";
var postStr = "ID="+ID+"&M="+M+"&regpic="+regpic+"&regpage="+regpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.regpic.value = "";
		document.theForm.ID23.value = 0;
    }
  }	
  
}


//修改入驻
function editZZSDH23(ID){

var url = "Wangpu.zzs.dh.23.edit.asp";
var postStr = "ID="+ID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
		vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
			
        document.theForm.ID23.value = ID;
		document.theForm.regpic.value = v[0];
		
		for(i=1;i<=zzsdhcount;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==23?"block":"none";
        }
    }
  }	
}




//保存夺宝
function saveZZSDH24(){
var ID = document.theForm.ID23.value;
var M = document.theForm.M.value;

var baopic = document.theForm.baopic.value;
var baopage = document.theForm.baopage.value;

if (baopic==""){
 scscms_alert("请上传图片","","",1);
 return false;
}

var url = "Wangpu.zzs.dh.24.asp";
var postStr = "ID="+ID+"&M="+M+"&baopic="+baopic+"&baopage="+baopage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("word_count_dh").innerHTML = ajax.responseText;
		document.theForm.baopic.value = "";
		document.theForm.ID24.value = 0;
    }
  }	
  
}







//底部类型选项卡
function menu_typeZZSDH25(t){
var wxmenu_info1 = document.getElementById("wxmenu_info1");
var wxmenu_info2 = document.getElementById("wxmenu_info2");

if(t==1){
  wxmenu_info1.style.display = "block";
  wxmenu_info2.style.display = "none";
}else if(t==2){
  wxmenu_info1.style.display = "none";
  wxmenu_info2.style.display = "block";	
}else{
  wxmenu_info1.style.display = "none";
  wxmenu_info2.style.display = "none";
}
}

//背景色选项卡
function bgcolor_typeZZSDH25(t){
var wxmenu2_txt1 = document.getElementById("wxmenu2_txt1");
var wxmenu2_txt2 = document.getElementById("wxmenu2_txt2");
if(t==1){
  wxmenu2_txt1.style.display = "none";
  wxmenu2_txt2.style.display = "block";
}else{
  wxmenu2_txt1.style.display = "block";
  wxmenu2_txt2.style.display = "none";
}
}


//保存导航位置
function saveZZSDH25(){

var wxmenurr = document.getElementsByName("wxmenu");
var wxmenu="";
for (var i=0;i<wxmenurr.length;i++ ){
if(wxmenurr[i].checked){
wxmenu = wxmenurr[i].value;
}
}

var wxmenu1pic = document.theForm.wxmenu1pic.value;

if(wxmenu==1){
if(wxmenu1pic==""){
 scscms_alert("请上传导航图片","","",1);
 return false;
}	
}

var wxmenu2typerr = document.getElementsByName("wxmenu2type");
var wxmenu2type="";
for (var i=0;i<wxmenu2typerr.length;i++ ){
if(wxmenu2typerr[i].checked){
wxmenu2type = wxmenu2typerr[i].value;
}
}

var wxmenu2pic = document.theForm.wxmenu2pic.value;
var wxmenu2font = document.theForm.wxmenu2font.value;

var piclinkpic1 = document.theForm.piclinkpic1.value;
var piclink1_typerr = document.getElementsByName("piclink1_type");
var piclink1_type="";
for (var i=0;i<piclink1_typerr.length;i++ ){
if(piclink1_typerr[i].checked){
piclink1_type = piclink1_typerr[i].value;
}
}
var piclink1_sys = document.theForm.piclink1_sys.value;
var piclink1_prostr = document.theForm.piclink1_prostr.value;
var piclink1_url = document.theForm.piclink1_url.value;
var piclink1_promenu = document.theForm.piclink1_promenu.value;
var piclink1_promenutitle = document.theForm.piclink1_promenutitle.value;
var piclink1_selfpage = document.theForm.piclink1_selfpage.value;

var piclinkpic2 = document.theForm.piclinkpic2.value;
var piclink2_typerr = document.getElementsByName("piclink2_type");
var piclink2_type="";
for (var i=0;i<piclink2_typerr.length;i++ ){
if(piclink2_typerr[i].checked){
piclink2_type = piclink2_typerr[i].value;
}
}
var piclink2_sys = document.theForm.piclink2_sys.value;
var piclink2_prostr = document.theForm.piclink2_prostr.value;
var piclink2_url = document.theForm.piclink2_url.value;
var piclink2_promenu = document.theForm.piclink2_promenu.value;
var piclink2_promenutitle = document.theForm.piclink2_promenutitle.value;
var piclink2_selfpage = document.theForm.piclink2_selfpage.value;

var piclinkpic3 = document.theForm.piclinkpic3.value;
var piclink3_typerr = document.getElementsByName("piclink3_type");
var piclink3_type="";
for (var i=0;i<piclink3_typerr.length;i++ ){
if(piclink3_typerr[i].checked){
piclink3_type = piclink3_typerr[i].value;
}
}
var piclink3_sys = document.theForm.piclink3_sys.value;
var piclink3_prostr = document.theForm.piclink3_prostr.value;
var piclink3_url = document.theForm.piclink3_url.value;
var piclink3_promenu = document.theForm.piclink3_promenu.value;
var piclink3_promenutitle = document.theForm.piclink3_promenutitle.value;
var piclink3_selfpage = document.theForm.piclink3_selfpage.value;

var piclinkpic4 = document.theForm.piclinkpic4.value;
var piclink4_typerr = document.getElementsByName("piclink4_type");
var piclink4_type="";
for (var i=0;i<piclink4_typerr.length;i++ ){
if(piclink4_typerr[i].checked){
piclink4_type = piclink4_typerr[i].value;
}
}
var piclink4_sys = document.theForm.piclink4_sys.value;
var piclink4_prostr = document.theForm.piclink4_prostr.value;
var piclink4_url = document.theForm.piclink4_url.value;
var piclink4_promenu = document.theForm.piclink4_promenu.value;
var piclink4_promenutitle = document.theForm.piclink4_promenutitle.value;
var piclink4_selfpage = document.theForm.piclink4_selfpage.value;

if(wxmenu==2){

if(wxmenu2type==0){
  if(wxmenu2pic==""){
   scscms_alert("请上传背景图","","",1);
   return false;
  }
}

if(wxmenu2type==1){
  if(wxmenu2font==""){
   scscms_alert("请填写背景色","","",1);
   return false;
  }
}

if(piclinkpic1==""){
 scscms_alert("请上传第1按钮图","","",1);
 return false;
}
if(piclinkpic2==""){
 scscms_alert("请上传第2按钮图","","",1);
 return false;
}

if(piclinkpic3==""){
 scscms_alert("请上传第3按钮图","","",1);
 return false;
}

if(piclinkpic4==""){
 scscms_alert("请上传第4按钮图","","",1);
 return false;
}
	
}

var url = "Wangpu.zzs.dh.25.asp";
var postStr = "wxmenu="+wxmenu+"&wxmenu1pic="+wxmenu1pic+"&wxmenu2type="+wxmenu2type+"&wxmenu2pic="+wxmenu2pic+"&wxmenu2font="+wxmenu2font+"&piclinkpic1="+piclinkpic1+"&piclink1_type="+piclink1_type+"&piclink1_sys="+piclink1_sys+"&piclink1_prostr="+piclink1_prostr+"&piclink1_url="+piclink1_url+"&piclink1_promenu="+piclink1_promenu+"&piclink1_promenutitle="+piclink1_promenutitle+"&piclink1_selfpage="+piclink1_selfpage+"&piclinkpic2="+piclinkpic2+"&piclink2_type="+piclink2_type+"&piclink2_sys="+piclink2_sys+"&piclink2_prostr="+piclink2_prostr+"&piclink2_url="+piclink2_url+"&piclink2_promenu="+piclink2_promenu+"&piclink2_promenutitle="+piclink2_promenutitle+"&piclink2_selfpage="+piclink2_selfpage+"&piclinkpic3="+piclinkpic3+"&piclink3_type="+piclink3_type+"&piclink3_sys="+piclink3_sys+"&piclink3_prostr="+piclink3_prostr+"&piclink3_url="+piclink3_url+"&piclink3_promenu="+piclink3_promenu+"&piclink3_promenutitle="+piclink3_promenutitle+"&piclink3_selfpage="+piclink3_selfpage+"&piclinkpic4="+piclinkpic4+"&piclink4_type="+piclink4_type+"&piclink4_sys="+piclink4_sys+"&piclink4_prostr="+piclink4_prostr+"&piclink4_url="+piclink4_url+"&piclink4_promenu="+piclink4_promenu+"&piclink4_promenutitle="+piclink4_promenutitle+"&piclink4_selfpage="+piclink4_selfpage;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        scscms_alert('已保存','ok',function(){location.href = 'Wangpu.zzs.dh.asp'});
    }
  }	
  
}




/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//发送微信通知
function SendWXTemp(tag,w,h,url,postStr){
	
var selrr = document.getElementsByName("sel");
var selall="";
for (var i=0;i<selrr.length;i++ ){
	if(selrr[i].checked){ //判断单选框是否选中
	//sel = selrr[i].value;
	selall = selall+","+selrr[i].value;
	}
}
	
var postStr2 = "selall="+selall+"&"+postStr;

var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');

light.style.display='block';

light.style.width=w+"px";
light.style.height=h+"px";
light.style.marginLeft=-Math.round(w/2)+"px";
light.style.marginTop=-Math.round(h/2)+"px";

Iframe.style.display='block';
fade.style.display='block';

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr2);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		
		document.getElementById(tag+"Count").innerHTML = ajax.responseText;
		


	}
}



}


//发送微信通知
function SendWXTempONE(IDs,tag,w,h,url,postStr){
	
var postStr2 = "selall="+IDs+"&"+postStr;

var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');

light.style.display='block';

light.style.width=w+"px";
light.style.height=h+"px";
light.style.marginLeft=-Math.round(w/2)+"px";
light.style.marginTop=-Math.round(h/2)+"px";

Iframe.style.display='block';
fade.style.display='block';

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr2);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		
		document.getElementById(tag+"Count").innerHTML = ajax.responseText;
		


	}
}



}



function getHanzi(str) {
var cArr = str.match(/[^\x00-\xff]/ig);
return str.length + (cArr == null ? 0 : cArr.length);
}

//确认发送微信通知
function SendWXTempOK(){
	
var gourl = document.theForm.gourl.value;
var selall = document.theForm.selall.value;
var key1 = document.theForm.key1.value;
var key2 = document.theForm.key2.value;
var key3 = document.theForm.key3.value;
var key4 = document.theForm.key4.value;

if (selall==""){
 scscms_alert("请选择粉丝","","",1);
 return false;
}
if (key1=="" || key1.lenth>20){
 scscms_alert("请填写开头语，并且不能超过20个汉字。","","",1);
 return false;
}
if (key2=="" || key2.lenth>10){
 scscms_alert("请填写发件人，并且不能超过10个汉字。","","",1);
 return false;
}
if (key3=="" || key3.lenth>140){
 scscms_alert("请填写内容，并且不能超过140个汉字。","","",1);
 return false;
}
if (key4=="" || key4.lenth>20){
 scscms_alert("请填写结束语，并且不能超过20个汉字。","","",1);
 return false;
}

var url = "Address.fans.Send.ok.asp";
var postStr = "selall="+selall+"&key1="+key1+"&key2="+key2+"&key3="+key3+"&key4="+key4;

scscms_alert("发送中，请等待","","",99999999);

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
    	    vs  = ajax.responseText;
            v = new Array;
            v = vs.split("$$$");
				
    		    scscms_alert(vs,'ok',function(){location.href = gourl});

  }
}


}


//保存推客队列
function AddressTkDuitheFormSave(){
var IDs = document.theForm.IDs.value;
var NAIDs = document.theForm.NAIDs.value;
var backdiv1 = document.theForm.backdiv1.value;
var backdiv2 = document.theForm.backdiv2.value;
var puNameall = document.theForm.puNameall.value;

var url = "Address.tk.dui.ok.asp";
var postStr = "IDs="+IDs+"&puNameall="+puNameall+"&NAIDs="+NAIDs ;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");
				
		    hideDiv('addDiv');
			scscms_alert(v[0],"","",1);
			document.getElementById(backdiv1).innerHTML = v[1];
			document.getElementById(backdiv2).innerHTML = v[2];


  }
 }	
}





//微信扫码绑定提现接口
var WangpuJsDivTime;
function WangpuJserweima(w,h,scanurl){
var light=document.getElementById('addDiv');
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');
var lightCount=document.getElementById('addDivCount');

light.style.display='block';

light.style.width=w+"px";
light.style.height=h+"px";
light.style.marginLeft=-Math.round(w/2)+"px";
light.style.marginTop=-Math.round(h/2)+"px";

Iframe.style.display='block';
fade.style.display='block';

WangpuJsDivTime = setInterval(function(){

var v_www = document.WangpuJstheForm.v_www.value;
var a_s = document.WangpuJstheForm.a_s.value;
var www = document.WangpuJstheForm.www.value;
var num = document.WangpuJstheForm.num.value;
var tt = document.WangpuJstheForm.tt.value;
var txt = document.WangpuJstheForm.txt.value;

var posturl = "/"+scanurl+"/fok/SCAN.asp?opentDomaine="+v_www;
var postStr = "www="+www+"&num="+num+"&tt="+tt+"&txt="+txt+"&ccc="+a_s;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
	
    if(v[3]==1){
	  clearTimeout(WangpuJsDivTime);	
	  document.WangpuJstheForm.a_s.value = 0;
	  scscms_alert('绑定成功','ok',function(){location.href = "Wangpu.js.asp"}); 
    }else{
	  document.WangpuJstheForm.a_s.value = v[0];
    }
	
	if(a_s==1){
      lightCount.innerHTML = "<div style='text-align:center;font-size:14px;line-height:30px;color:#0EC100;'><div style='width:400px;height:390px;'><img src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+v[1]+"' width='390' height='390' /></div><div style='width:400px;height:40px;'>微信扫一扫绑定微信</div></div>";		
	}

	}
}

},1000);


}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var uMessTime;
//聊天会话列表
function UserNowmessList(){
var so = document.getElementById("audio_player");

var nl = document.getElementById("MessNowDivOne");
var el = document.getElementById("MessNowDivList");
var li = document.createElement('li');

var lastID = document.theMessNow.lastID.value;
var sounds = document.theMessNow.sounds.value;

var url = "Frame.Mess.now.list.asp";
var postStr = "lastID="+ lastID+"&sounds="+ sounds;               
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
     vs  = ajax.responseText;
	 v = new Array;
     v = vs.split("$$$");
	 
	 li.innerHTML = v[0];
	 
	 if(v[1]!=""){
		document.theMessNow.lastID.value = v[1]; 
	 }
	 
	 uMessTime = setTimeout("UserNowmessList()",8000);
	 
	 if(v[0]!="" && v[0]!=null){
	   so.src = "Images/sound/"+sounds;
	   audio_player.play();
	 }
	 
	 
	 
	 
	 m = new Array;
     m = v[1].split(",");
	 
	 x = new Array;
     x = v[2].split(",");
	 
	 z = new Array;
	 
	 for (var i=0;i<m.length;i++ ){
       z = x[i].split("###");
	   if(z[1]>0){
         document.getElementById("MessNowcc"+z[0]).innerHTML = z[1];
		 document.getElementById("MessNowcc"+z[0]).style.background = "#F60";
		 document.getElementById("MessNowtt"+z[0]).innerHTML = z[2];
       }else{
	     document.getElementById("MessNowcc"+z[0]).innerHTML = 0;
		 document.getElementById("MessNowcc"+z[0]).style.background = "#D0D0D0";
	   }
     }
	 
	 
	 
    }
  nl.insertBefore(li,el);
}
}





//打开聊天对话框
function MessON(id,fm,backdiv){
var url = "Mess.asp?ID="+id+"&FM="+fm;
if(backdiv!=""){
document.getElementById(backdiv).innerHTML = 0;
document.getElementById(backdiv).style.background = "#D0D0D0" ;
}
$('#IndexUrl', window.parent.document).attr("src",url);
//$("#IndexUrl").attr("src",url);
//topUrl(url);
}





var mMessTime;

//加载更多实时消息
function saveNowmessList(){
var windowHeight = document.body.clientHeight;

var el = document.getElementById("MessNowToNow");
var li = document.createElement('li');

var userid = document.SNSMess.userid.value;
var usertoid = document.SNSMess.usertoid.value;
var lastID = document.SNSMess.lastID.value;
var fm = document.SNSMess.fm.value;

var url = "_Nowmess.asp";
var postStr    = "userid="+ userid +"&usertoid="+ usertoid +"&fm="+ fm +"&lastID="+ lastID;               
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
     vs  = ajax.responseText;
	 v = new Array;
     v = vs.split("$$$");
	 
	 li.innerHTML = v[0];
	 document.SNSMess.lastID.value = v[1];
	 elHeight = el.scrollHeight + 200;

	 if(windowHeight<elHeight){window.scrollTo(0,elHeight);}
	 mMessTime = setTimeout("saveNowmessList()",8000);
	 
    }
el.appendChild(li);

}
}




//提交实时消息
function saveNowmessInfo(){
var el = document.getElementById("MessNowToNow");
var li = document.createElement('li');

var userid = document.SNSMess.userid.value;
var usertoid = document.SNSMess.usertoid.value;
var fm = document.SNSMess.fm.value;
var snstxt = document.SNSMess.snstxt.value;

var url = "_Nowmess.ok.asp";
var postStr = "userid="+ userid +"&usertoid="+ usertoid +"&fm="+ fm +"&snstxt="+ snstxt;    

if(snstxt==""){
scscms_alert("说点什么吧","","",1);
}else{  
document.SNSMess.snstxt.value="";         
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {
     vs  = ajax.responseText;
	 if(vs!=""){scscms_alert(vs,"","",1);}
	 document.SNSMess.snstxt.value="";
	 saveNowmessList();
	 
    }
clearTimeout(mMessTime);
}
}
}





//删除单个聊天会话记录
function delMessClose(id,fm,backdiv){
var d = new Date();
var url = "Mess.del.asp";
var postStr = "id="+id+"&fm="+fm;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
	scscms_alert("已关闭回话列表，并清空了聊天记录","","",1);
	document.getElementById(backdiv).style.display='none';
  }
 }
}


//删除所有聊天会话记录
function delallMessClose(){
var gourl = document.theMessNow.gourl.value;
var lastID = document.theMessNow.lastID.value;
var url = "Mess.del.all.asp";
var postStr = "lastID="+lastID;

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function(){
  if(ajax.readyState == 4 && ajax.status == 200){
	location.href = gourl;
  }
 }
}




//删除微信通知
function AddressSendtheFormDel(ID){
var d = new Date();
var url = "Address.fans.Send.del.asp";
var postStr = "IDs="+ID+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        document.getElementById("send_list_"+ID).style.display='none';
    }
  }	
}



//加载更多微信通知
function AddressSendtheFormMore(){
var el = document.getElementById('send_more');
var li = document.createElement('li');
var lastid = document.theForm.lastid.value;

var postStr = "lastid="+lastid;
ajax.open("POST", "Address.fans.Send.more.asp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
					
    vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
					  					
    if(v[0]==""){
		scscms_alert("没有更多加载","","",1);
	}else{
	li.innerHTML = v[0];
    document.theForm.lastid.value = v[1];
	}

  }
  el.appendChild(li, el.childNodes[0]);
 }	
}







//添加社群规则
function SnsSys_Save(){
var ppp = document.theForm.ppp.value;
var mmm = document.theForm.mmm.value;
var open_c = document.theForm.open_c.value;
var pass_c = document.theForm.pass_c.value;
var pass_m = document.theForm.pass_m.value;
var pass_my = document.theForm.pass_my.value;
var qunpay = document.theForm.qunpay.value;
var qunpaymax = document.theForm.qunpaymax.value;

if(Number(ppp)<0 || ppp==""){
 scscms_alert("请填写推广人数","","",1);
 return false;
}
if(Number(mmm)<0 || mmm==""){
 scscms_alert("请填写消费金额","","",1);
 return false;
}
if(Number(open_c)<0 || open_c==""){
 scscms_alert("请填写公开群数","","",1);
 return false;
}
if(Number(pass_c)<0 || pass_c==""){
 scscms_alert("请填写私密群数","","",1);
 return false;
}
if(Number(pass_m)<0 || pass_m==""){
 scscms_alert("请填写私密群费用","","",1);
 return false;
}
if(Number(pass_my)<0 || Number(pass_my)>100 || pass_my==""){
 scscms_alert("佣金占比为0-100之间","","",1);
 return false;
}
if(Number(qunpay)<Number(qunpaymax) || Number(qunpay)>100 || qunpay==""){
 scscms_alert("群收款占比为"+qunpaymax+"-100之间","","",1);
 return false;
}

var posturl = "Sns.sys.ok.asp";
var postStr = "ppp="+ppp+"&mmm="+mmm+"&open_c="+open_c+"&pass_c="+pass_c+"&pass_m="+pass_m+"&pass_my="+pass_my+"&qunpay="+qunpay;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
	
	  if(v[0]=="ok"){
	      scscms_alert(v[1],'ok',function(){
			  document.getElementById("sns_sys_list").innerHTML = v[2];
			  });
	  }else{
		  scscms_alert(v[1],"","",1);
	  }


	}
}

}




//添加社群规则
function SnsSys_Del(IDs){
var posturl = "Sns.sys.del.asp";
var postStr = "IDs="+IDs;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
	
	  if(vs=="ok"){
	      document.getElementById("list"+IDs).style.display='none';
	  }else{
		  scscms_alert("删除失败","","",1);
	  }


	}
}
}







//保存经验等级
function SnsGrade_Save(){
var gourl = document.theForm.gourl.value; 
var ppp = document.theForm.ppp.value;
var mmm = document.theForm.mmm.value;

if(ppp==""){
    scscms_alert("请填写推广经验","","",1);
	return false;
}
if(mmm==""){
    scscms_alert("请填写消费经验","","",1);
	return false;
}

var url = "Sns.grade.sys.asp";
var postStr = "ppp="+ppp+"&mmm="+mmm;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");								
        
		if(v[0]=="ok"){
			scscms_alert(v[1],"ok",function(){location.href = gourl});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }
}


//保存经验等级明细
function SnsGradeList_Save(){
var gourl = document.theForm.gourl.value; 
var pic = encodeURIComponent(document.theForm.pic.value);
var title = document.theForm.title.value;
var exps = document.theForm.exps.value;
var IDs = document.theForm.IDs.value;

if(pic==""){
    scscms_alert("请上传图标","","",1);
	return false;
}
if(title==""){
    scscms_alert("请填写等级名称","","",1);
	return false;
}
if(exps==""){
    scscms_alert("请填写经验值","","",1);
	return false;
}

var url = "Sns.grade.ok.asp";
var postStr = "pic="+pic+"&title="+title+"&exps="+exps+"&IDs="+IDs;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;
        v = new Array;
        v = vs.split("$$$");								
        
		if(v[0]=="ok"){
			scscms_alert(v[1],"ok",function(){location.href = gourl});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }
}


function SnsGradeList_Del(IDs){
var posturl = "Sns.grade.del.asp";
var postStr = "IDs="+IDs;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
	
	  if(vs=="ok"){
	      document.getElementById("list"+IDs).style.display='none';
	  }else{
		  scscms_alert("删除失败","","",1);
	  }


	}
}
}


//获取腾讯视频
function TenV_openvideo(vid,modId){
var wh = 320;


tvp.$.getScript('http://'+document.domain+'/mp5.0/js/video_setting.js', function(){

var video = new tvp.VideoInfo();
video.setVid(vid);
var width = parseInt(wh*0.95),
  height = parseInt(width*0.75),
  height = height > window.innerHeight ? window.innerHeight : height;

var player = new tvp.Player();
player.create({
  width  : width,
  height : height,
  pic: tvp.common.getVideoSnapMobile(vid),
  video  : video,
  playerType: 'html5',
  modId  : modId,
  autoplay: true,//是否自动播放true/false
  isHtml5UseUI:true,
  isiPhoneShowPlaysinline: !!tvp.$.browser.WeChat,
  isiPhoneShowPosterOnPause: false,
  isHtml5UseFakeFullScreen: false,
  isContinuePlay: false,
  plugins: {
    AppRecommend: {
      // vid: 123,
      // isInsertCurId: 1
    }
  }

});


});
//document.write("<div id='"+modId+"'></div>");

}


//处理群贴分类状态
//推荐
function TTTsnsmenu(id,t,v){
var url = "Sns.menu.ttt.asp";
var postStr = "IDs="+id+"&t="+t+"&v="+v;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
        vs  = ajax.responseText;
      v = new Array;
      v = vs.split("$$$");
		//scscms_alert(v[0],'ok',function(){
			  document.getElementById(t+"_snsmenutype_"+id).innerHTML = v[1];
			  //});
		
    }
  }	
}



//保存分类
function SnsMenutheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var title = document.theForm.title.value;
var num = document.theForm.num.value;
	  
if(title==""){
scscms_alert("请填写分类名称","","",1);
return false;
}

if(num==""){
scscms_alert("请填写序号","","",1);
return false;
}

var d = new Date();
var url = "Sns.menu.edit.ok.asp";
var postStr = "IDs="+IDs+"&title="+title+"&num="+num+"&d="+d;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;							
        
		if(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+title;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}



//生成HTML
function htmlADD(IDs){
scscms_alert("请等待","","",99999999);
var url = "Sns.Html.asp";
var postStr = "IDs="+IDs;
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	    vs  = ajax.responseText;
		v = new Array;
        v = vs.split("$$$");							
        
		if(v[0]=="ok"){
			scscms_alert(v[1],"","",1);
			document.getElementById("htmlurl_"+IDs).innerHTML = v[2];
			
		}else{
			scscms_alert(v[1],"","",1);
			return false;
		}
    }
  }
}


//播放Quicktime格式的视频，包括.mov .amr .3gp等    
function pv_q(id, u, w, h){    
var pv='';    
pv += '<object width="'+w+'" height="'+h+'" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';    
pv += '<param name="src" value="'+u+'">';    
pv += '<param name="controller" value="true">';    
pv += '<param name="type" value="video/quicktime">';    
pv += '<param name="autoplay" value="true">';    
pv += '<param name="target" value="myself">';    
pv += '<param name="bgcolor" value="black">';    
pv += '<param name="pluginspage" value="http://www.apple.com/quicktime/download/index.html">';    
pv += '<embed src="'+u+'" width="'+w+'" height="'+h+'" controller="true" align="middle" bgcolor="black" target="myself" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/index.html"></embed>';    
pv += '</object>'; 
document.getElementById("s_pl_play_"+id).innerHTML = pv;   
//document.write(pv);    
}


//加载更多社群成员
function SnssoftfanstheFormMore(){
var el = document.getElementById('replymore');
var li = document.createElement('li');
var IDs = document.theForm.IDs.value;
var lastid = document.theForm.lastid.value;

var postStr = "IDs="+IDs+"&lastid="+lastid;
ajax.open("POST", "Sns.soft.fans.more.asp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
					
    vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
					  					
    li.innerHTML = v[0];
    document.theForm.lastid.value = v[1];

  }
  el.appendChild(li, el.childNodes[0]);
 }	
}


//加载更多社群成员
function SnssoftmessnowtheFormMore(){
var el = document.getElementById('replymore');
var li = document.createElement('li');
var IDs = document.theForm.IDs.value;
var lastid = document.theForm.lastid.value;

var postStr = "IDs="+IDs+"&lastid="+lastid;
ajax.open("POST", "Sns.soft.messnow.more.asp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
					
    vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
					  					
    li.innerHTML = v[0];
    document.theForm.lastid.value = v[1];

  }
  el.appendChild(li, el.childNodes[0]);
 }	
}




//商品批次二维码
function FansArchivesEWM(){
var a_s = document.fansarchewmtheForm.a_s.value;
var www = document.fansarchewmtheForm.www.value;
var num = document.fansarchewmtheForm.num.value;
var tt = document.fansarchewmtheForm.tt.value;
var txt = document.fansarchewmtheForm.txt.value;
var action_name = document.fansarchewmtheForm.action_name.value;
var pic = document.fansarchewmtheForm.pic.value;
var url = document.fansarchewmtheForm.url.value;
var uptkid = document.fansarchewmtheForm.uptkid.value;
var Glid = document.fansarchewmtheForm.Glid.value;
var urls = url+"&opensubid="+Glid

if (Glid==0){
 scscms_alert("请选择一个群","","",1);
 return false;
}

var posturl = "/mp5.0/fok/SCAN.asp";
var postStr = "www="+www+"&num="+num+"&tt="+tt+"&txt="+txt+"&ccc="+a_s+"&action_name="+action_name+"&pic="+pic+"&url="+urls+"&uptkid="+uptkid+"&Glid="+Glid;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
	
	scscms_alert('永久二维码已生成','ok',function(){
		document.getElementById("img_pro_arch_ewm").innerHTML = "<img src='https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+v[1]+"' width='360' height='360' />";
		document.fansarchewmtheForm.na_ewm.value = v[1];
		}); 


	}
}

}



//粉丝永久二维码
function FansArchivesSave(){
var IDs = document.fansarchewmtheForm.IDs.value;
var na_ewm = document.fansarchewmtheForm.na_ewm.value;
var Glid = document.fansarchewmtheForm.Glid.value;
var num = document.fansarchewmtheForm.num.value;

if (na_ewm==""){
 scscms_alert("请获取二维码参数","","",1);
 return false;
}
if (Glid==0){
 scscms_alert("请选择一个群","","",1);
 return false;
}

var posturl = "Address.fans.ewm.ok.asp";
var postStr = "na_ewm="+na_ewm+"&IDs="+IDs+"&Glid="+Glid+"&num="+num;

ajax.open("POST", posturl, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
	
	vs  = ajax.responseText;
    v = new Array;
    v = vs.split("$$$");
	
	  if(v[0]=="ok"){
	      scscms_alert(v[1],'ok',function(){
			  hideDiv('addDiv');
			  });
	  }else{
		  scscms_alert(v[1],"","",1);
	  }


	}
}
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


var uBottomTime;
//底部消息实时状态
function NowbottomList(){
var na1 = document.getElementById("bottom_na_1");
var na2 = document.getElementById("bottom_na_2");

var url = "Frame.Bottom.now.asp";
var postStr = "";               
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
     vs  = ajax.responseText;
	 v = new Array;
     v = vs.split("$$$");
	 
	 na2.innerHTML = v[8];
	 uBottomTime = setTimeout("NowbottomList()",8000);
	 
	 if(v[10]>0){
		document.title = "【"+v[10]+"新消息】"+v[11] ; 
	 }else{
		document.title = v[11];  
	 }
	 
	 
	 
	 if(v[9]=="No"){
	   Let('#bottom_na_2')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({
		 'background': '#FF4949',
		 'color': '#FFF'
		 })
       .pop()
       .end()
	 }else{
	   Let('#bottom_na_2')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({'color': '#A7A7A7'})
       .pop()
       .end()
	 }
	 
    }
}
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


//左侧消息实时状态
function NowleftList(){
var ah2 = document.getElementById("ah_2");
var aaa35 = document.getElementById("Mss_aaa_35");
var aaa5 = document.getElementById("Mss_aaa_5");
var aaa6 = document.getElementById("Mss_aaa_6");
var aaa7 = document.getElementById("Mss_aaa_7");

var ah3 = document.getElementById("ah_3");
var aaa8 = document.getElementById("Mss_aaa_8");
var aaa9 = document.getElementById("Mss_aaa_9");
var aaa10 = document.getElementById("Mss_aaa_10");
var aaa11 = document.getElementById("Mss_aaa_11");
var aaa12 = document.getElementById("Mss_aaa_12");
var aaa13 = document.getElementById("Mss_aaa_13");
var aaa14 = document.getElementById("Mss_aaa_14");
var aaa40 = document.getElementById("Mss_aaa_40");

var ah4 = document.getElementById("ah_4");
var aaa15 = document.getElementById("Mss_aaa_15");
var aaa16 = document.getElementById("Mss_aaa_16");

var ah5 = document.getElementById("ah_5");
var aaa17 = document.getElementById("Mss_aaa_17");
var aaa18 = document.getElementById("Mss_aaa_18");
var aaa19 = document.getElementById("Mss_aaa_19");
var aaa20 = document.getElementById("Mss_aaa_20");

var ah6 = document.getElementById("ah_6");
var aaa21 = document.getElementById("Mss_aaa_21");
var aaa22 = document.getElementById("Mss_aaa_22");

var ah7 = document.getElementById("ah_7");
var aaa23 = document.getElementById("Mss_aaa_23");

var ah8 = document.getElementById("ah_8");
var aaa24 = document.getElementById("Mss_aaa_24");
var aaa25 = document.getElementById("Mss_aaa_25");
var aaa39 = document.getElementById("Mss_aaa_39");

var ah9 = document.getElementById("ah_9");
var aaa26 = document.getElementById("Mss_aaa_26");
var aaa27 = document.getElementById("Mss_aaa_27");
var aaa36 = document.getElementById("Mss_aaa_36");
var aaa37 = document.getElementById("Mss_aaa_37");
var aaa28 = document.getElementById("Mss_aaa_28");
var aaa29 = document.getElementById("Mss_aaa_29");
var aaa30 = document.getElementById("Mss_aaa_30");
var aaa31 = document.getElementById("Mss_aaa_31");
var aaa32 = document.getElementById("Mss_aaa_32");
var aaa33 = document.getElementById("Mss_aaa_33");
var aaa34 = document.getElementById("Mss_aaa_34");
var aaa38 = document.getElementById("Mss_aaa_38");

var url = "Frame.Left.now.asp";
var postStr = "";               
ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send(postStr);
ajax.onreadystatechange = function() {
  if (ajax.readyState == 4 && ajax.status == 200) {
     vs  = ajax.responseText;
	 v = new Array;
     v = vs.split("$$$");
	 
	 
	 if(v[0]>0){aaa35.className="fontMess";aaa35.innerHTML = "";}else{aaa35.className="fontMessSys";aaa35.innerHTML = "未设置";}
	 aaa5.innerHTML = v[1];
	 aaa6.innerHTML = v[2];
	 aaa7.innerHTML = v[3];
	 
	 
	 aaa8.innerHTML = v[4];
	 aaa9.innerHTML = v[5];
	 if(v[5]>0){aaa9.className="fontMessNo"}else{aaa9.className="fontMess"}
	 aaa10.innerHTML = v[6];
	 if(v[6]>0){aaa10.className="fontMessNo"}else{aaa10.className="fontMess"}
	 aaa11.innerHTML = v[7];
	 if(v[7]>0){aaa11.className="fontMessNo"}else{aaa11.className="fontMess"}
	 aaa12.innerHTML = v[8];
	 if(v[8]>0){aaa12.className="fontMessNo"}else{aaa12.className="fontMess"}
	 aaa13.innerHTML = v[9];
	 if(v[9]>0){aaa13.className="fontMessNo"}else{aaa13.className="fontMess"}
	 aaa14.innerHTML = v[10];
	 aaa40.innerHTML = v[11];
	 
	 
	 aaa15.innerHTML = v[12];
	 aaa16.innerHTML = v[13];
	 
	 
	 aaa17.innerHTML = v[14];	 
	 if(v[15]>0){aaa18.className="fontMess";aaa18.innerHTML = "";}else{aaa18.className="fontMessSys";aaa18.innerHTML = "未设置";}
	 aaa19.innerHTML = v[16];
	 aaa20.innerHTML = v[17];
	 
	 
	 aaa21.innerHTML = v[18];
	 if(v[19]>0){aaa22.innerHTML = "";}else{aaa22.innerHTML = "未设置";}

	 
	 if(v[20]>0){aaa23.innerHTML = "";}else{aaa23.innerHTML = "未设置";}
	 
	 
	 if(v[21]>0){aaa24.innerHTML = "";}else{aaa24.innerHTML = "未设置";}
	 aaa25.innerHTML = v[22];
	 aaa39.innerHTML = v[23];
	 
	 
	 if(v[24]>0){aaa26.className="fontMess";aaa26.innerHTML = "";}else{aaa26.className="fontMessSys";aaa26.innerHTML = "未设置";}
	 if(v[25]>0){aaa27.className="fontMess";aaa27.innerHTML = "";}else{aaa27.className="fontMessSys";aaa27.innerHTML = "未设置";}
	 if(v[26]>0){aaa36.className="fontMess";aaa36.innerHTML = "";}else{aaa36.className="fontMessSys";aaa36.innerHTML = "未设置";}
	 if(v[27]>0){aaa37.className="fontMess";aaa37.innerHTML = "";}else{aaa37.className="fontMessSys";aaa37.innerHTML = "未设置";}
	 if(v[28]>0){aaa28.className="fontMess";aaa28.innerHTML = "";}else{aaa28.className="fontMessSys";aaa28.innerHTML = "未设置";}
	 if(v[29]>0){aaa29.className="fontMess";aaa29.innerHTML = "";}else{aaa29.className="fontMessSys";aaa29.innerHTML = "未设置";}
	 if(v[30]>0){aaa30.className="fontMess";aaa30.innerHTML = "";}else{aaa30.className="fontMessSys";aaa30.innerHTML = "未设置";}
	 if(v[31]>0){aaa31.className="fontMess";aaa31.innerHTML = "";}else{aaa31.className="fontMessSys";aaa31.innerHTML = "未设置";}
	 if(v[32]>0){aaa32.className="fontMess";aaa32.innerHTML = "";}else{aaa32.className="fontMessSys";aaa32.innerHTML = "未设置";}
	 if(v[33]>0){aaa33.className="fontMess";aaa33.innerHTML = "";}else{aaa33.className="fontMessSys";aaa33.innerHTML = "未设置";}
	 if(v[34]>0){aaa34.className="fontMess";aaa34.innerHTML = "";}else{aaa34.className="fontMessSys";aaa34.innerHTML = "未设置";}
	 aaa38.innerHTML = v[35];
	 
	 
	 if(v[0]>0){
	   Let('#ah_2')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_2')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[5]>0 || v[6]>0 || v[7]>0 || v[8]>0 || v[9]>0){
	   Let('#ah_3')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }else{
	   Let('#ah_3')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[15]>0){
	   Let('#ah_5')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_5')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[18]>0 || v[19]>0){
	   Let('#ah_6')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_6')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[20]>0){
	   Let('#ah_7')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_7')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[21]>0 && v[22]>0){
	   Let('#ah_8')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_8')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 if(v[24]>0 && v[25]>0){
	   Let('#ah_9')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'none'})
       .pop()
       .end()
	 }else{
	   Let('#ah_9')
         .set({'display': 'none'})
       .then()
       .duration(300)
         .set({'display': 'block'})
       .pop()
       .end()
	 }
	 
	 
	 scscms_alert("已加载","","",1);
	 
	 
    }
}
}





/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////