$(document).ready(function(){$("#topbuy .website span").mouseover(function(){$(this).find("div").show()}).mouseout(function(){$(this).find("div").hide()});$("#topbuy .weblogo .so .link a").click(function(){$(this).addClass("Selected").siblings().removeClass("Selected")});function a(){var c=$.trim($("#sokey").val());if(c==""){var e='
请输入搜索关键词!
';var b=art.dialog({time:2000,title:"系统提示",content:e,width:300,height:60,lock:true,fixed:true});$("#sokey").focus();return}if($("#topbuy .weblogo .so .link a.Selected").attr("tp")){c=escape(c);var f=$("#topbuy .weblogo .so .link a.Selected").attr("url")+"?wd="+c+"&url="+location.href;window.open(f,"_blank")}else{var d=$("#topbuy .weblogo .so .link a.Selected").attr("url")+c;window.open(d)}}$("#sobtt").click(function(){a()});$("#sokey").keyup(function(b){if(b.keyCode==13){a()}})});function IsNumber(a){return/^[0-9]+$/ig.test(a)}function IsFloat(a){return/^[0-9\.]+$/ig.test(a)}function GetObjName(a){var b="";$.each(a,function(c,d){b+="Name: "+c+"\n"});alert(b)}function replaceall(c,b,a){return c.replace("/"+b+"/g",a)}function GetRandomNum(b,a){var d=a-b;var c=Math.random();return(b+Math.round(c*d))}var chars=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function GenerateMixed(c){var d="";for(var a=0;a128){h+=2}else{h++}f+=g.charAt(c);if(h>=e){return f+d}}return f};Buy.IntervalTime=function(f){if(!f.StartTime||!f.EndTime){return""}if(f.StartTime.indexOf("Date")>-1){f.StartTime=new Date(parseInt(f.StartTime.replace("/Date(","").replace(")/","").split("+")[0]))}if(f.EndTime.indexOf("Date")>-1){f.EndTime=new Date(parseInt(f.EndTime.replace("/Date(","").replace(")/","").split("+")[0]))}var c=new Date(f.StartTime);var d=new Date(f.EndTime);var e=d.getTime()-c.getTime();var r=Math.floor(e/(12*30*24*3600*1000));var i=e%(12*30*24*3600*1000);var o=Math.floor(i/(30*24*3600*1000));var j=i%(30*24*3600*1000);var g=Math.floor(j/(24*3600*1000));var k=j%(24*3600*1000);var h=Math.floor(k/(3600*1000));var l=k%(3600*1000);var n=Math.floor(l/(60*1000));var m=l%(60*1000);var p=Math.round(m/1000);var q="";if(r>0){q+=r+"年"}if(o>0){q+=o+"月"}if(g>0){q+=g+"天"}if(h>0){q+=h+"小时"}if(q==""){q+=n+"分钟"}return q};Buy.Hashtable=function(c){var d={putappend:false,KeyReset:true};d=MES.VariableSettings(d,c);this.container=new Object();this.put=function(e,f){if(typeof(e)=="undefined"){return false}if(!d.putappend){if(this.contains(e)){if(d.KeyReset){if(f){this.container[e]=""}else{this.container[e]=typeof(f)=="undefined"?null:f}}else{return false}}}if(this.contains(e)){if(typeof(f)!="undefined"){this.container[e]+=f}}else{this.container[e]=typeof(f)=="undefined"?null:f}return true};this.remove=function(e){delete this.container[e]};this.size=function(){var f=0;for(var e in this.container){f++}return f};this.get=function(e){return this.container[e]};this.contains=function(e){return typeof(this.container[e])!="undefined"};this.clear=function(){for(var e in this.container){delete this.container[e]}};this.GetValue=function(){return this.container};this.toArray=function(){var f=[];for(var e in this.container){f.push(this.container[e])}return f};this.toString=function(){var f="";for(var e in this.container){f+=","+e+"='"+this.container[e]+"'"}if(f.length>0){f=f.substr(1,f.length)}return"{"+f+"}"}};Buy.Login=function(){parent.location.href="http://www.coal.org.cn/zhu_che/member_wrong.aspx?"+parent.location.href};Buy.AddWeiTuo=function(g,c,f,d,e){InParam=new ParamClass();InParam.SetValue("title",c);InParam.SetValue("type",g);InParam.SetValue("Detailed",d);InParam.SetValue("TelNumber",f);InParam.SetValue("Contact",c);fnCallEx("AddTogetherResource",InParam,"/Transfer.aspx",function(h){if(h>0){if(e){e()}alert("您的撮合信息提交完成!")}else{alert(h)}})};Buy.AddWeiTuoLink=function(){window.open("/wt/add.htm")};Buy.eReg=function(c){if(c){parent.location.href="http://www.coal.org.cn/zhu_che/register.aspx?url="+parent.location.href+"&addbuy=1"}else{parent.location.href="http://www.coal.org.cn/zhu_che/register.aspx?url="+parent.location.href}};Buy.eQuit=function(){parent.location.href="http://www.coal.org.cn/quit.aspx?BackUrl="+parent.location.href};Buy.ShowFinaceAdd=function(){window.open("http://www.coal.org.cn/rongzidaikuan/message.aspx")};Buy.ShowWeiTuo=function(){art.dialog.open("/index.aspx",{title:"提示"})};Buy.WebRedirect=function(d,c){var e="http://www.coal.org.cn/WebRedirect.aspx?url=http://www.coal.org.cn/UserCtrl/main.aspx&rurl="+d+"&rName="+escape(c);window.open(e)};Buy.GET_SMSCode=function(e,f){if(f=="lig"){a.ligerDialog.waitting('加载中,请稍候...')}else{var d=art.dialog({title:"系统提示",content:'
验证码发送中请等待...
',width:550,height:60,lock:true,fixed:true})}var c={};c.fname="C002";jQuery.post("/TradingCenter/ajax.aspx",c,function(g){if(g>0){a("#"+e).html("今天暂未获取交易安全验证码(点击获取)");if(f=="lig"){a.ligerDialog.waitting("发送完毕...");setTimeout(function(){a.ligerDialog.closeWaitting()},3000)}else{d.content('
发送完毕...
').time(3000)}}else{if(f=="lig"){a.ligerDialog.waitting(g);setTimeout(function(){a.ligerDialog.closeWaitting()},5000)}else{d.content('
'+g+"
").time(5000)}}})};Buy.GET_SMSCount=function(d){var c={};c.fname="C002";c.te="t";a.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=utf-8"});jQuery.post("/TradingCenter/ajax.aspx",c,function(e){if(d){if(e<1){a("#"+d).html("今天暂未获取交易安全验证码(点击获取)")}else{a("#"+d).attr("scount",e);a("#"+d).html("今天已经获取交易安全验证码(点击获取)")}}})};Buy.ISVerificationCode=function(c){if(!c.errMsg||c.errMsg=="Y"){c.errMsg="Y"}else{c.errMsg="N"}if(a("#"+c.id).val()==""){if(c.errMsg=="Y"){if(c.ui=="lig"){a.ligerDialog.waitting("请输入交易安全短信认证码!");setTimeout(function(){a.ligerDialog.closeWaitting()},3000)}else{Buy.ShowErrText({id:"txtSMSCode",text:"请输入交易安全短信认证码!",time:3000})}}return false}else{if(a("#"+c.id).attr("vc")!="ok"){if(c.errMsg=="Y"){if(c.ui=="lig"){a.ligerDialog.waitting("交易安全短信认证码输入错误!");setTimeout(function(){a.ligerDialog.closeWaitting()},3000)}else{Buy.ShowErrText({id:"txtSMSCode",text:"交易安全短信认证码输入错误!",time:3000})}}return false}else{return true}}};Buy.VerificationCode=function(c){if(!c.id){return}var e=a("#"+c.id);var d="";var f=null;if(c.tipid){f=a("#"+c.tipid);f.addClass("yzm")}else{f=a("#"+c.id+"tip");f.addClass("yzm")}e.attr("vc","ins");if(e.val().length==0){f.html("请填写交易安全短信认证码")}e.keyup(function(){if(e.val().length==0){e.attr("vc","err");f.html("请填写交易安全短信认证码");return}else{if(e.val().length<6){e.attr("vc","err");f.html("交易安全短信认证码为6位数字");return}}if(e.val().length==6){if(d==e.val()){return}d=e.val();var g={};g.fname="eVerificationCode";g.smscode=e.val();e.attr("disabled","disabled");if(f!=null){f.html("验证中...")}jQuery.post("/TradingCenter/ajax.aspx",g,function(h){if(h=="ok"){e.attr("vc","ok");f.html("交易安全短信认证码输入正确.")}else{e.attr("vc","err");f.html(""+h);e.removeAttr("disabled");e.focus()}})}})};var b;Buy.ShowErrText=function(c){if(!c.time){b=art.dialog({title:"系统提示",content:'
'+c.text+"
",width:480,height:70,lock:true,fixed:true,button:[{value:"知道了",callback:function(){b.close();if(objfocus){a("#"+c.id).focus()}},focus:true}]})}else{b=art.dialog({title:"系统提示",content:'
'+c.text+"
",width:480,height:70,lock:true,fixed:true,button:[{value:"知道了",callback:function(){b.close();if(objfocus){a("#"+c.id).focus()}},focus:true}]}).time(c.time)}}})(jQuery); var __bIsCallBack=true;var __bIsIE=false;var __nDx=0;var __nDy=0;var __oWaitMessage=null;var __nWaitTimeID=0;var __xmlHttp=null;var __fnCallBack=null;var __fnArray=new Array();var __nWaitCallBack=0;var stroldFnName=null;var __oBodyObjToPopup=null;function __fnGetRequestString(a){if(typeof(a)=="string"&&a.length>0){a=a.toLowerCase();var c=window.location["href"]["toLowerCase"]();var d=c.indexOf("?");if(d>-1){c=c.substring(d+1)}var e=c.split("&");var b=a.length+1;for(var f=0;fb)&&e[f]["substring"](0,b)==(a+"=")){return window.unescape(e[f]["substring"](b))}}return""}else{return""}}function ImportScript(a,d,b){if(d){window.document["write"]('')}else{var c=window.document["getElementsByTagName"]("head")["appendChild"](window.document["createElement"]("script"));c.type="text/javascript";c.src=a;c.onload=b}}function NewXmlDoc(){var a=null;if(window.ActiveXObject){a=new ActiveXObject("MSXML2.DOMDocument.3.0");if(a!=null){a.async=false;a.preserveWhiteSpace=true}}else{if(window.document["implementation"]&&window.document["implementation"]["createDocument"]){a=window.document["implementation"]["createDocument"]("","",null)}}a.async=false;return a}if(window.ActiveXObject){__bIsIE=true}function GetNodesByPath(c,a){var b=GetXmlDocByXml(c);if(b.hasChildNodes&&b.documentElement["hasChildNodes"]){return __fnGetXmlList(b.documentElement,a)}else{return null}}function GetXmlDocByXml(b){var c=NewXmlDoc();if(typeof(b)=="string"&&b.length>0){if(__bIsIE){c.loadXML(b)}else{var a=new DOMParser();c=a.parseFromString(b,"text/xml")}}return c}function __fnGetXmlList(e,c){if(e!=null&&e.hasChildNodes){var d=null;var b=0;if(__bIsIE){d=e.selectNodes(c)}else{d=new window.Array(e.childNodes["length"]);for(var a=0;a���ڴ�����...","window.clearInterval(__nWaitTimeID);");__nWaitTimeID=window.setInterval(__fnChangeWaitMessage,1000)}}else{if(__oWaitMessage!=null){__oWaitMessage.fnClose();__oWaitMessage=null;window.clearInterval(__nWaitTimeID);__nWaitTimeID=0}}}function __fnChangeWaitMessage(){if(_getObj("__oWaitFont")!=null){var a=_getObj("__oWaitFont")["innerHTML"];if(a.length<12){_getObj("__oWaitFont")["innerHTML"]=a+"."}else{_getObj("__oWaitFont")["innerHTML"]="���ڴ�����..."}}}function fnReplaceBadChar(c){var b=_getObj(c);if(b!=null){var d=b.elements["length"];for(var a=0;a-1){b.elements[a]["value"]=b.elements[a]["value"]["replace"](/['<>`\"]/g,"");b.elements[a]["value"]=b.elements[a]["value"]["replace"](/^\s{0,}|\s{0,}$/g,"");b.elements[a]["value"]=b.elements[a]["value"]["replace"](/(�ҿ�|����|�Ҳ�|����|����|fuck|FUCK|bitch|�����|�԰�|��\s{0,}��\s{0,}��|��\s{0,}��|falundafa|falun|������|������|����Ƭ|�չ�����|��׬ǧԪ)/g,"")}}}}function fnClearFormValue(b){var d=_getObj(b);if(d!=null){var a=d.elements["length"];for(var c=0;c`!;#$=\"]/g,"");return a.replace(/^\s{1,}|\s{1,}$/g,"")["replace"](/(�ҿ�|����|�Ҳ�|����|����|fuck|FUCK|bitch|�����|�԰�|��\s{0,}��\s{0,}��|falundafa|falun|������|������|����Ƭ|�չ�����|��׬ǧԪ)/g,"")}function btnClickOnOpenWindow(){var a=false;if(typeof(ifrOpenMain.SetOutParams)=="undefined"){a=null}else{a=ifrOpenMain.SetOutParams()}if(a==false){return}if(window.dialogArguments["InParam"]!=null){try{window.returnValue=window.dialogArguments["InParam"]["ToString"]()}catch(b){}}else{window.returnValue=null}window.close()}function Call(e,c,a,b){if(c==null){c=new ParamClass()}c.__XmlDoc["documentElement"]["setAttribute"]("FunctionName",e);var d=GethttpRequest();d.open("POST",b,false);d.send(c.ToString());if(d.responseText==null||d.responseText==""){window.alert(a);return false}c=new ParamClass(d.responseText);return c.GetValue("Result")}function __fnWaitCallBack(){if(__fnArray.length==0){window.clearInterval(__nWaitCallBack);__nWaitCallBack=0}else{fnCallEx(__fnArray[0][0],__fnArray[0][1],__fnArray[0][2],__fnArray[0][3],true)}}function fnPushWaitArray(c,a,b,d){var e=new Array(4);e[0]=c;e[1]=a;e[2]=b;e[3]=d;if(__fnArray!=null){__fnArray.push(e);if(__nWaitCallBack==0){__nWaitCallBack=window.setInterval(__fnWaitCallBack,100)}}}function fnCallEx(j,c,e,h,f){try{var g=location.pathname.toLowerCase();if(g.indexOf("/webmasters")>-1){if(!IsSetPassWord()){location.reload();return}if(document.all.MakeSeal1.getCertDN==""){alert(DidNotFindKey);location.reload();return}c.SetValue("cacode",GetCaCode())}}catch(b){alert(b)}if(typeof(__fnArray)!="undefined"&&__fnArray!=null){if(navigator.appName=="Microsoft Internet Explorer"&&document.readyState!="complete"){var a=false;for(var d=0;d<__fnArray.length;d++){if(__fnArray[d][0]==j&&__fnArray[d][1]==c&&__fnArray[d][2]==e&&__fnArray[d][3]==h){a=true;break}}if(!a){fnPushWaitArray(j,c,e,h)}return}}if(__fnCallBack!=null&&__fnCallBack!=h&&(typeof(f)=="undefined")){fnPushWaitArray(j,c,e,h);return}if((typeof(f)!="undefined")&&f&&__fnCallBack!=null){return}else{if(f){if(__fnArray.length>0){__fnArray.shift()}}}if(c==null){c=new ParamClass()}if(__xmlHttp!=null){__xmlHttp=null;if(__bIsIE){CollectGarbage()}}__xmlHttp=GethttpRequest();__xmlHttp.onreadystatechange=fnHandleStateChange;stroldFnName=j;c.__XmlDoc["documentElement"]["setAttribute"]("FunctionName",j);__fnCallBack=h;__xmlHttp.open("POST",e,true);__xmlHttp.send(c.ToString())}function GethttpRequest(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){return new ActiveXObject("MsXml2.XmlHttp")}}}function fnHandleStateChange(){if(typeof(__xmlHttp)!="undefined"&&__xmlHttp!=null&&__xmlHttp.readyState==4){if(__xmlHttp.status==200&&__fnCallBack!=null){if(__oWaitMessage!=null){__fnWaitMessage(false)}var a=new ParamClass(__xmlHttp.responseText);__fnCallBack(a.GetValue("Result"))}__fnCallBack=null}}function ParamClass(d){if(__bIsIE){CollectGarbage()}var c=NewXmlDoc();var a=null;if(d&&typeof(d)=="string"){if(window.ActiveXObject&&typeof(c.loadXML)!="undefined"){if(!c.loadXML(d)){a=c.createElement("Root");c.appendChild(a)}}else{var b=new DOMParser();c=b.parseFromString(d,"text/xml")}}else{a=c.createElement("Root");c.appendChild(a)}this["__XmlDoc"]=c;this["SearchNode"]=function(g){a=null;if(window.ActiveXObject){a=c.selectSingleNode("//Root/Node[@ParamName='"+g+"']")}else{var f=c.documentElement;for(var e=0;e-1)){return a["arguments"][b]}}a=a.caller}return window.event}function fnResetIframeHeight(){try{if(parent.document["getElementById"]("ifrMain")!=null){parent.document["getElementById"]("ifrMain")["height"]=window.document["body"]["scrollHeight"]}}catch(a){}}function AttachEvent(c,d,b,a){if(c.addEventListener){var e=(typeof(a)!="undefined"&&a)?true:false;c.addEventListener(d,b,e)}else{c.attachEvent("on"+d,b)}}function DeleteEvent(a,b,c){if(a.addEventListener){a.removeEventListener(b,c,false)}else{a.detachEvent("on"+b,c)}}function _getObj(a){if(typeof(a)!="string"||a==""){return null}if(window.document["getElementById"]){return window.document["getElementById"](a)}try{return window["eval"](a)}catch(b){return null}}function serializeXml(a){var b=new XMLSerializer();return b.serializeToString(a)}function __fnGetXmlNodeXml(a){if(a!=null){if(__bIsIE){return a.xml}else{return serializeXml(a)}}else{return""}}function fnReSetPage(a){switch(a.keyCode){case 37:if(typeof(strPrePage)!="undefined"&&strPrePage!=""){window.location["href"]=strPrePage}else{if(_getObj("ifrMain")!=null&&typeof(_getObj("ifrMain")["contentWindow"]["strPrePage"])!="undefined"&&_getObj("ifrMain")["contentWindow"]["strPrePage"]!=""){_getObj("ifrMain")["contentWindow"]["location"]["href"]=_getObj("ifrMain")["contentWindow"]["strPrePage"]}}break;case 39:if(typeof(strNextPage)!="undefined"&&strNextPage!=""){window.location["href"]=strNextPage}else{if(_getObj("ifrMain")!=null&&typeof(_getObj("ifrMain")["contentWindow"]["strNextPage"])!="undefined"&&_getObj("ifrMain")["contentWindow"]["strNextPage"]!=""){_getObj("ifrMain")["contentWindow"]["location"]["href"]=_getObj("ifrMain")["contentWindow"]["strNextPage"]}}break}}function fnClearLocation(){__nDx=0;__nDy=0}function fnGetLocation(a){if(a!=null&&typeof(a.offsetTop)!="undefined"){__nDx+=window.parseInt(a.offsetLeft);__nDy+=window.parseInt(a.offsetTop);if(typeof(a.offsetParent)!="undefined"){fnGetLocation(a.offsetParent)}}}function __fnClearBaseResource(){if(__nWaitTimeID){window.clearInterval(__nWaitTimeID)}__fnArray=null}function __fnSetPageAction(){__oBodyObjToPopup=(window.document["documentElement"]&&(window.document["documentElement"]["clientWidth"]>0))?window.document["documentElement"]:window.document["body"];AttachEvent(window.document,"keydown",fnReSetPage)}function SelectAllTxtNull(){for(var b=0;b10){alert("�ɹ��۸���಻�ܳ�������λ���֣�����");return}var a=/^[0-9\.]+$/ig.test(b);if(!a){alert("�ɹ��۸�ֻ��Ϊ���֣�����");return}}}function GetBrower(){var g=navigator.userAgent;var e=g.indexOf("Opera")>-1;if(e){return"Opera"}var b=g.indexOf("KHTML")>-1||g.indexOf("Konqueror")>-1||g.indexOf("AppleWebKit")>-1;var f=g.indexOf("AppleWebKit")>-1&&b;var c=g.indexOf("Konqueror")>-1&&b;if(f){return"Safari"}if(c){return"Konqueror"}var a=g.indexOf("compatible")>-1&&g.indexOf("MSIE")>-1&&!e;if(a){return"IE"}var d=g.indexOf("Gecko")>-1&&!b;if(d){return"Mozilla"}return"None"}var IEType=GetBrower();function ShowsizeChange(){try{if(IEType=="Mozilla"){parent._getObj("formRight").height=formRight.document.body.scrollHeight;parent.document.getElementById("formRight").height=formRight.document.body.scrollHeight}else{parent.document.getElementById("formRight").height=parent.document.frames("formRight").document.body.scrollHeight+30}}catch(a){alert(a.message)}}function ShowsizeChange2(){try{if(IEType=="Mozilla"){parent._getObj("formRight").height=formRight.document.body.scrollHeight;parent.document.getElementById("formRight").height=formRight.document.body.scrollHeight}else{parent.document.getElementById("formRight").height=parent.document.frames("formRight").document.body.scrollHeight+80}}catch(a){alert(a.message)}}function WinGo(){window.history.back()}function UserRegyanZheng(a){return/^[a-zA-Z0-9]+$/ig.test(a)}function IsNumber(a){return/^[0-9]+$/ig.test(a)}function IsFloat(a){return/^[0-9\.]+$/ig.test(a)}function IsEmpty(a){if(a==""){return false}else{return true}}function IsEamil(b){var a=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;return a.test(b)}function IsWebUrl(a){var b=/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\:+!]*([^<>])*$/;return b.test(a)}function YanZhengIsEamil(b,a){if(!IsEamil(_getObj(b).value)){alert(a);_getObj(b).focus();return false}return true}function TextIsNull_Onfly(c,b,a){if(_getObj(c).value==""){alert(a);_getObj(b).focus();return false}return true}function YanZhengSelect(b,a){if(_getObj(b).value==""){alert(a);_getObj(b).focus();return false}return true}function YanZhengText(f,d,a,c,e,b){if(_getObj(f).value==""){alert(c);_getObj(f).focus();return false}if(_getObj(f).value.lengtha){alert(b);_getObj(f).focus();return false}return true}function IsNumberTextNull(b,a){if(!IsNumber(_getObj(b).value)){alert(a);_getObj(b).focus();return false}return true}function IsNumberText(f,d,a,c,e,b){if(!IsNumber(_getObj(f).value)){alert(c);_getObj(f).focus();return false}if(_getObj(f).value.lengtha){alert(b);_getObj(f).focus();return false}return true}function YanZhengRadioValue(d,b,c){var e=document.getElementsByName(d);var f="";for(var a=0;a1073741824){document.write((Math.round((a/1073741824)*100)/100).toString()+" G")}else{if(a>1048576){document.write((Math.round((a/1048576)*100)/100).toString()+" M")}else{if(a>1024){document.write((Math.round((a/1024)*100)/100).toString()+" K")}else{document.write(a.toString()+" Bytes")}}}}function GetRadioValue(b){var c=document.getElementsByName(b);for(var a=0;a