/**
 * 初始化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(); 

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



/**
 * 弹出层隐藏/显示
 */
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 ForgetPass(){
var auser = document.PasstheForm.auser.value;
var atel = document.PasstheForm.atel.value;	

if(auser==""){
    scscms_alert("请填写您的用户名","","",1);
	return false;
}
if(atel=="" || atel.length!=11){
    scscms_alert("请填写您当时注册时填写的手机号码","","",1);
	return false;
}

var url = "Login.Forget.ok.asp";
var postStr = "auser="+auser+"&atel="+atel;
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(){hideDiv('addDiv')});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }

}






//修改密码
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);

    }
  }
}



//PC支付宝充值
function uPayCheck(){
if (document.AlipayForm.fee.value<=0){
 scscms_alert("充值金额必须大于0元","","",1);
 return false;
}

document.AlipayForm.action="/mp/Api/Alipay/alipayto.asp";
document.AlipayForm.submit();
}


//PC自动提现
function uPayMch1Check(){
var payid = document.mch1Form.payid.value;
var oid = document.mch1Form.oid.value;

if (oid==""){
 scscms_alert("没有可结算的金额","","",1);
 return false;
}

scscms_alert("结算中，请等待","","",99999999);

var url = "u.Pay.Mch.ok.asp";
var postStr = "payid="+payid+"&oid="+oid;

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 = "u.Fund.asp"});
		}else{
		scscms_alert(v[1],"","",1);
		}

    }
  }  


}




//帮助查询
function uHelpSearchCheck(){
var	gourl = document.serchHelpList.gourl.value;
var keyn = document.serchHelpList.keyn.value;
var keys = document.serchHelpList.keys.value;

document.serchHelpList.action = gourl+"?keyn="+keyn+"&keys="+keys;
document.serchHelpList.submit();	

}


//帮助提问
function uHelpSearchAdd(){
var	gourl = document.serchHelpList.gourl.value;
var	asktxt = document.serchHelpList.asktxt.value;
//var asktxt = document.getElementsByName("asktxt").value;	
if (asktxt==""){
 scscms_alert("请填写您的疑问","","",1);
 return false;
}
var url = "u.Ask.ok.asp";
var postStr = "asktxt="+asktxt;

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 = gourl});
  }
 }
}




//保存旺铺设置
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 ActivationWb(flag){
var url = "Wangpu.wb.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.wb.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 WangpuZhifuSel(na){
var payT1 = document.getElementById('payT1');
var payT2 = document.getElementById('payT2');
var payT3 = document.getElementById('payT3');
var payT4 = document.getElementById('payT4');

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

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

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

  if(payoff==2 && tenpayoff==5 && Istenwxpay==1){
	  payT1.style.display='none';
  }
  
  if(payoff==1){
	  payT2.style.display='none';
	  payT1.style.display='block';
  }else{
      payT2.style.display='block';
	  //payT1.style.display='none';
  }
  
  if(tenpayoff==3){
	  payT3.style.display='none';
	  payT1.style.display='block';
  }else{
      payT3.style.display='block';
	  //payT1.style.display='none';
  }
  
  if(Istenwxpay==7){
	  payT4.style.display='none';
	  payT1.style.display='block';
  }else{
	  payT4.style.display='block';
	  //payT1.style.display='none'; 
  }
  
}






//保存手机支付
function WangpuZhifutheFormCheck(){
var gourl = document.theForm.gourl.value;

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

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

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

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

var a_AlipayUser = document.theForm.a_AlipayUser.value;
var a_AlipayPid = document.theForm.a_AlipayPid.value;
var a_AlipayKey = document.theForm.a_AlipayKey.value;

var a_TenmpayPid = document.theForm.a_TenmpayPid.value;
var a_TenmpayKey = document.theForm.a_TenmpayKey.value;

var a_TenpayPid = document.theForm.a_TenpayPid.value;
var a_TenpayKey = document.theForm.a_TenpayKey.value;


  if(payoff==1 || tenpayoff==3){
	  if(a_ali=="" || a_u==""){
	  scscms_alert("请填写个人支付宝结算账户设置","","",1);
	  return false;
	  }
  }
  if(payoff==2){
	  if(a_AlipayUser=="" || a_AlipayPid=="" || a_AlipayKey==""){
	  scscms_alert("请填写企业支付宝收款账户设置","","",1);
	  return false;
	  }
  }
  if(tenpayoff==5){
	  if(a_TenmpayPid=="" || a_TenmpayKey==""){
	  scscms_alert("请填写企业财付通收款账户设置","","",1);
	  return false;
	  }
  }
  if(Istenwxpay==8){
	  if(a_TenpayPid=="" || a_TenpayKey==""){
	  scscms_alert("请填写微信支付收款账户设置","","",1);
	  return false;
	  }
  }

  
}




//保存个人结算设置
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 pid = document.theForm.pid.value;
var nid = document.theForm.nid.value;
var title = document.theForm.title.value;
var ppid = document.theForm.ppid.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.soft.edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&nid="+nid+"&title="+title+"&ppid="+ppid+"&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 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 Htx = document.theForm.Htx.value;
var n_content = 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+"&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 KaEdittheFormCheck(){
if (document.theForm.title.value==""){
 scscms_alert("请填写会员卡名称","","",1);
 return false;
}
if (document.theForm.num.value<=0){
 scscms_alert("请填写初始编号","","",1);
 return false;
}
if (document.theForm.bgpic.value==""){
 scscms_alert("请填上传封面","","",1);
 return false;
}
if (document.theForm.txt.value==""){
 scscms_alert("请填写会员卡介绍","","",1);
 return false;
}
if (document.theForm.tj_xf.value<=0){
 scscms_alert("请填写消费累计","","",1);
 return false;
}
if (document.theForm.tq_zk.value<=0){
 scscms_alert("请填写消费享折扣","","",1);
 return false;
}
if (document.theForm.tq_jf.value<=0){
 scscms_alert("请填写消费得积分","","",1);
 return false;
}
if (document.theForm.tq_hd.value<=0){
 scscms_alert("请填写互动得积分","","",1);
 return false;
}
if (document.theForm.tq_jfp.value<=0){
 scscms_alert("请填写积分换算比例","","",1);
 return false;
}
}






//保存商品类目
function ProSofttheFormSave(){
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 nid = document.theForm.nid.value;
var title = document.theForm.title.value;
var ppid = document.theForm.ppid.value;
var ccc = document.theForm.ccc.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 = "Pro.soft.edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&nid="+nid+"&title="+title+"&ppid="+ppid+"&ccc="+ccc+"&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 ProcccNone(){
var fenxiaoCCC=document.getElementById('fenxiaoCCC');
var ppid=document.theForm.ppid.value;
var ccc=document.theForm.ccc.value;

var url = "Pro.soft.ccc.asp";
var postStr = "ppid="+ppid;

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>1){
			fenxiaoCCC.style.display = "none";
			document.theForm.ccc.value = 0;
		}else{
			fenxiaoCCC.style.display = "block";
		}
	}
}

}



