function _g(a){return document.getElementById(a)}function _ce(a){a=a||"div";return document.createElement(a)}function _ct(a){return document.createTextNode(a)}function div(){return _ce("div")}function _pi(a){return(isNaN(a))?0:parseInt(a)}function _t(a){w.t(a)}String.prototype.trim=function(){if(this.length=0){return}return this.replace(/(^\s*)|(\s*$)/g,"")};String.prototype.addTag=function(a){if(isNull(this)){return}return"<"+a+">"+this+"</"+a+">"};String.prototype.nl2br=function(){return this.split("\n").join("<br />\n")};String.prototype.escapeForXML=function(){return this.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.len=function(){return this.replace(/[^\x00-\xff]/g,"aaa").length};String.prototype.getNum=function(){var b=/\D/g;var a=this.replace(b,"");return a==""?false:a};function trim(a){return a.trim()}function _is_bn(a){return(isNull(a))?false:(navigator.userAgent.toLowerCase().indexOf(a.toLowerCase())>-1)}function isArray(b){return b.constructor==Array}function isNull(a){if(a==null){return true}return(a+"").trim()+"123"=="123"}function isInt(a){return/^(-|\+)?\d+$/.test(a)}function isMail(b){var a=/^([a-zA-Z0-9]+[-_.])*[a-zA-Z0-9]+@\w+\.([a-zA-Z]{2,4}|\w+\.[a-zA-Z]{2,4})$/;return(b.search(a)>=0)}function isMobile(a){return((""+a).replace(/^1[35]\d{9}$/,"")=="")}function isTel(a){return((""+a).replace(/^[56789]\d{7}$/,"")=="")}function isChinese(a){if(a==""){return false}return(a.search(/^[^\x00-\xff]+$/g)!=-1)}function ckText(e,c,a){var d="";switch(c){case 1:d=/[a-z]+/;break;case 2:d=/[A-Z]+/;break;case 3:d=/[0-9]+/;break;case 4:d=/[^\x00-\xff]+/;break;case 5:d=/[a-zA-Z]+/;break;case 6:d=/[a-z0-9]+/;break;case 7:d=/[A-Z0-9]+/;break;case 8:d=/[a-zA-Z0-9]+/;break;case 9:d=/([a-zA-Z0-9]|[^\x00-\xff])+/;break;case 10:d=/([a-zA-Z]|[^\x00-\xff])+/;break}if(typeof(a)!="undefined"){var b=new RegExp("["+a+"]+","g");e=e.replace(b,"")}return(e.replace(d,"")=="")}function in_array(b,c){var c=new String(c).toLowerCase();var b=new String(b).toLowerCase();return((","+b+",").indexOf(","+c+",")>-1)}function is_in_area(c,d){var g=new zEvent(c);var a=g.x;var f=g.y;var b=getScroll();return(a>(findPos(d)[0]-b[0])&&a<(findPos(d)[0]+d.offsetWidth-b[0])&&f>(findPos(d)[1]-b[1])&&f<(findPos(d)[1]+d.offsetHeight-b[1]))}function findPos(a){if(a==null){return[0,0]}var b=curtop=0;if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;while(a=a.offsetParent){b+=a.offsetLeft;curtop+=a.offsetTop}}return[b,curtop]}function rmo(a){if(a!=null){if(a.rowIndex==undefined){a.innerHTML="";a.parentNode.removeChild(a)}else{a.parentNode.deleteRow(a.sectionRowIndex)}}}function auto_hide(b,a){if(b==null){return false}if(a==0){b.style.display="none";return 0}return setTimeout(function(){b.style.display="none"},a*1000)}function zEvent(a){var b=a||window.event;this.offsetX=b.layerX||b.offsetX;this.offsetY=b.layerY||b.offsetY;this.x=b.clientX||b.x;this.y=b.clientY||b.y;this.srcElement=b.target||b.srcElement;this.wheelDelta=b.detail||b.wheelDelta;this.keyCode=b.which||b.keyCode;this.o=b}function _go(a){var b=(arguments.length>1)?arguments[1]:window;b.location.href=a}function getScroll(){if(arguments.length>0){return[arguments[0].scrollLeft,arguments[0].scrollTop]}return(document.documentElement.scrollTop>0)?[document.documentElement.scrollLeft,document.documentElement.scrollTop]:[document.body.scrollLeft,document.body.scrollTop]}function gp(c){var f=(arguments.length>1)?arguments[1]:window.location.search;if(f!=null||f!=""){f=f.replace(/^\?+/,"");var e=f.split("&");var a=e.length;if(a>0){for(var d=0;d<a;d++){var b=e[d].split("=",2);if(b[0]&&b[1]&&b[0]==c){return unescape(b[1])}}}}return null}function get_extname(a){var a=new String(a).toLowerCase();return((a.lastIndexOf(".")>-1)&&((a.length-1)>a.lastIndexOf(".")))?a.substring(a.lastIndexOf(".")+1):false}function set_color(b,a){b.style.background=a}function highlight(c,a){var b="#fff";if(isNull(a)){if(!isNull(c.getAttribute("highlight"))){a=c.getAttribute("highlight")}}if(!isNull(c.style.background)){b=c.style.background}c.style.background=a;c.onblur=function(){this.style.background=b}}function setTabBG(d,f,k,h,l,e){if(_g(d)==null){return false}var b=_g(d);var g=b.getElementsByTagName("tr");var c=g.length;if(c>0){var a=(typeof(l)=="undefined")?0:l-1;var e=(typeof(e)=="undefined")?c:e;e=(e>c||e==0)?c:(e<0?(c+e):e);for(i=a;i<e;i++){g[i].style.backgroundColor=(i%2==0)?f:k;if(typeof(h)!="undefined"&&h!=null){if(i%2==0){g[i].onmouseout=function(){this.style.backgroundColor=f}}else{g[i].onmouseout=function(){this.style.backgroundColor=k}}g[i].onmouseover=function(){this.style.backgroundColor=h}}}}}function listDay(k,a,b,h){var f=0;k=parseInt(k);switch(parseInt(a)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:f=31;break;case 4:case 6:case 9:case 11:f=30;break;case 2:f=((k%4==0&&k%100!=0)||k%400==0)?29:28;break}if(b<1){b=1}if(b>f){b=f}var e=document.getElementById(h);e.innerHTML="";var c="";for(i=b;i<=f;i++){var g=document.createElement("option");g.value=i;g.text=i;e.options.add(g)}}function op_tip(e,c,f){var d=$("#op_tip_dialog_box");var b=$(e);if(d.length==1){if(e==null){b.hide();return false}d.show()}else{if(e==null){return false}d=$("<div id='op_tip_dialog_box'><div class='tip-close'></div><div class='tip-content'></div></div>").appendTo("body")}var a=b.offset();d.css("left",(a.left+b.width()/2));if(f==undefined){f="center"}if(c==undefined){c=""}if(f=="center"){d.css("left",(a.left+b.width()/2-d.width()/2))}else{if(isInt(f)){d.css("left",(a.left+b.width()/2+f))}}d.css("top",(a.top-54)).find(".tip-content").html(c);b.mouseout(function(){d.fadeOut("slow")});return d[0]}function addsfav(a,b){if((typeof window.sidebar=="object")&&(typeof window.sidebar.addPanel=="function")){window.sidebar.addPanel(b,a,"")}else{window.external.AddFavorite(a,b)}}function copyToCB(b){try{clipboardData.setData("Text",b);if(arguments.length>1){wTools.hint(arguments[1])}return true}catch(a){return false}}var wTools={};wTools.hint=function(g,h,l,f,d,m){var g=g||"";var k=f||"";if(h==undefined){h=""}d=d||"w_alert2";if(typeof m=="undefined"){m=true}if(l==undefined){l=1}var e=document.createElement("div");if(k!=""){var c=document.createElement("img");e.appendChild(c);c.src=k}else{e.style.cssText="padding:4px 0 18px;"}e.innerHTML+=g;if(h==undefined){h=""}var b=[];if(l==1){if(h!=""){b.push({caption:" 确定 ",callback:function(){w.setCallback(h,1)}},{caption:" 取消 ",callback:function(){w.setCallback(h,0)}})}else{b.push({caption:" 关闭 "})}}var a=w.UI.hint.create("",e,b,m,d);return a};wTools.hint.close=function(){w.UI.hint.close()};function rmo_time(d,b,e){var a=Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");if(e==16){rmo(d)}else{d.style.color="#"+a[e]+a[e]+a[e];setTimeout(function(){rmo_time(d,b,e+1)},b)}}function fill_distance(b,f,a){if(typeof(b[1])=="number"&&typeof(b[2])=="number"){var e="";var c=null;for(i=0;i<f.length;i++){e="";if(f[i][0]!=b[0]){e=Map2s.getDistance(b[1],b[2],f[i][1],f[i][2])}if(e!=false){for(j=0;j<a.length;j++){$o=$("#"+a[j]+f[i][0]);if($o.length>0){$o.text(e).addClass("block")}}}}}}function newvalid(a){_g(a).src="/valid_code.php?t="+Math.random()}function GradualColor(){this.idx=0;this.colorList=["#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"];this.timeId=0;this.colors=function(){var e="#ffff",f=new Array(),d,h;for(var g=0;g<256;g+=51){g=Math.floor(g);d=g.toString(16);h="00";d=h.substr(0,2-d.length)+""+d;f.push(e+d)}return f};this.run=function(b){b.style.backgroundColor=this.colorList[this.idx];this.idx++;if(this.idx==6){clearTimeout(this.timeId)}var a=this;this.timeId=setTimeout(function(){a.run(b)},200)}}Date.prototype.format=function(b){var c={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};if(/(y|Y+)/.test(b)){b=b.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))}for(var a in c){if(new RegExp("("+a+")").test(b)){b=b.replace(RegExp.$1,RegExp.$1.length==1?c[a]:("00"+c[a]).substr((""+c[a]).length))}}return b};var Format={distance:function(b,d){d=d||2;var c=Math.pow(10,d);return(b>=1000)?Math.floor(b/10)/c+"公里":Math.floor(b*c)/c+"米"},sec2time:function(a){var b=this;return a>=60?a/60>=60?Math.floor(a/3600)+"小时"+(a%3600>0?b.sec2time(a%3600):""):(Math.floor(a/60)+"分"+(a%60>0?b.sec2time(a%60):"")):(a+"秒")}};function disableHtml(c,b){var d=[];c=c.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");if(typeof(b)=="undefined"){return c}if(b.trim()!=""){d=b.split(",")}if(d.length>0){for(i=0;i<d.length;i++){if(d[i].trim()!=""){re="";re=new RegExp("&lt;(/?"+d[i]+"\\b.*?/?)&gt;","gim");c=c.replace(re,"<$1>")}}}return c}function selectCheckBox(b,a){if(typeof(b)=="undefined"){b="all"}if(typeof(a)=="undefined"){a=$(document)}$("input:checkbox",a).each(function(){switch(b){case"all":this.checked=true;break;case"clear":this.checked=false;break;case"rev":this.checked=!this.checked;break}})}function getSelectedIds(b){var a=[];b.each(function(){a.push(this.value)});return a.join(",")}function rp(c,l){var h=(arguments.length>2)?arguments[2]:window.location.search;if(h!=""){h=h.replace(/^\?+/,"");var b=h.split("&");var e=b.length;if(e>0){var g=Array();var a=false;for(var d=0;d<e;d++){var f=b[d].split("=",2);if(f[0]&&f[1]&&f[0]==c){a=true;f[1]=l}g[d]=f.join("=")}if(!a){g[d]=c+"="+l}return"?"+g.join("&")}}else{return"?"+c+"="+l}};
