function queryListMoney(){var b="ajax.do?method=doApp&app_attribute=balanceQuery";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var c=a.responseText;if(c!="-"){showTip("showLeftMoney",c+"元");}else{showTip("showLeftMoney",'<span style="color:#ff0000">查询失败，请稍后重试....</span>');}}}};}function queryCurrentFee(){var b="ajax.do?method=doApp&app_attribute=currFeeQuery";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var d=a.responseText;if(d=="failed"){showTip("showHisTip",'<span style="color:#ff0000">查询当月话费失败，请稍候重试。</span>');return;}if(d!=""&&d!="null"){showTip("resultShow",d);var c=new Date();year=c.getYear();month=c.getMonth()+1;day=c.getDate();showTip("showHisTip","当前查询的话费日期为："+year+"-"+month+"-01--"+year+"-"+month+"-"+day);}else{showTip("showHisTip",'<span style="color:#ff0000">查询失败，请稍后重试....</span>');}}else{showTip("showTip","");}}};}function queryHisFee(){var b=document.getElementById("queryMonth").value;if(b==""){queryCurrentFee();return;}var c="ajax.do?method=doApp&app_attribute=hisFeeQuery&hisTime="+b;var a=window.createXMLHttp();a.open("POST",c,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var d=a.responseText;if(d=="failed"){showTip("showHisTip",'<span style="color:#ff0000">查询历史话费失败，请稍候重试。</span>');return;}if(d!=""&&d!="null"){showTip("resultShow",d);showTip("showHisTip","查询成功！");}else{showTip("showHisTip",'<span style="color:#ff0000">查询失败，请稍后重试....</span>');}}else{showTip("showTip","");}}};}function queryPackage(){var b="ajax.do?method=doApp&app_attribute=packageQuery";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var f=a.responseText;if(f=="failed"){showTip("myPackageInfo",'<span style="color:#ff0000">查询失败，请稍后重试....</span>');return;}if(f!=""&&f!="null"){var e=f.substring(f.indexOf(":")+1).split(";");var c="";for(var d=0;d<e.length-1;d++){c+=e[d]+"；<br/><br/>";}showTip("myPackageInfo",'<span class="fontorange">尊敬的用户，您的套餐使用情况如下：</span><br/><br/>'+c);}else{showTip("myPackageInfo",'<span style="color:#ff0000">查询失败，请稍后重试....</span>');}}else{showTip("showTip","");}}};}function querySpBuss(){var b="ajax.do?method=doApp&app_attribute=querySpBuss";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var c=a.responseText;if(c=="failed"){showTip("showTip",'<span style="color:#ff0000">查询梦网业务失败，请稍候重试。</span>');return;}if(c!=""&&c!="null"){showTip("showResultSP",c);showTip("showTip","");queryOtherSpBuss();}else{showTip("showTip",'<span style="color:#ff0000">您当前无订购梦网业务</span>');}}else{showTip("showTip","");}}};}function queryOtherSpBuss(){var b="ajax.do?method=doApp&app_attribute=queryOtherSpBuss";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var c=a.responseText;if(c=="failed"){showTip("showTip",'<span style="color:#ff0000">查询非梦网业务失败，请稍候重试。</span>');return;}if(c!=""&&c!="null"){showTip("showotherResultSP",c);showTip("showTip","");}else{}}else{showTip("showTip","");}}};}function querySpBussNum(b,a){var d="ajax.do?method=doApp&app_attribute=querySpNum";if(b){d+="&cust_mobile="+b;}var c=window.createXMLHttp();c.open("POST",d,true);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.send("");c.onreadystatechange=function(){if(c.readyState==4){if(c.status==200){var e=c.responseText;showTip(a,e);}else{showTip(a,"0");}}};}function setMyLivingTown(b){var a=document.getElementById("mylivingtown");if(!b||b==""||b==null){a.style.display="none";}}function getRadioValue(){var b=document.getElementsByName("radbtn");var d=b.length;var a=[];for(var c=0;c<d;c++){if(b[c].checked){a=b[c].value.split("_");break;}}if(a.length==0){alert("请选择需要退订的梦网业务");return;}cancelSpBuss(a[0],a[1],a[2],a[3]);}function cancelSpBuss(h,i,b,g){if(!window.confirm("您确定要退订这个业务吗？")){return;}var d="";if(g==""){d="ajax.do?method=doApp&app_attribute=cancelSpBuss&spId="+h+"&serviceId="+i+"&serviceType="+b;}else{d="ajax.do?method=doApp&app_attribute=quitSpBuss&prodId="+g;}var c=d;var a=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function f(j){str=j.responseText;}});var e=str.split("|");if(e.length>1){if(e[0]=="000000"){showTip("showTip",'<span style="color:#ff0000">'+e[1]+"</span>");alert(e[1]);window.location.href="initPage?topid=cust_top&buid=pc_mapp&tailid=tail";}else{showTip("showTip",'<span style="color:#ff0000">'+e[1]+"</span>");alert(e[1]);}}else{showTip("showTip",'<span style="color:#ff0000">退订梦网业务失败，请稍候重试。</span>');alert("退订业务失败");}}function queryTask(b,a){if(document.getElementById(a)){showTip(a,'<span style="color:#ff0000">查询中，请稍后....</span>');window.setTimeout(b,500);}else{window.location.href="initPage?topid=index_top&buid=index&tailid=tail";}}function showTip(a,b){if(document.getElementById(a)){document.getElementById(a).innerHTML=b;}}window.createXMLHttp=function(){var a;if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLHTTP");}else{if(window.XMLHttpRequest){a=new XMLHttpRequest();if(a.overrideMimeType){a.overrideMimeType("text/xml");}}}if(!a){window.alert("创建XMLHttpRequest实例失败!");return false;}return a;};function queryCanAppraiseProd(b,a){if(document.getElementById(a)){showTip(a,'<span style="color:#ff0000">查询中，请稍后....</span>');window.setTimeout(b,500);}else{window.location.href="initPage?topid=index_top&buid=index&tailid=tail";}}function queryProducts(c){var b="ajax.do?method=doApp&app_attribute=queryProds&currepage="+c;var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var d=a.responseText;if(d=="failed"){showTip("showTip",'<span style="color:#ff0000">查询业务失败，请稍候重试。</span>');return;}if(d!=""&&d!="null"){showTip("can_cmt_prod_con",d);showTip("showTip","");}else{showTip("showTip",'<span style="color:#ff0000">您当前没有可以评价的业务</span>');}}else{showTip("showTip","");}}};}function exitExperBuss(e){if(!confirm("您确定取消该业务体验？")){return;}var c="ajax.do?method=doApp&app_attribute=busiExpeProd&actiontype=1&productId="+e;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(f){str=f.responseText;}});if(str==null||str==""){alert("操作失败，请稍候重试。");return;}var a=str.split("|");if(a[2]&&a[2]=="000000"){alert("成功取消该业务体验");}queryExperBuss();}function queryExperBuss(){showTip("showContent",'<span style="color:#ff0000">查询中，请稍后....</span>');var b="ajax.do?method=doApp&app_attribute=expeBusinessQueryByPercenter";var a=window.createXMLHttp();a.open("POST",b,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var d=a.responseText;showTip("showContent",d);if(!document.getElementById("starts_num")){return;}var c=trim(document.getElementById("starts_num").innerText);appendStart(parseInt(c));}else{showTip("showContent","查询失败，请稍候重试。");}}};}function buyRing(e,c,b){var d="ajax.do?method=doApp&app_attribute=buyRing&ringId="+e+"&activity_id="+c;var a=window.createXMLHttp();a.open("POST",d,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var f=a.responseText.split("|");if(f[0]=="000000"){alert(f[1]);if(c){productLog(c,e,b);}}else{if(f[0].substring(0,5)=="66666"){gxjZhangyInfo(f[0],"dingzhi");if(c){productLog(c,e,b);}}else{if(f[1]){alert(f[1]);}else{if("111111"==f[0]){alert("定制失败！！");}else{alert(f[0]);}}}}}else{}}};}function productLog(b,c,e){if(e){e=encodeURI(e);}var d="ajax.do?method=doApp&app_attribute=activitiesProductLog&active_id="+b+"&product_id="+c+"&ring_name="+e;var a=window.createXMLHttp();a.open("POST",d,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");}function buyRingAddCoin(d,b){var c="ajax.do?method=doApp&app_attribute=buyRingAddCoin&ringId="+d+"&activity_id="+b;var a=window.createXMLHttp();a.open("POST",c,true);a.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a.send("");a.onreadystatechange=function(){if(a.readyState==4){if(a.status==200){var e=a.responseText;alert(e);}else{alert("购买铃音失败"+a.status);}}};}function queryBussNumber(b,a){var d="ajax.do?method=doApp&app_attribute="+b+"&query_number_flag=1";var c=window.createXMLHttp();c.open("POST",d,true);c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");c.send("");c.onreadystatechange=function(){if(c.readyState==4){if(c.status==200){var f=c.responseText;if(f=="null"){f="0";}var e=document.getElementById(a);if(e){e.innerText=f;}}else{var e=document.getElementById(a);if(e){e.innerText="0";}}}};}