function ProshowDiv(tag,w,h,url,postStr){
var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');

var n_win=document.theForm.n_win.value;
var n_color=document.theForm.n_color.value;
var n_paystr=document.theForm.n_paystr.value;

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+"&win="+n_win+"&color="+n_color+"&paystr="+n_paystr);
ajax.onreadystatechange = function() {
    if (ajax.readyState == 4 && ajax.status == 200) {	
		
		document.getElementById(tag+"Count").innerHTML = ajax.responseText;
		


	}
}
}


//保存常用规格
function editUserWin(){
var title=document.winForm.title.value;	
var d = new Date();
var url = "Pro.win.edit.asp";
var postStr = "title="+title;

if(title==""){
	scscms_alert("请填写您要添加的规格名称","","",1);
    return false;
}else{
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("winTxtArr").innerHTML = ajax.responseText;
  }
 }
} 
}



//退出删除常用规格表
function escUserWin(){
var d = new Date();
var url = "Pro.win.esc.asp";
var postStr = "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("winTxtArr").innerHTML = ajax.responseText;
  }
 }
 
}


//删除常用规格表
function delUserWin(id){
var d = new Date();
var url = "Pro.win.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("winTxtArr").innerHTML = ajax.responseText;
  }
 }
 
}






//保存商品规格
function saveProflagwin() {
var title = document.winForm.title.value;

var url = "Pro.win.ok.asp";
var postStr = "title="+title;

if (title==""){
 scscms_alert("请填写商品规格","","",1);
 return false;
}else{

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){
    hideDiv('addDiv');
	document.theForm.n_win.value = ajax.responseText.replace("|","");
  }
 }
 
}	
}




//保存常用颜色
function editUserColor(){
var title=document.colorForm.title.value;	
var d = new Date();
var url = "Pro.color.edit.asp";
var postStr = "title="+title;

if(title==""){
	scscms_alert("请填写您要添加的颜色名称","","",1);
    return false;
}else{
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("colorTxtArr").innerHTML = ajax.responseText;
  }
 }
} 
}



//退出删除常用颜色
function escUserColor(){
var d = new Date();
var url = "Pro.color.esc.asp";
var postStr = "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("colorTxtArr").innerHTML = ajax.responseText;
  }
 }
 
}


//删除常用颜色
function delUserColor(id){
var d = new Date();
var url = "Pro.color.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("colorTxtArr").innerHTML = ajax.responseText;
  }
 }
 
}






//保存商品颜色
function saveProflagcolor() {
var title = document.colorForm.title.value;

var url = "Pro.color.ok.asp";
var postStr = "title="+title;

if (title==""){
 scscms_alert("请填写商品规格","","",1);
 return false;
}else{

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){
    hideDiv('addDiv');
	document.theForm.n_color.value = ajax.responseText.replace("|","");
  }
 }
 
}	
}





//保存多规格
function saveProflagpaystr(){
var ggcidArr="";
var ggc1Arr="";
var ggc2Arr="";
var ggc3Arr="";
var ggc4Arr="";
var ggc5Arr="";

var ggcid = document.getElementsByName("ggcid");
var ggc1 = document.getElementsByName("ggc1");
var ggc2 = document.getElementsByName("ggc2");
var ggc3 = document.getElementsByName("ggc3");
var ggc4 = document.getElementsByName("ggc4");
var ggc5 = document.getElementsByName("ggc5");

 for(var i=0;i<ggcid.length;i++)
 {
	   ggcidArr = ggcidArr+","+ggcid[i].value;
	   ggc1Arr = ggc1Arr+","+ggc1[i].value;
	   ggc2Arr = ggc2Arr+","+ggc2[i].value;
	   ggc3Arr = ggc3Arr+","+ggc3[i].value;
	   ggc4Arr = ggc4Arr+","+ggc4[i].value;
	   ggc5Arr = ggc5Arr+","+ggc5[i].value;  
 }

var url = "Pro.paystr.ok.asp";
var postStr = "ggcid="+ggcidArr+"&ggc1="+ggc1Arr+"&ggc2="+ggc2Arr+"&ggc3="+ggc3Arr+"&ggc4="+ggc4Arr+"&ggc5="+ggc5Arr;

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){
			scscms_alert(v[1],"","",1);
		}else{
			hideDiv('addDiv');
			document.theForm.n_paystr.value = v[1];
		}

  }
 }
}




//保存多规格
function saveProflagpaystr2(){
var IDs = document.paystrForm.IDs.value;
var HYIDs = document.paystrForm.HYIDs.value;
var backdiv = document.paystrForm.backdiv.value;

var ggcidArr="";
var ggc1Arr="";
var ggc2Arr="";
var ggc3Arr="";
var ggc4Arr="";
var ggc5Arr="";

var ggcid = document.getElementsByName("ggcid");
var ggc1 = document.getElementsByName("ggc1");
var ggc2 = document.getElementsByName("ggc2");
var ggc3 = document.getElementsByName("ggc3");
var ggc4 = document.getElementsByName("ggc4");
var ggc5 = document.getElementsByName("ggc5");

 for(var i=0;i<ggcid.length;i++)
 {
	   ggcidArr = ggcidArr+","+ggcid[i].value;
	   ggc1Arr = ggc1Arr+","+ggc1[i].value;
	   ggc2Arr = ggc2Arr+","+ggc2[i].value;
	   ggc3Arr = ggc3Arr+","+ggc3[i].value;
	   ggc4Arr = ggc4Arr+","+ggc4[i].value;
	   ggc5Arr = ggc5Arr+","+ggc5[i].value;  
 }

var url = "Pro.dgg.ok.asp";
var postStr = "IDs="+IDs+"&HYIDs="+HYIDs+"&ggcid="+ggcidArr+"&ggc1="+ggc1Arr+"&ggc2="+ggc2Arr+"&ggc3="+ggc3Arr+"&ggc4="+ggc4Arr+"&ggc5="+ggc5Arr;

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){
		    scscms_alert(v[1],"","",1);
		}else{		
		    hideDiv('addDiv');
			scscms_alert(v[0],"","",1);
			document.getElementById(backdiv).innerHTML = v[1];
		}


  }
 }
}





//保存商品信息
function ProEdittheFormCheck(){
if (document.theForm.n.value=="" || document.theForm.n.value=="0,0,0,0,0"){
 scscms_alert("请填选择所属类目","","",1);
 return false;
}
if (document.theForm.pic1.value==""){
 scscms_alert("请上传商品主图","","",1);
 return false;
}
if (document.theForm.n_brief.value==""){
 scscms_alert("请填写商品名称","","",1);
 return false;
}
if (document.theForm.n_win.value==""){
 scscms_alert("请填写商品规格","","",1);
 return false;
}
if (document.theForm.n_paystr.value==""){
 scscms_alert("请填写规格报价","","",1);
 return false;
}
}





