
var s_GridView_CurrenPage='1';var addressid="0";var yid="0"
var zid="0";var xmlHttp;var xmlHttpGet;var time=3;var tiaojian;var num=0;function GetXmlHttpObject(){var xmlHttpNew=null;try{xmlHttpNew=new XMLHttpRequest();}
catch(e){try{xmlHttpNew=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){xmlHttpNew=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttpNew;}
function Contact(s_Param_PageNumber,str){s_GridView_CurrenPage=s_Param_PageNumber;tiaojian=str;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Common.aspx';url=url+"?SID="+Math.random();xmlHttp.onreadystatechange=addContactOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addContactOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestContact();}}}
function GuestContact(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url+tiaojian;url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=ContactOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function ContactOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功转移'+num+'封到常用联系人组');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function Area(s_Param_PageNumber,addid,str){s_GridView_CurrenPage=s_Param_PageNumber;addressid=addid;tiaojian=str;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Area.aspx';url=url+"?SID="+Math.random();url=url+"&Addressid="+addressid;xmlHttp.onreadystatechange=addAreaOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addAreaOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestArea();}}}
function GuestArea(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url+tiaojian;url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=AreaOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function AreaOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功转移'+num+'封到地区组');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function Intention(s_Param_PageNumber,intid,str){s_GridView_CurrenPage=s_Param_PageNumber;yid=intid;tiaojian=str;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Intention.aspx';url=url+"?SID="+Math.random();url=url+"&yid="+yid;xmlHttp.onreadystatechange=addIntentionOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addIntentionOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestIntention();}}}
function GuestIntention(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url+tiaojian;url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=IntentionOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function IntentionOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功转移'+num+'封到意向客户');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function account(s_Param_PageNumber,zsid,str){s_GridView_CurrenPage=s_Param_PageNumber;xmlHttp=GetXmlHttpObject();tiaojian=str;if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Sub-account.aspx';url=url+"?SID="+Math.random();url=url+"&zuserid="+zsid;xmlHttp.onreadystatechange=addaccountOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addaccountOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{Guestaccount();}}}
function Guestaccount(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url+tiaojian;url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=accountOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function accountOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功转移'+num+'封到子账户');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function Customize(s_Param_PageNumber,Cusid,str){s_GridView_CurrenPage=s_Param_PageNumber;zid=Cusid;tiaojian=str;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Customize.aspx';url=url+"?SID="+Math.random();url=url+"&zid="+zid;xmlHttp.onreadystatechange=addCustomizeOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addCustomizeOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestCustomize();}}}
function GuestCustomize(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url+tiaojian;url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=CustomizeOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function CustomizeOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功转移'+num+'封到自定义');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function del(s_Param_PageNumber){s_GridView_CurrenPage=s_Param_PageNumber;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='del.aspx';url=url+"?SID="+Math.random();xmlHttp.onreadystatechange=adddelOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function adddelOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{Guestdel();}}}
function Guestdel(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=delOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function delOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功删除'+num+'封到回收站');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function Resume(s_Param_PageNumber){s_GridView_CurrenPage=s_Param_PageNumber;xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("浏览器不支持 AJAX!");return;}
var postParam='id=';var checkbox=document.getElementsByName("checkbox1");for(var i=0;i<checkbox.length;i++){if(checkbox[i].checked){num++;postParam+=checkbox[i].value+",";}}
if(postParam!="id=")
{loadding();var url='Resume.aspx';url=url+"?SID="+Math.random();xmlHttp.onreadystatechange=addResumeOK;xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(postParam);}
else
{alert("请先选择!");}}
function addResumeOK(){if(xmlHttp.readyState==4){if(xmlHttp.responseText.indexOf('错误')>=0){alert(xmlHttp.responseText);}
else{GuestResume();}}}
function GuestResume(){xmlHttpGet=GetXmlHttpObject();if(xmlHttpGet==null){alert("浏览器不支持 AJAX!");return;}
var url=''+location.href+'';if(url.indexOf("?")>0){url=url+"&page="+s_GridView_CurrenPage;}
else{url=url+"?page="+s_GridView_CurrenPage;}
url=url.replace("undefined","").replace("#","");xmlHttpGet.onreadystatechange=ResumeOK;xmlHttpGet.open("GET",url,true);xmlHttpGet.send(null);}
function ResumeOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;loadbiaoji1('成功恢复'+num+'封');var intervalid=setTimeout("fun();",4000);num=0;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function BookOK(){if(xmlHttpGet.readyState==4){var gustBookDiv=document.getElementById("middle3");gustBookDiv.innerHTML=xmlHttpGet.responseText;try
{var selObj=document.getElementById('PageNumber');var selObj1=document.getElementById('PageNumber1');selObj.options[s_GridView_CurrenPage-1].selected=true;selObj1.options[s_GridView_CurrenPage-1].selected=true;}
catch(err)
{}}}
function loadding(){var tips=document.getElementById("etw_tips");tips.style.backgroundColor='#FCF7DC';tips.style.border='1px #ccc solid';tips.style.color='#666666';tips.innerHTML="<img src=\"images/loadding.gif\"/>数据加载中,请稍等。。。";}
function loadbiaoji(shuoming){var tips=document.getElementById("etw_tips");tips.style.backgroundColor='#16960E';tips.style.border='1px #ccc solid';tips.style.color='#ffffff';if(shuoming==1)
{tips.innerHTML="标记成功";}
else if(shuoming==2)
{tips.innerHTML="标记已经取消";}}
function loadbiaoji1(strtips){var tips=document.getElementById("etw_tips");tips.style.backgroundColor='#16960E';tips.style.border='1px #ccc solid';tips.style.color='#ffffff';tips.innerHTML=""+strtips+"";}
function fun(){var tips=document.getElementById("etw_tips");tips.innerHTML="";tips.style.backgroundColor='';tips.style.border='';}
navHover=function(){var lis=document.getElementById("navmenu").getElementsByTagName("LI");for(var i=0;i<lis.length;i++){lis[i].onmouseover=function(){this.className+=" iehover";}
lis[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" iehover\\b"),"");}}}
if(window.attachEvent)window.attachEvent("onload",navHover);