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,"aa").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 gc(a){return $.cookie(a)}function sc(a,b,c){$.cookie(a,b,{expires:c,path:"/",domain:CFG.CookieDomain})}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,j,h,k,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(k)=="undefined")?0:k-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:j;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=j}}g[i].onmouseover=function(){this.style.backgroundColor=h}}}}return false}function listDay(j,a,b,h){var f=0;j=parseInt(j);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=((j%4==0&&j%100!=0)||j%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 Hash(){this.length=0;this.items=new Array();for(var a=0;a<arguments.length;a+=2){if(typeof(arguments[a+1])!="undefined"){this.items[arguments[a]]=arguments[a+1];this.length++}}this.removeItem=function(c){var b;if(typeof(this.items[c])!="undefined"){this.length--;var b=this.items[c];delete this.items[c]}return b};this.getItem=function(b){return this.items[b]};this.setItem=function(b,c){if(typeof(c)!="undefined"){if(typeof(this.items[b])=="undefined"){this.length++}this.items[b]=c}return c};this.hasItem=function(b){return typeof(this.items[b])!="undefined"};this.keys=function(){var c=[];for(var b in this.items){if(b!=undefined){c.push(b)}}return c}}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 dragIndex=0;function dragit(c,a){dragIndex++;var d=new zEvent(a);var b=[d.x-findPos(c)[0],d.y-findPos(c)[1]];c.style.position="absolute";c.style.left=findPos(c)[0]+"px";c.style.top=findPos(c)[1]+"px";c.style.zIndex=dragIndex;document.onmousemove=function(f){var g=new zEvent(f);c.style.left=(g.x-b[0])+"px";c.style.top=(g.y-b[1])+"px";return false};c.onmouseup=function(){document.onmousemove=new Function()};return false}function getAstro(d,b){var c="魔羯水瓶双鱼牡羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯";var a=[20,19,21,21,21,22,23,23,23,23,22,22];return c.substr(d*2-(b<a[d-1]?2:0),2)}function uploadiframe(a){if(!a){a=""}var b=document.createElement("div");b.style.cssText="height:0;width:0;visibility:hidden;";document.body.appendChild(b);b.innerHTML="<iframe name='forul"+a+"' width=0 height=0 frameborder=1 marginwidth=0 marginheight=0 vspace=0 hspace=0 allowtransparency=true scrolling=no></iframe>";return"forul"+a}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 rp(c,j){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]&&typeof(f[1])!="undefined"&&f[0]==c){a=true;f[1]=j}g[d]=f.join("=")}if(!a){g[d]=c+"="+j}return"?"+g.join("&")}}else{return"?"+c+"="+j}return false}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(",")};