//保存积分抵现
function ProJFtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var n_payj = document.theForm.n_payj.value;

var url = "Pro.jf.ok.asp";
var postStr = "IDs="+IDs+"&n_payj="+n_payj;

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 ProTJtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

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

var num = document.theForm.num.value;

var url = "Pro.tj.ok.asp";
var postStr = "IDs="+IDs+"&n_tjflag="+n_tjflag+"&num="+num;

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 ProTGtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

//var n_payyj = document.theForm.n_payyj.value;
var n_payy = document.theForm.n_payy.value;
var payMax = document.theForm.payMax.value;

if (n_payy<0 || n_payy==""){
 scscms_alert("请填写佣金","","",1);
 return false;
}
if (Number(n_payy) >= Number(payMax)){
 scscms_alert("推客佣金要小于最大利润","","",1);
 return false;
}

var url = "Pro.tg.ok.asp";
var postStr = "IDs="+IDs+"&n_payy="+n_payy;

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 ProXStheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var n_payyj = document.theForm.n_payyj.value;

if (n_payyj<0 || n_payyj==""){
 scscms_alert("请填写折扣","","",1);
 return false;
}

var url = "Pro.xs.ok.asp";
var postStr = "IDs="+IDs+"&n_payyj="+n_payyj;

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 ShopDaorutheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_n = document.theForm.key_n.value;
var key_www = document.theForm.key_www.value;
var key_n_title = document.theForm.key_n_title.value;
var key_n_goodsno = document.theForm.key_n_goodsno.value;
var key_n_win = document.theForm.key_n_win.value;
var key_n_color = document.theForm.key_n_color.value;
var key_n_pay1 = document.theForm.key_n_pay1.value;
var key_n_pay2 = document.theForm.key_n_pay2.value;
var key_n_payl1 = document.theForm.key_n_payl1.value;
var key_n_payl2 = document.theForm.key_n_payl2.value;

document.listform.action = gourl+"?key_n="+key_n+"&key_www="+key_www+"&key_n_title="+key_n_title+"&key_n_goodsno="+key_n_goodsno+"&key_n_win="+key_n_win+"&key_n_color="+key_n_color+"&key_n_pay1="+key_n_pay1+"&key_n_pay2="+key_n_pay2+"&key_n_payl1="+key_n_payl1+"&key_n_payl2="+key_n_payl2;
document.listform.submit();	  
}





//导入商品
function daoruProtheForm(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 daoruProtheFormOK(){
	
var gourl = document.theForm.gourl.value;
var n = document.theForm.n.value;
var selall = document.theForm.selall.value;

if (selall==""){
 scscms_alert("请选择商品","","",1);
 return false;
}
if (n=="" || n=="0,0,0,0,0"){
 scscms_alert("请选择要导入的类目","","",1);
 return false;
}

var url = "Pro.daoru.next.ok.asp";
var postStr = "selall="+selall+"&n="+n;

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 ShoptheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_n = document.theForm.key_n.value;
var key_www = document.theForm.key_www.value;
var key_n_title = document.theForm.key_n_title.value;
var key_n_goodsno = document.theForm.key_n_goodsno.value;
var key_n_win = document.theForm.key_n_win.value;
var key_n_color = document.theForm.key_n_color.value;
var key_n_pay1 = document.theForm.key_n_pay1.value;
var key_n_pay2 = document.theForm.key_n_pay2.value;
var key_n_payl1 = document.theForm.key_n_payl1.value;
var key_n_payl2 = document.theForm.key_n_payl2.value;

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

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

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

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

document.listform.action = gourl+"?key_n="+key_n+"&key_www="+key_www+"&key_n_title="+key_n_title+"&key_n_goodsno="+key_n_goodsno+"&key_n_win="+key_n_win+"&key_n_color="+key_n_color+"&key_n_pay1="+key_n_pay1+"&key_n_pay2="+key_n_pay2+"&key_n_payl1="+key_n_payl1+"&key_n_payl2="+key_n_payl2+"&key_n_payj="+key_n_payj+"&key_n_payy="+key_n_payy+"&key_n_tjflag="+key_n_tjflag+"&key_n_art1="+key_n_art1;
document.listform.submit();	  
}





//导入阿里巴巴商品
function ProImporttheFormSave(){
if (document.theForm.n.value=="" || document.theForm.n.value=="0,0,0,0,0"){
 scscms_alert("请选择所属类目","","",1);
 return false;
}
if (document.theForm.n_prourl.value==""){
 scscms_alert("请填写商品链接","","",1);
 return false;
}

document.theForm.action = "Api/1688/index.asp"
document.theForm.submit();	
}






//订单查询
function OrderstheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_user = document.theForm.key_user.value;
var key_old = document.theForm.key_old.value;
var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;

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

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

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

var key_id = document.theForm.key_id.value;

document.listform.action = gourl+"?key_old="+key_old+"&key_user="+key_user+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_jifen="+key_jifen+"&key_huiyuanka="+key_huiyuanka+"&key_tuiguang="+key_tuiguang+"&key_id="+key_id;
document.listform.submit();	  
}




//分销加盟订单查询
function Orders7theFormSearch(){
var gourl = document.theForm.gourl.value;

var key_old = document.theForm.key_old.value;
var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;

document.listform.action = gourl+"?key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime;
document.listform.submit();	  
}





//删除订单
function delOrdersflag(id,backdiv){
var url = "Orders.del.asp";
var postStr = "IDs="+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;
				
		    hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).style.display='none';


  }
 }
}


//保存订单改价
function OrderGJtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var v_amount = document.theForm.v_amount.value;
var v_bmount = document.theForm.v_bmount.value;

if (v_amount<=0){
 scscms_alert("请填写买家实付款","","",1);
 return false;
}

//if (v_bmount<=0){
// scscms_alert("请填写供应商实收价","","",1);
// return false;
//}
//
//if (v_amount<v_bmount){
// scscms_alert("售价不能低于成本价","","",1);
// return false;
//}

var url = "Orders.gj.ok.asp";
var postStr = "IDs="+IDs+"&v_amount="+v_amount+"&v_bmount="+v_bmount;

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 OrderFHtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

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

var wlid = document.theForm.wlid.value;
var wlnum = document.theForm.wlnum.value;
var wltimes = document.theForm.wltimes.value;

if (wltimes==""){
 scscms_alert("请填写发货时间","","",1);
 return false;
}

var url = "Orders.fh.ok.asp";
var postStr = "IDs="+IDs+"&huoflag="+huoflag+"&wlid="+wlid+"&wlnum="+wlnum+"&wltimes="+wltimes;

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 OrderSHSJtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var Dv_dayupdate = document.theForm.Dv_dayupdate.value;

if (Dv_dayupdate<=0){
 scscms_alert("请填写延长天数","","",1);
 return false;
}

var url = "Orders.shsj.ok.asp";
var postStr = "IDs="+IDs+"&Dv_dayupdate="+Dv_dayupdate ;

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 OrderPJtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var ping = document.theForm.ping.value;

var p_stxt = document.theForm.p_stxt.value;

if (ping==0){
 scscms_alert("买家未评，您无法评价","","",1);
 return false;
}

if (p_stxt==""){
 scscms_alert("请填写卖家评价","","",1);
 return false;
}

var url = "Orders.pj.ok.asp";
var postStr = "IDs="+IDs+"&ping="+ping+"&p_stxt="+p_stxt ;

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 OrderTHtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

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

var mjly = document.theForm.mjly.value;

if (mjly==""){
 scscms_alert("请填写卖家附言","","",1);
 return false;
}

var url = "Orders.th.ok.asp";
var postStr = "IDs="+IDs+"&tongflag="+tongflag+"&mjly="+mjly ;

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 FinancialMetheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

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

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

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

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

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

var key_tuiguang_id = document.theForm.key_tuiguang_id.value;

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


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

document.listform.action = gourl+"?key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_old_type="+key_old_type+"&key_gouwu="+key_gouwu+"&key_jiameng="+key_jiameng+"&key_tuiguang="+key_tuiguang+"&key_tuiguang_id="+key_tuiguang_id+"&key_tuiguang_type="+key_tuiguang_type+"&key_jiezhuan_type="+key_jiezhuan_type+"&key_gongying_type="+key_gongying_type;
document.listform.submit();	  
}



//账单查询
function FinancialAlltheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

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

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

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

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

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


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

document.listform.action = gourl+"?key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_old_type="+key_old_type+"&key_gouwu="+key_gouwu+"&key_jiameng="+key_jiameng+"&key_tuiguang="+key_tuiguang+"&key_tuiguang_id="+key_tuiguang_id+"&key_jiezhuan_type="+key_jiezhuan_type+"&key_gongying_type="+key_gongying_type;
document.listform.submit();	  
}




//推客提现账单查询
function FinancialTktheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

document.listform.action = gourl+"?key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime;
document.listform.submit();	  
}



//账单统计加载
function FinancialMeNowtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

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

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

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

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

var key_tuiguang_id = document.theForm.key_tuiguang_id.value;

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

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

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

var url = "Financial.me.now.asp";
var postStr = "key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_old_type="+key_old_type+"&key_gouwu="+key_gouwu+"&key_jiameng="+key_jiameng+"&key_tuiguang="+key_tuiguang+"&key_tuiguang_id="+key_tuiguang_id+"&key_tuiguang_type="+key_tuiguang_type+"&key_jiezhuan_type="+key_jiezhuan_type+"&key_gongying_type="+key_gongying_type;

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("已刷新统计数据","","",1);
			document.getElementById("AllPayTongflag0").innerHTML = v[0];
			document.getElementById("AllPayTongflag1").innerHTML = v[1];

  }
 } 
}




//推客提现账单统计加载
function FinancialTkNowtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}


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

var url = "Financial.tk.now.asp";
var postStr = "key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_tuiguang_type="+key_tuiguang_type;

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("已刷新统计数据","","",1);
			document.getElementById("AllPayTongflag0").innerHTML = v[0];

  }
 } 
}



//选中推广显示推广ID
function ShowTtttGuangID(){
var key_tuiguangrr = document.getElementsByName("key_tuiguang");
var key_tuiguang="";
for (var i=0;i<key_tuiguangrr.length;i++ ){
if(key_tuiguangrr[i].checked){ //判断单选框是否选中
key_tuiguang = key_tuiguangrr[i].value;
}
}
if(key_tuiguang==1){
document.getElementById("key_tuiguang_id").style.display='inline-block';
}else{
document.getElementById("key_tuiguang_id").style.display='none';
}	
}




//分销账单查询
function FinancialFxtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

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

var key_tuiguang_id = document.theForm.key_tuiguang_id.value;

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

document.listform.action = gourl+"?key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_old_type="+key_old_type+"&key_tuiguang_id="+key_tuiguang_id+"&key_tuiguang_type="+key_tuiguang_type;
document.listform.submit();	  
}






//账单统计加载
function FinancialFxNowtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

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

var key_tuiguang_id = document.theForm.key_tuiguang_id.value;

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

var url = "Financial.fx.now.asp";
var postStr = "key_old="+key_old+"&key_btime="+key_btime+"&key_etime="+key_etime+"&key_old_type="+key_old_type+"&key_tuiguang_id="+key_tuiguang_id+"&key_tuiguang_type="+key_tuiguang_type;

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("已刷新统计数据","","",1);
			document.getElementById("AllPayTongflag0").innerHTML = v[0];
			document.getElementById("AllPayTongflag1").innerHTML = v[1];
			document.getElementById("AllPayTongflag2").innerHTML = v[2];

  }
 } 
}




//选择优惠类型
function ActManPidselect(){
var IDs = document.theForm.IDs.value;
var pid = document.theForm.pid.value;
var vs = document.theForm.vs.value;

var url = "Act.man.type.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&vs="+vs;
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("ActListrr").innerHTML = vs;
  }
 } 
}





//保存旺铺优惠
function ActMantheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var titles = document.theForm.titles.value;
var pid = document.theForm.pid.value;
var vs0 = document.theForm.vs0.value;
var vs1 = document.theForm.vs1.value;
var vs2 = document.theForm.vs2.value;

if (titles==""){
 scscms_alert("请填写项目名称","","",1);
 return false;
}

if (pid==0){
 scscms_alert("请选择类型","","",1);
 return false;
}

if (vs0=="" || vs1=="" || vs2==""){
 scscms_alert("请填写完整规则","","",1);
 return false;
}

var url = "Act.man.edit.ok.asp";
var postStr = "IDs="+IDs+"&titles="+titles+"&pid="+pid+"&vs0="+vs0+"&vs1="+vs1+"&vs2="+vs2;

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(backdiv!=""){
			hideDiv('addDiv');
			scscms_alert(vs,"","",1);
			document.getElementById(backdiv).innerHTML = "&nbsp;&nbsp;"+titles;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}

  }
 }
}





//保存限时折扣
function ActZhetheFormCheck(){
if (document.theForm.pic.value==""){
 scscms_alert("请上传主题图","","",1);
 return false;
}
//if (document.theForm.zk.value=="" || document.theForm.zk.value<=0 || document.theForm.zk.value>=10){
// scscms_alert("请填写折扣","","",1);
// return false;
//}
if (document.theForm.btime.value=="" || document.theForm.etime.value==""){
 scscms_alert("请填写活动截止时间","","",1);
 return false;
}
if (document.theForm.co.value==""){
 scscms_alert("请填写限购数量","","",1);
 return false;
}
}




//保存砍价
function ActKantheFormCheck(){
if (document.theForm.pic.value==""){
 scscms_alert("请上传主题图","","",1);
 return false;
}
if (document.theForm.fu.value==""){
 scscms_alert("请填写降价幅度","","",1);
 return false;
}
if (document.theForm.js.value==""){
 scscms_alert("请填写最低价结束","","",1);
 return false;
}
if (document.theForm.co.value==""){
 scscms_alert("请填写限购数量","","",1);
 return false;
}
}






//保存社区标签
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;

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+"&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 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_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_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 flagMessTkList(ID,Nid,flag){
var d = new Date();
var url = "Frame.Mess.tk.flag.asp";
var postStr = "IDs="+ID+"&flag="+flag+"&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 delMessJmList(ID,Nid){
var d = new Date();
var url = "Frame.Mess.jm.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 flagMessJmList(ID,Nid,flag){
var d = new Date();
var url = "Frame.Mess.jm.flag.asp";
var postStr = "IDs="+ID+"&flag="+flag+"&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(vs!=""){
			scscms_alert(vs,"","",1);
		}else{
			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(0);
	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;

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;

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){
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+"'><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){
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;
}


//删除选中商品
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 linktxt2 = document.getElementById("linktxt2");
var linktxt3 = document.getElementById("linktxt3");
var linktxt4 = document.getElementById("linktxt4");
if(t==1){
  linktxt0.style.display = "none";
  linktxt1.style.display = "block";
  linktxt2.style.display = "none";
  linktxt3.style.display = "none";
  linktxt4.style.display = "none";
}else if(t==2){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt2.style.display = "block"; 
  linktxt3.style.display = "none";
  linktxt4.style.display = "none";
}else if(t==3){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt2.style.display = "none"; 
  linktxt3.style.display = "block";
  linktxt4.style.display = "none";
}else if(t==4){
  linktxt0.style.display = "none";
  linktxt1.style.display = "none";
  linktxt2.style.display = "none"; 
  linktxt3.style.display = "none";
  linktxt4.style.display = "block";
}else{
  linktxt0.style.display = "block";
  linktxt1.style.display = "none";
  linktxt2.style.display = "none";
  linktxt3.style.display = "none";
  linktxt4.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]==2){document.theForm.linkurl.value = v[2]}
			if(v[1]==3){
				m = new Array;
                m = v[2].split("|");
			    document.theForm.linkpromenu.value = m[0];
			    document.theForm.linkpromenutitle.value = m[1];
			}
			if(v[1]==4){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){
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;
}

//删除选中商品
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){
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;
}

//删除选中商品
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){
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;
}

//删除选中商品
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){
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;
}

//删除选中商品
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";

        }
    }
  }	
}



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



//装修导航切换
function setZzsDHDiv(cursel){
for(i=1;i<=23;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 = "";

}	
}

//删除已添加的内容模板
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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;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<=23;i++){	
		    var div = document.getElementById("zzsdh_"+i);
            div.style.display=i==23?"block":"none";
        }
    }
  }	
}






//加载更多就近店铺
function OrderJJtheFormMore(){
var el = document.getElementById('Shopmore');
var li = document.createElement('li');

var IDs = document.theForm.IDs.value;
var wwwid = document.theForm.wwwid.value;
var newsnn = document.theForm.newsnn.value;
var wwwflag = document.theForm.wwwflag.value;
var goodsno = document.theForm.goodsno.value;
var IDs = document.theForm.IDs.value;
var ii = document.theForm.ii.value;

var url = "Orders.jj.more.asp";
var postStr = "IDs="+IDs+"&ii="+ii+"&wwwid="+wwwid+"&newsnn="+newsnn+"&wwwflag="+wwwflag+"&goodsno="+goodsno;

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.theForm.ii.value = v[1];
		}

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

//选择派单
function OrderJJtheFormSelect(PayID,UserID,Newsnn,Newsgoodsno){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var url = "Orders.jj.ok.asp";
var postStr = "IDs="+IDs+"&PayID="+PayID+"&UserID="+UserID+"&Newsnn="+Newsnn+"&Newsgoodsno="+Newsgoodsno;

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("$$$");
		
		showDiv('addDiv',600,500,'Orders.cg.asp','ID='+vs+'&backdiv=EditCaigou'+vs);

    }
  }
}


//确认提现
function uPayMchtopay(){
scscms_alert("转账中，请等待","","",99999999);
var payid = document.mchpayForm.payid.value;

$.ajax({
  type: "post",
  url: "http://"+document.domain+"/MP/Api/TenWXpay/JSSDK.asp",
  data: {payid: payid},
  success: function(data){

  v = new Array;
  v = data.split("$$$");

  if(v[2]==1){
//  document.mchpayForm.desc.value = v[1];
//  document.mchpayForm.APPID.value = v[2];
//  document.mchpayForm.MCHID.value = v[3];
//  document.mchpayForm.KEY.value = v[4];
//  document.mchpayForm.APPSECRET.value = v[5];
//  document.mchpayForm.SSLCERT_PATH.value = v[6];
//  document.mchpayForm.callback.value = v[7];
//  document.mchpayForm.amount.value = v[8];
//  document.mchpayForm.name.value = v[9];
//  document.mchpayForm.openid.value = v[10];
  
  document.mchpayForm.payid.value = v[0];
  document.mchpayForm.callback.value = v[1];
  document.mchpayForm.action="/pay/MchPay";
  document.mchpayForm.submit();
  }else{
	 scscms_alert('余额不足','ok',function(){location.href = "http://"+document.domain+"/MP/u.Fund.asp"}); 
  }

  },
  error:function(data){scscms_alert("提现失败，请重试","","",1);}
});


}



//充值减去费率
function CheckAlipayFeilvfee(fee){
var url = "u.Fund.fee.asp";
var postStr = "fee="+fee;

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("sjfeeAmount").innerHTML = vs;

    }
  }
}



//保存总商城类目微信分享
function ProSoftFxtheFormCheck(){
if (document.theForm.fx_pic.value==""){
 scscms_alert("请上传分享图","","",1);
 return false;
}
if (document.theForm.fx_desc.value==0){
 scscms_alert("请填写分享内容","","",1);
 return false;
}
}


//充值减去费率
function CheckMch2FormFeilvfee(fee){
var url = "u.Fund.mch.asp";
var postStr = "fee="+fee;

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"){
		document.getElementById("sjmchAmount").innerHTML = v[1];
		}else{
		scscms_alert(v[1],"","",1);
		document.mch2Form.amount.value=0;
		}

    }
  }
}



//PC自动提现
function uPayMch2Check(){
var amount = document.mch2Form.amount.value;
var name = document.mch2Form.name.value;
var openid = document.mch2Form.openid.value;

if (amount<=0){
 scscms_alert("请输入您要提现的金额","","",1);
 return false;
}
if (name==""){
 scscms_alert("请设置提现实名","","",1);
 return false;
}
if (openid==""){
 scscms_alert("请设置提现OpenID","","",1);
 return false;
}

scscms_alert("正在生成提现记录，请等待","","",99999999);

var url = "u.Fund.tx.asp";
var postStr = "amount="+amount+"&name="+name+"&openid="+openid;

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"){
		location.href = "Api/TenWXpay/topay.asp?payid="+v[2];
		}else{
		scscms_alert(v[1],"","",1);
		}

    }
  }  


}



//保存商品金币
function ProJBtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;

var n_jinbi = document.theForm.n_jinbi.value;

var url = "Pro.jb.ok.asp";
var postStr = "IDs="+IDs+"&n_jinbi="+n_jinbi;

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 FinancialJBNowtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_name = document.theForm.key_name.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

var url = "Financial.jb.now.asp";
var postStr = "key_name="+key_name+"&key_btime="+key_btime+"&key_etime="+key_etime;

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("已刷新统计数据","","",1);
			document.getElementById("AllPayTongflag0").innerHTML = v[0];

  }
 } 
}


//金币提现账单查询
function FinancialJBtheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_name = document.theForm.key_name.value;

if (key_btime==""){
 scscms_alert("请选择起始时间","","",1);
 return false;
}
if (key_etime==""){
 scscms_alert("请选择截止时间","","",1);
 return false;
}

document.listform.action = gourl+"?key_name="+key_name+"&key_btime="+key_btime+"&key_etime="+key_etime;
document.listform.submit();	  
}



//保存签到设置
function WangpuchinkintheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var gourl = document.theForm.gourl.value;

var txt = document.theForm.txt.value;
var days = document.theForm.days.value;
var amount = document.theForm.amount.value;
	  
if(txt==""){
scscms_alert("请填写文字提示","","",1);
return false;
}

if(days==""){
scscms_alert("请填写连续签到天数","","",1);
return false;
}

if(amount==""){
scscms_alert("请填写奖励金币数","","",1);
return false;
}

var d = new Date();
var url = "Wangpu.chinkin.edit.ok.asp";
var postStr = "IDs="+IDs+"&txt="+txt+"&days="+days+"&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;"+title;
			document.getElementById(backdiv).style.color = "#CCCCCC";
		}else{
			scscms_alert(vs,'confirm',function(){location.href = gourl});
		}
    }
  }
}




//提交采购单
function OrderCGtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var hywww = document.theForm.hywww.value;
var v_bmount = document.theForm.v_bmount.value;

if(v_bmount=="" || v_bmount<=0){
scscms_alert("没有金额无法付款","","",1);
return false;
}

var url = "Orders.cg.ok.asp";
var postStr = "IDs="+IDs+"&hywww="+hywww+"&v_bmount="+v_bmount;
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"){
			hideDiv('addDiv');
			scscms_alert(v[1],"","",1);
			document.getElementById(backdiv).innerHTML = v[2];
		}else if(v[0]=="ufund"){
			scscms_alert(v[1],'ok',function(){location.href = "u.Fund.asp"});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }

}



//采购退换货
function OrderEXLTHtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var tkje = document.theForm.tkje.value;
var tkly = document.theForm.tkly.value;

if(tkje=="" || tkje<=0){
scscms_alert("请填写退款金额","","",1);
return false;
}

var url = "Orders.exl.th.ok.asp";
var postStr = "IDs="+IDs+"&tkje="+tkje+"&tkly="+tkly;
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"){
			hideDiv('addDiv');
			scscms_alert(v[1],"","",1);
			document.getElementById(backdiv).innerHTML = v[2];
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }

}


//插入运单号
function OrderWlnumtheFormSave(backdiv){
var IDs = document.theForm.IDs.value;
var cgid = document.theForm.cgid.value;

var url = "Orders.fh.cg.asp";
var postStr = "IDs="+IDs+"&cgid="+cgid;
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],"","",1);
			document.getElementById(backdiv).value = v[1];
    }
  }

}



//采购确认收货
function OrderSHok(postStr){
var url = "Orders.sh.ok.asp";
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],"","",1);
			document.getElementById(v[1]).innerHTML = v[2];
    }
  }
}


//星星评价
function OrderflagXing(va,na){
var url = "Orders.exl.pj.xing.asp";
var postStr = "va="+va+"&na="+na;
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(na).value = va;
		document.getElementById(na+"_txt").innerHTML = vs;
    }
  }
}


//采购评价提交
function OrderEXLPJtheFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var p_fen1 = document.theForm.p_fen1.value;
var p_fen2 = document.theForm.p_fen2.value;
var p_fen3 = document.theForm.p_fen3.value;
var pmtxt = document.theForm.pmtxt.value;

if(p_fen1=="" || p_fen1<=0){
scscms_alert("请给描述打分","","",1);
return false;
}
if(p_fen2=="" || p_fen2<=0){
scscms_alert("请给服务打分","","",1);
return false;
}
if(p_fen3=="" || p_fen3<=0){
scscms_alert("请给发货打分","","",1);
return false;
}
if(pmtxt==""){
scscms_alert("请填写评价","","",1);
return false;
}

var url = "Orders.exl.pj.ok.asp";
var postStr = "IDs="+IDs+"&p_fen1="+p_fen1+"&p_fen2="+p_fen2+"&p_fen3="+p_fen3+"&pmtxt="+pmtxt;
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');
		document.getElementById(backdiv).innerHTML = vs;
    }
  }
	
}



//优惠买单推广佣金设置
function ActchecktheFormCheck(){
var a_check_yj = document.theForm.a_check_yj.value;
if(a_check_yj==""){
scscms_alert("请填写佣金占比","","",1);
return false;
}
}



//保存预约类目
function BokSofttheFormSave(){
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 nid = document.theForm.nid.value;
var title = document.theForm.title.value;
var ppid = document.theForm.ppid.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 = "Bok.soft.edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&nid="+nid+"&title="+title+"&ppid="+ppid+"&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 BokSoftFxtheFormCheck(){
if (document.theForm.fx_pic.value==""){
 scscms_alert("请上传分享图","","",1);
 return false;
}
if (document.theForm.fx_desc.value==0){
 scscms_alert("请填写分享内容","","",1);
 return false;
}
}


//预约查询
function BoktheFormSearch(){
var gourl = document.theForm.gourl.value;

var key_n = document.theForm.key_n.value;
var key_n_title = document.theForm.key_n_title.value;

document.listform.action = gourl+"?key_n="+key_n+"&key_n_title="+key_n_title;
document.listform.submit();	  
}




//保存预约信息
function BokEdittheFormCheck(){
if (document.theForm.n.value=="" || document.theForm.n.value=="0,0,0,0,0"){
 scscms_alert("请填选择所属类目","","",1);
 return false;
}
if (document.theForm.pic.value==""){
 scscms_alert("请上传项目主图","","",1);
 return false;
}
if (document.theForm.title.value==""){
 scscms_alert("请填写项目名称","","",1);
 return false;
}
if (document.theForm.timBegin.value==""){
 scscms_alert("请填写项目开始时间","","",1);
 return false;
}
if (document.theForm.timEnd.value==""){
 scscms_alert("请填写项目结束时间","","",1);
 return false;
}
}




//预约报名查询
function BokregtheFormSearch(){
var gourl = document.theForm.gourl.value;
var keynam = document.theForm.keynam.value;
var keytel = document.theForm.keytel.value;
document.listform.action = gourl+"?keynam="+keynam+"&keytel="+keytel;
document.listform.submit();	  
}



//保存摇一摇奖品信息
function ActyaoproEdittheFormCheck(){
if (document.theForm.pic.value==""){
 scscms_alert("请上传项目主图","","",1);
 return false;
}
if (document.theForm.title.value==""){
 scscms_alert("请填写项目名称","","",1);
 return false;
}
if (document.theForm.fx_desc.value==""){
 scscms_alert("请填写分享内容","","",1);
 return false;
}
}


//摇一摇中奖查询
function ActyaotheFormSearch(){
var gourl = document.theForm.gourl.value;
var keynam = document.theForm.keynam.value;
var keytel = document.theForm.keytel.value;
document.listform.action = gourl+"?keynam="+keynam+"&keytel="+keytel;
document.listform.submit();	  
}


//摇一摇中奖概率设置
function ActyaosystheFormSearch(){
var gourl = document.theForm.gourl.value;
var gailv = document.theForm.gailv.value;
var xianzhi = document.theForm.xianzhi.value;

if (Number(gailv)<=0 || Number(gailv)>100){
 scscms_alert("中奖概率超出取值范围","","",1);
 return false;
}
if (xianzhi==""){
 scscms_alert("请填写抽奖限制","","",1);
 return false;
}

var url = "Act.yao.sys.ok.asp";
var postStr = "gailv="+gailv+"&xianzhi="+xianzhi;
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);
		}else{
			scscms_alert(v[1],'ok',function(){location.href = gourl});
		}
    }
  }

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//PC商城

//类目广告
function ProSoftADtheFormCheck(){
if (document.theForm.pic.value==""){
 scscms_alert("请上传图片","","",1);
 return false;
}
if (document.theForm.info.value==""){
 scscms_alert("请填写地址","","",1);
 return false;
}
}


//保存商城新闻资讯类目
function MallNewsSofttheFormSave(){
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 nid = document.theForm.nid.value;
var title = document.theForm.title.value;
var ppid = document.theForm.ppid.value;
var x = document.theForm.x.value;
var y = document.theForm.y.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 = "Mall.News.Soft.Edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&nid="+nid+"&title="+title+"&ppid="+ppid+"&x="+x+"&y="+y+"&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 MallNewstheFormCheck(){
if (document.theForm.n_title.value==""){
 scscms_alert("请填写标题","","",1);
 return false;
}
if (document.theForm.n.value==0){
 scscms_alert("请选择分类","","",1);
 return false;
}
}


//A区轮换广告保存验证
function MallAdAtheFormCheck(){
if (document.theForm.l_title.value==""){
 scscms_alert("请填写名称","","",1);
 return false;
}
if (document.theForm.l_pic.value==""){
 scscms_alert("请上传图片","","",1);
 return false;
}
if (document.theForm.l_url.value==""){
 scscms_alert("请填写地址","","",1);
 return false;
}
}



//B区轮换广告保存验证
function MallAdBtheFormCheck(){
if (document.theForm.l_title.value==""){
 scscms_alert("请填写名称","","",1);
 return false;
}
if (document.theForm.l_pic.value==""){
 scscms_alert("请上传图片","","",1);
 return false;
}
if (document.theForm.l_url.value==""){
 scscms_alert("请填写地址","","",1);
 return false;
}
}


//C区轮换广告保存验证
function MallAdCtheFormCheck(){
if (document.theForm.l_title.value==""){
 scscms_alert("请填写名称","","",1);
 return false;
}
if (document.theForm.l_pic.value==""){
 scscms_alert("请上传图片","","",1);
 return false;
}
if (document.theForm.l_url.value==""){
 scscms_alert("请填写地址","","",1);
 return false;
}
}


//D区轮换广告保存验证
function MallAdDtheFormCheck(){
if (document.theForm.l_title.value==""){
 scscms_alert("请填写名称","","",1);
 return false;
}
if (document.theForm.l_pic.value==""){
 scscms_alert("请上传图片","","",1);
 return false;
}
if (document.theForm.l_url.value==""){
 scscms_alert("请填写地址","","",1);
 return false;
}
}


//保存商城友情链接
function MallLinkstheFormSave(){
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 urls = document.theForm.url.value;
var num = document.theForm.num.value;
	  
if(title==""){
scscms_alert("请填写链接名称","","",1);
return false;
}

if(url==""){
scscms_alert("请填写链接地址","","",1);
return false;
}

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

var d = new Date();
var url = "Mall.Links.Edit.ok.asp";
var postStr = "IDs="+IDs+"&pid="+pid+"&title="+title+"&url="+urls+"&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 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 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 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 ;

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];


  }
 }	
}


function AddressJLtheFormNull(){
scscms_alert("统计中，请等待","","",99999999);
document.getElementById("jianglilist").innerHTML="";
AddressJLtheFormSearch();
}

//统计分销奖励
var mGetTime;
function AddressJLtheFormSearch(){

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

var lastID = document.listform.lastID.value;
var lastNUM = document.listform.lastNUM.value;

var gourl = document.JLtheForm.gourl.value;

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

var keyw = document.JLtheForm.keyw.value;
var keyj = document.JLtheForm.keyj.value;
var keybtime = document.JLtheForm.keybtime.value;
var keyetime = document.JLtheForm.keyetime.value;


if(keyw==""){
scscms_alert("请填写参与条件","","",1);
return false;
}

if(Number(keyj)<=0 || Number(keyj)>100){
scscms_alert("请填写有效的奖金池比例","","",1);
return false;
}

if(keybtime==""){
scscms_alert("请选择开始时间","","",1);
return false;
}

if(keyetime==""){
scscms_alert("请选择截至时间","","",1);
return false;
}

var url = "Address.Jl.ok.asp";
var postStr = "keyt="+ keyt +"&keyw="+ keyw +"&keyj="+ keyj +"&keybtime="+ keybtime +"&keyetime="+ keyetime +"&lastID="+ lastID+"&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("$$$");
	 
	 li.innerHTML = v[1];
	 document.listform.lastID.value = v[2];
	 document.listform.lastNUM.value = v[4];
	 mGetTime = setTimeout("AddressJLtheFormSearch()",2000);
	 
	 //判断结束
	 if(v[0]=="over"){
		 scscms_alert("统计完毕",'ok',function(){location.href = gourl+"?keyt="+ keyt +"&keyw="+ keyw +"&keyj="+ keyj +"&keybtime="+ keybtime +"&keyetime="+ keyetime});
		 clearTimeout(mGetTime);
	 }
	 
	 if(v[0]=="error"){
		 scscms_alert(v[1],"","",1);
		 clearTimeout(mGetTime);
	 }
	 
	 if(v[3]==2){
		 scscms_alert("统计完毕",'ok',function(){location.href = gourl+"?keyt="+ keyt +"&keyw="+ keyw +"&keyj="+ keyj +"&keybtime="+ keybtime +"&keyetime="+ keyetime});
		 clearTimeout(mGetTime);
	 }
	 
	 
  }
el.appendChild(li);
}


}



//奖金放款
function DKJLMoney(IDs){
var IDs = document.HBtheForm.IDs.value;
var backdiv = document.HBtheForm.backdiv.value;
var gourl = document.HBtheForm.gourl.value;
var payid = document.HBtheForm.payid.value;
var amount = document.HBtheForm.amount.value;
var redname = document.HBtheForm.redname.value;
var redtitle = document.HBtheForm.redtitle.value;
var redtxt = document.HBtheForm.redtxt.value;
var redactname = document.HBtheForm.redactname.value;

if (amount<=0){
 scscms_alert("请输入红包金额","","",1);
 return false;
}
if (redname==""){
 scscms_alert("请输入发送人名称","","",1);
 return false;
}
if (redtitle==""){
 scscms_alert("请输入红包祝福语","","",1);
 return false;
}
if (redtxt==""){
 scscms_alert("请输入红包备注","","",1);
 return false;
}
if (redactname==""){
 scscms_alert("请输入红包活动名称","","",1);
 return false;
}

var url = "Address.Jl.Mch.asp";
var postStr = "IDs="+IDs+"&payid="+payid+"&amount="+amount+"&redname="+redname+"&redtitle="+redtitle+"&redtxt="+redtxt+"&redactname="+redactname;

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"){
			document.getElementById(backdiv).style.display = "none";
			scscms_alert(v[1],'confirm',function(){location.href = "Api/TenWXpay/redsend.asp?payid="+v[2]});
		}else{
			scscms_alert(v[1],"","",1);
		}
    }
  }
}


//正式发放红包
function uRedsend(){
scscms_alert("红包发送中，请等待","","",99999999);
var payid = document.redsendForm.payid.value;

$.ajax({
  type: "post",
  url: "http://"+document.domain+"/MP/Api/TenWXpay/JSSDK.asp",
  data: {payid: payid},
  success: function(data){

  v = new Array;
  v = data.split("$$$");

  if(v[2]==1){
//  document.mchpayForm.desc.value = v[1];
//  document.mchpayForm.APPID.value = v[2];
//  document.mchpayForm.MCHID.value = v[3];
//  document.mchpayForm.KEY.value = v[4];
//  document.mchpayForm.APPSECRET.value = v[5];
//  document.mchpayForm.SSLCERT_PATH.value = v[6];
//  document.mchpayForm.callback.value = v[7];
//  document.mchpayForm.amount.value = v[8];
//  document.mchpayForm.name.value = v[9];
//  document.mchpayForm.openid.value = v[10];
  
  document.redsendForm.payid.value = v[0];
  document.redsendForm.callback.value = v[1];
  document.redsendForm.action="/Redpack/Send";
  document.redsendForm.submit();
  }else{
	 scscms_alert('余额不足','ok',function(){location.href = "http://"+document.domain+"/MP/u.Fund.asp"}); 
  }

  },
  error:function(data){scscms_alert("发送失败，请重试","","",1);}
});

	
}


//红包查询
function AddressJLseartheFormSearch(){
var gourl = document.theForm.gourl.value;
var key_btime = document.theForm.key_btime.value;
var key_etime = document.theForm.key_etime.value;
var key_old = document.theForm.key_old.value;
document.listform.action = gourl+"?key_btime="+key_btime+"&key_etime="+key_etime+"&key_old="+key_old;
document.listform.submit();	
}


//红包查询结果
function uRedsearch(){
scscms_alert("红包状态查询中，请等待","","",99999999);
document.redsearchForm.action="/Redpack/Query";
document.redsearchForm.submit();
}


//微信扫码绑定提现接口
var WangpuJsDivTime;
function WangpuJserweima(w,h){
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 = "/mp5.0/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);


}






//编辑提现信息
function FinancialMchEditFormSave(){
var IDs = document.theForm.IDs.value;
var backdiv = document.theForm.backdiv.value;
var paydesc = document.theForm.paydesc.value;
var name = document.theForm.name.value;

if (paydesc==""){
 scscms_alert("请填写描述","","",1);
 return false;
}
if (name==""){
 scscms_alert("请填写实名","","",1);
 return false;
}

var url = "Financial.mch.edit.ok.asp";
var postStr = "IDs="+IDs+"&paydesc="+paydesc+"&names="+name;

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(){
			hideDiv('addDiv');
			document.getElementById(backdiv).innerHTML = "";
			}); 
		}else{
		scscms_alert(v[1],"","",1);
		}

    }
  }	
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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{           
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;
  }
 }
}

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


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

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("$$$");
	 
	 //na1.innerHTML = v[0];
	 na1.innerHTML = v[2];
	 na2.innerHTML = v[4];
	 na3.innerHTML = v[6];
	 na4.innerHTML = v[8];

	 uBottomTime = setTimeout("NowbottomList()",8000);
	 
	 if(v[10]>0){
		document.title = "【"+v[10]+"新消息】"+v[11] ; 
	 }else{
		document.title = v[11];  
	 }
	 
	 
	 if(v[3]=="No"){
	   Let('#bottom_na_1')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({
		 'background': '#FF4949',
		 'color': '#FFF'
		 })
       .pop()
       .end()
	 }else{
	   Let('#bottom_na_1')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({'color': '#A7A7A7'})
       .pop()
       .end()
	 }
	 
	 if(v[5]=="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()
	 }
	 
	 if(v[7]=="No"){
	   Let('#bottom_na_3')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({
		 'background': '#FF4949',
		 'color': '#FFF'
		 })
       .pop()
       .end()
	 }else{
	   Let('#bottom_na_3')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({'color': '#A7A7A7'})
       .pop()
       .end()
	 }
	 
	 if(v[9]=="No"){
	   Let('#bottom_na_4')
         .set({'background': '#333333'})
       .then()
       .duration(300)
         .set({
		 'background': '#FF4949',
		 'color': '#FFF'
		 })
       .pop()
       .end()
	 }else{
	   Let('#bottom_na_4')
         .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);
	 
	 
    }
}
}





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