var CFG={CookieDomain:""};if((window.location.host).search(/.*\.niaoke\.com$/g)!=-1){CFG.CookieDomain="niaoke.com"}var channel="rent";var res_char={select_submit:["确定要找这里的房子么？","确定您的房子在这里么？"],hintTip:{error:'对不起，出错了，请稍后再试！<a href="http://www.woxiangyougejia.com/group/1">汇报情况</a>',loadingMsg:"<img src='/i/loading.gif' height='16' width='16' align='absmiddle'/> 正在读取内容，请稍候...",loadingLineMsg:"<img src='/i/loading.gif' height='16' width='16' align='absmiddle'/> 正在加载路线，请稍候...",submitMsg:"<img src='/i/loading.gif' height='16' width='16' align='absmiddle'/> 正在提交内容，请稍候...",delMsg:"<img src='/i/loading.gif' height='16' width='16' align='absmiddle'/> 正在删除内容，请稍候...",successMsg:"成功了！",failMsg:"居然没有成功！！请稍候再来试试吧。"},closeWin:"点我可以关闭哦",dragWin:"按住我拖动"};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_\-\.]+?)(?=\.[a-zA-Z]{2,4})(\.[a-zA-Z]{2,4}){1,2}$/;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,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){d.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]}var cuetimeid=0;var show_cue=function(b,c){var d=_g("q");var a=_g(b);if(isNull(c)||(c==undefined)){if(a!=null){a.innerHTML="";a.style.display="none"}return false}if(cuetimeid>0){clearTimeout(cuetimeid)}if(a!=null){a.innerHTML="";a.style.display="block"}else{a=document.createElement("div");document.body.appendChild(a);a.id=b;a.className="searchcue";a.style.cssText="z-index:1100;left:"+findPos(d)[0]+"px;top:"+(findPos(d)[1]+d.offsetHeight)+"px;width:"+(d.offsetWidth-4-2)+"px;"}a.innerHTML=c+"<iframe src='' style='position:absolute; visibility:inherit; top:0px; left:0px; width:"+(a.offsetWidth-2)+"px; height:"+(a.offsetHeight-2)+"px; z-index:-1;border:0px;' frameborder='0' scrolling='no'></iframe>";a.onmouseover=function(f){if(cuetimeid>0){clearTimeout(cuetimeid)}var g=new zEvent(f);if(g.srcElement.tagName=="LI"){g.srcElement.style.cssText="color:#fff;background:#0099ff;cursor:default;";d.value=g.srcElement.innerHTML;g.srcElement.onmouseout=function(){this.style.cssText="background:#ffffff;color:#000000;"};g.srcElement.onclick=function(){_g("qf").submit()}}};a.onmouseout=function(){cuetimeid=auto_hide(this,3)};document.onmousedown=function(f){if(!is_in_area(f,a)){a.style.display="none"}}};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}}function cklen(c,a){var b=c.value;if(b.len()>a){op_tip(c,"您写得太多了~~","center")}else{if(b.len()>a-Math.ceil(a/20)){op_tip(c,"您还可以输入"+(a/2-Math.ceil(b.len()/2))+"个汉字或"+(a-b.len())+"个字符","center")}else{op_tip(null)}}}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 m_sign(d,g){if(g==0){op_tip(d,"请先登录哦~~","center");return false}var b=d.parentNode;var k=b.innerHTML;var c=d.innerHTML;var a=((typeof(d.textContent)=="undefined")?d.innerText:d.textContent);b.innerHTML="";var h=document.createElement("textarea");b.appendChild(h);h.value=a.trim();h.cols=23;h.rows=5;h.id="sign_inp";var f=document.createElement("input");f.type="submit";f.value="修改";b.appendChild(f);var e=document.createElement("input");e.type="button";e.value="取消";b.appendChild(e);e.onclick=function(){b.innerHTML=k};document.onkeyup=function(n){try{var m=new zEvent(n);if(m.keyCode==27){b.innerHTML=k}}catch(l){}};b.onsubmit=function(){if(_g("sign_inp")!=null){var l=_g("sign_inp").value;if(l.trim()!=a){if(l.trim().len()>500){op_tip(h,"不行，太长！~~","center");return false}k=k.replace(c,l.trim().escapeForXML()+" <img src='/i/edit_16x16.gif' width='16' height='16' class='vm'/>");$.ajax({type:"POST",url:"/x/user_info.php",dataType:"html",data:"ac=m&id="+g+"&sign="+encodeURIComponent(l.trim()),error:function(m){},success:function(m){}})}}b.innerHTML=k;document.onkeyup=new Function();return false}}function m_nick(d,g){if(g==0){op_tip(d,"请先登录哦~~","center");return false}var b=d.parentNode;var k=b.innerHTML;var c=d.innerHTML;var a=((typeof(d.textContent)=="undefined")?d.innerText:d.textContent);b.innerHTML="";var h=document.createElement("input");b.appendChild(h);h.value=a.trim();h.size=20;h.id="nick_inp";var f=document.createElement("input");f.type="submit";f.value="修改";b.appendChild(f);var e=document.createElement("input");e.type="button";e.value="取消";b.appendChild(e);e.onclick=function(){b.innerHTML=k};document.onkeyup=function(n){try{var m=new zEvent(n);if(m.keyCode==27){b.innerHTML=k}}catch(l){}};b.onsubmit=function(){if(_g("nick_inp")!=null){var l=_g("nick_inp").value;if(l.trim()!=a){if(l.trim().len()==0){op_tip(h,"不行，必须得有昵称哦！","center");return false}if(l.trim().len()>50){op_tip(h,"不行，太长！~~","center");return false}k=k.replace(c,l.trim().escapeForXML()+" <img src='/i/edit_16x16.gif' width='16' height='16' class='vm'/>");$.ajax({type:"POST",url:"/x/user_info.php",dataType:"html",data:"ac=m_nick&id="+g+"&nick="+encodeURIComponent(l.trim()),error:function(m){},success:function(m){}})}}b.innerHTML=k;document.onkeyup=new Function();return false};h.focus()}var chuo_time=new Date();var chuo_i=0;function chuo(b,d,h,e){if(lu<1){wTools.hint("您还没有登录哦。请先登录啦~:)","",1,"/i/attention3_16x16.gif");return false}if(chuo_i==0){chuo_time=new Date()}chuo_i=chuo_i+1;if(chuo_i>20){var f=new Date();if((f.getTime()-chuo_time.getTime())<60*1000){wTools.hint("没戳到吖!<br><br>戳戳相报何时了～～～<br><br>施主您慢些戳……");return false}else{chuo_i=0}}switch(h){case 1:wTools.hint("正在戳，请稍候...","",0,"/i/loading.gif");$.ajax({type:"POST",url:"/x/chuo.php",dataType:"html",data:"ac=chuo&id="+d+"&t="+h+"&cid="+e,error:function(){},success:re_chuo});break;case 2:chuo_q1=(_g("chuo_q"+e)==null)?"戳":trim(_g("chuo_q"+e).innerHTML);chuo_h1=(_g("chuo_h"+e)==null)?"一下":trim(_g("chuo_h"+e).innerHTML);win.Create("chuoDiv",347,107);win.Title("chuoDiv","怎么戳 "+(($("#chuo_"+e+">a").attr("title"))?($("#chuo_"+e+">a").attr("title")):"")+"？");win.html("chuoDiv",'<div style="padding:7px"><input id="chuo_q" value="'+chuo_q1+'" size="12">Ta<input id="chuo_h" value="'+chuo_h1+'" size="30"><br/><input type="checkbox" '+(($("#chuo_"+e).attr("xap")=="9")?"checked ":"")+'id="chuo_qiao"> <label for="chuo_qiao">悄悄的</label><hr class="ccc clear"/><input class="btn" onclick="chuo(this,'+d+",3,"+e+')" type="button" value="  戳~  "/> <input class="btn" onclick="win.hide(\'chuoDiv\')" type="button" value="算了"/></div>');return false;break;case 3:win.hide("chuoDiv");var g="<img src='/i/loading.gif' height='16' width='16' align='absmiddle'/> 正在戳，请稍候...";w.UI.hint2.create({html:g});var k=(_g("chuo_q")==null)?"":trim(_g("chuo_q").value);var c=(_g("chuo_h")==null)?"":trim(_g("chuo_h").value);var a=(_g("chuo_qiao")==null)?"":((_g("chuo_qiao").checked)?0:1);$.ajax({type:"POST",url:"/x/chuo.php",dataType:"html",data:"ac=chuo&id="+d+"&t="+h+"&chuo_q="+encodeURIComponent(k)+"&chuo_h="+encodeURIComponent(c)+"&chuo_qiao="+(a)+"&cid="+e,error:function(){w.UI.hint2.close()},success:function(l){w.UI.hint2.close();re_chuo(l)}});break}return false}function re_chuo(a){if(a=="timeout"){wTools.hint("超时啦，请重戳~~~","",1,"/i/attention3_16x16.gif");return false}if(a=="nologin"){wTools.hint("您还没有登录哦。请先登录","",1,"/i/attention3_16x16.gif");return false}var b=a.split(",");if(b[0]=="ok"){wTools.hint("<br>戳到了，哈哈","",1,"/i/chuodaole.gif");if(b[2]!=0){del_chuo(null,b[2])}}else{wTools.hint("额，没戳到，系统问题，找管理员问问去<br><br>"+a,"",1,"/i/attention3_16x16.gif")}}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}var win={};win.Create=function(k,c,g,e,b){if($("#"+k).length==1){var d=$("#"+k)}else{var d=$('<div id="'+k+'"></div>').appendTo("body")}if(d.html()==""){d.html('<table cellspacing="0" cellpadding="0" class="trans rtbl"><tbody><tr><td class="rounded_333_tl"/><td class="rounded_333_t"/><td class="rounded_333_tr"/></tr><tr><td height="3" width="3" class="rounded_333_l"/><td class="mtd"><div class="cb"><div title="按住我拖动" onmousedown="dragit(_g(\''+k+'\'),event);" class="title" style="background:#D4F1F7"><span title="点我可以关闭哦" onclick="$(\'#'+k+'\').hide();" class="close fr"><img src="i/w_1.gif" width="16" height="15"/></span><h1></h1></div><div class="main"><div class="al" style="overflow-y:auto"></div><div class="clear"/></div></div></td><td height="3" width="3" class="rounded_333_r"/></tr><tr><td class="rounded_333_bl"/><td class="rounded_333_b"/><td class="rounded_333_br"/></tr></tbody></table>');d.css({"font-size":"75%",padding:"0",position:"absolute"});var f=(c)?(c):300;var a=(g)?(g):300;win.resize(k,f,a);win.move(k,e,b)}else{win.resize(k,c,g)}d.show();dragIndex=(dragIndex<1000)?1000:dragIndex;dragIndex++;d.css("z-index",dragIndex);$(".al",d).attr("scrollTop",0)};win.Title=function(c,b){var a=$("#"+c);if(a.html()){if(b){$("h1",a).html(b)}else{return $("h1",a).html()}}};win.Value=function(c,b){var a=$("#"+c);if(a.html()){if(b){a.attr("xap",b)}else{return a.attr("xap")}}};win.html=function(c,b){var a=$("#"+c);if(a.html()){$(".al",a).html(b)}};win.append=function(c,b){var a=$("#"+c);if(a.html()){$(".al",a).append(b)}};win.prepend=function(c,b){var a=$("#"+c);if(a.html()){$(".al",a).prepend(b)}};win.hide=function(b){var a=$("#"+b);if(a.html()){a.hide()}};win.show=function(b){var a=$("#"+b);if(a.html()){a.show();dragIndex++;a.css("z-index",dragIndex)}};win.isOpen=function(c){var a=$("#"+c);var b=false;if(a.html()){if(a.css("display")=="block"){b=true}}return b};win.move=function(f,c,a){var b=$("#"+f);if(b.html()){var e=(c)?(c):((document.documentElement.offsetHeight-b.height())/2);var d=(a)?(a):((document.documentElement.offsetWidth-b.width())/2);e=(e<0)?0:e;e=e+document.documentElement.scrollTop;d=(d<0)?0:d;b.css({top:e,left:d})}};win.resize=function(d,a,c){if(a>0){var b=$("#"+d);if(b.html()){b.width(a);$(".al",b).width((a-30)).height(c)}}};var w=function(){return this instanceof w?this.init():new w()};w.prototype={init:function(){},is_debug:true};w.t=function(a){a=isNull(a)?"null":a;if((!_is_debug)){return}if(arguments.length==1){wTools.hint(a)}else{if(_g("_test")==null){var b=_ce("div");$("body").append(b);b.style.cssText="position:absolute;top:2px;right:2px;border:1px #ccc solid;background:#fff;height:400px;width:400px;overflow:auto;";b.id="_test"}_g("_test").innerHTML=a+"<br/>"+_g("_test").innerHTML}};w.p=function(){var a=arguments;var c=arguments.length;var d=[];switch(c){case 1:d.push(a[0]);break;case 0:return false;break;default:for(var b=0;b<c;b++){d.push(a[b])}}w.t(d)};w.UI={};w.UI.box={pane:function(l,m,b,f){l=l||"";if(m==undefined){m=false}if(b==undefined){b=false}if(f==undefined){f=false}var c=_ce("div");if(!isNull(l)){if(this.__isClassname(l)){c.className=l}else{c.style.cssText=l}}var a={box:c,close:null,caption:null,textbody:null};if(m||b){var e=_ce("div");c.appendChild(e);var h=$(e);if(b){var n=_ce("span");h.append(n);$(n).addClass("close fr").html("&times;").attr("title",res_char.closeWin).hover(function(){$(this).css("color","red")},function(){$(this).css("color","#000")}).click(function(){if(c.parentNode==document.body){$(c).hide("normal")}else{$(c.parentNode).hide("normal")}});a.close=n}var k=_ce("div");h.append(k);$(k).html("&nbsp;");a.caption=k;if(f){k.onmousedown=function(o){if(c.parentNode==document.body){dragit(c,o)}else{dragit(c.parentNode,o)}};k.title=res_char.dragWin;k.style.cursor="move"}var g=_ce("hr");g.className="ccc clear";c.appendChild(g)}else{if(f){c.onmousedown=function(o){if(c.parentNode==document.body){dragit(c,o)}else{dragit(c.parentNode,o)}};c.title=res_char.dragWin;c.style.cursor="move"}}var d=_ce("div");c.appendChild(d);a.textbody=d;return a},rounder:function(k,b,e,l,m,f,h){k=(k==null||isNull(k)||typeof(k)=="undefined")?"rounded_":"rounded_"+k+"_";b=b||"";e=e||"";l=l||"";if(m==undefined){m=false}if(f==undefined){f=false}if(h==undefined){h=false}var g=_ce("table");g.width="100%";g.cellPadding=0;g.cellSpacing=0;r1=g.insertRow(0);r1.insertCell(0).className=k+"tl";r1.insertCell(1).className=k+"t";r1.insertCell(2).className=k+"tr";r2=g.insertRow(1);r21=r2.insertCell(0);r21.className=k+"l";r21.style.width="3px";r21.style.height="3px";r22=r2.insertCell(1);r23=r2.insertCell(2);r23.className=k+"r";r23.style.width="3px";r23.style.height="3px";r3=g.insertRow(2);r3.insertCell(0).className=k+"bl";r3.insertCell(1).className=k+"b";r3.insertCell(2).className=k+"br";var a=this.pane(l,m,f,h);if(a.box==null){return false}var d=a.box;r22.appendChild(d);if(!isNull(b)){if(this.__isClassname(b)){g.className=b}else{g.style.cssText=b}}if(!isNull(e)){if(this.__isClassname(e)){r22.className=e}else{r22.style.cssText=e}}if(!isNull(l)){if(this.__isClassname(l)){d.className=l}else{d.style.cssText=l}}var c={box:g,mainbox:r22,contentbox:d,caption:null,textbody:null};if(f){if(a.close!=null){$(a.close).click(function(){if(g.parentNode==document.body){$(g).hide("normal")}else{$(g.parentNode).hide("normal")}})}if(h){if(a.caption!=null){a.caption.onmousedown=function(n){if(g.parentNode==document.body){dragit(g,n)}else{dragit(g.parentNode,n)}}}}}else{if(h){g.onmousedown=function(n){if(g.parentNode==document.body){dragit(g,n)}else{dragit(g.parentNode,n)}}}}c.caption=(a.caption!=null)?a.caption:null;c.textbody=(a.textbody!=null)?a.textbody:r22;return c},__isClassname:function(a){if(isNull(a)){return false}if(a.indexOf(":")>-1){return false}return true},trans:function(f,d,e,b,h,a,g){d=d||"trans rtbl";e=e||"mtd";b=b||"cb";var c=this.rounder(f,d,e,b,h,a,g);c.textbody.className="main";if(c.caption!=null){c.caption.parentNode.className="title2"}$(c.box).bgIframe();return c}};w.UI.mask={__o:null,show:function(){if(this.__o==null){this.__o=document.createElement("div");document.body.appendChild(this.__o);this.__o.style.cssText="filter:Alpha(style=0,opacity=60);opacity:0.6;-moz-opacity:0.6;left:0px;top:0px;width:0px;height:0px;z-index:90000;position:absolute;background:#ccc;display:block"}var a=document.documentElement;this.__o.style.display="block";this.__o.style.width=a.clientWidth+"px";this.__o.style.height=a.clientHeight+"px";this.__o.style.top=getScroll()[1]+"px";$(this.__o).bgIframe();this.__o.oncontextmenu=this.__o.onselectstart=function(){return false}},close:function(){if(this.__o!=null){$(this.__o).hide()}}};w.UI.center=function(c){if(c==null){return false}var d=document.documentElement;var b=(Math.floor(d.clientHeight/2)-Math.floor(c.offsetHeight/2)+getScroll()[1])+"px";var a=(Math.floor(d.clientWidth/2)-Math.floor(c.offsetWidth/2)+getScroll()[0])+"px";c.style.position="absolute";c.style.left=a;c.style.top=b};w.UI.hint={__o:null,create:function(m,k,b,c,d){if(this.__o==null){this.__o=_ce("div");$("body").append(this.__o);d=d||"w_alert2";this.__o.className=d}var l=this.__o;var g=$(this.__o).css("top",getScroll()[1]).html("").show();if(c===true){w.UI.mask.show()}if(typeof m=="undefined"){m=""}var h=w.UI.box.trans("333","","","",(isNull(m)?false:true));g.append(h.box);if(!isNull(m)&&(h.caption!=null)){h.caption.innerHTML=m}if(b==null){b=""}if(isArray(b)&&b.length>0){var e=_ce("form");e.action="";e.method="get";h.textbody.appendChild(e);if(typeof(k)=="object"){e.appendChild(k)}else{e.innerHTML=k}var f=_ce("hr");e.appendChild(f);f.className="ccc clear";$.each(b,function(o,q){var p=_ce("input");p.type=(o==0)?"submit":"button";p.value=q.caption;p.className="btn";e.appendChild(p);p.onclick=function(){if(typeof q.callback=="function"){q.callback()}w.UI.hint.close()}});e.onsubmit=function(){return false};var a=$(e).children('input[type="submit"]')[0];a.focus()}else{if(typeof(k)=="object"){h.textbody.appendChild(k)}else{h.textbody.innerHTML=k}}w.UI.center(this.__o);if(c===true){window.onresize=window.onscroll=function(){w.UI.mask.show();w.UI.center(l)}}else{window.onresize=window.onscroll=function(){w.UI.center(l)}}return this.__o},close:function(){if(this.__o!=null){$(this.__o).hide()}w.UI.mask.close();window.onresize=window.onscroll=new Function()}};w.UI.hint2={__o:null,timeId:null,create:function(a){a=a||{};a.id=a.id||"topTipBox";a.html=a.html||"";a.keepsecs=a.keepsecs||5000;a.autoClose=a.autoClose||false;if(isNull(a.html)){return false}this.__o=$("#"+a.id);if(this.__o.length==0){this.__o=$('<div id="'+a.id+"\" class=\"round none\"><div class='r1'><div class='r2'><div class='r3'><em></em></div></div></div></div>").appendTo("body")}this.__o.find("em").html(a.html);this.__o.fadeIn("normal");if(a.autoClose){this.close(a.keepsecs)}else{this.timeId=null}},close:function(b){if(this.timeId!=null){clearTimeout(this.timeId);this.timeId=null}if(this.__o){var a=this;this.timeId=setTimeout(function(){a.__o.fadeOut("slow",function(){a.__o.find("em").empty()})},b)}}};w.setCallback=function(f,v){if(typeof(f)=="function"){f(v)}else{if(typeof(f)=="string"){var lc=f.indexOf("(");var rc=f.indexOf(")");var s="";if((lc<0)&&(rc<0)){s=f+"(v)"}else{var a="";a=(rc-lc<2)?"":",";var r=/\)/g;s=f.replace(r,a+"v)")}eval(s)}}};w.msg={getNum:function(){$.ajax({url:"/x/user_msg.php",type:"POST",data:"ac=getXiaoZhiTiaoNUM&channel=group",dataType:"html",timeout:20000,error:function(){},success:function(a){w.msg.setNum(a)}})},check:function(a){this.getNum();if(typeof a=="undefined"){a=5*60}setInterval(this.getNum,a*1000)},setNum:function(a){var b=_g("xiaozhitiaoNUM");if(a=="nologin"){b.innerHTML="";return false}var c=a.split(",");if(c[0]=="ok"){if(c[1]=="0"){b.innerHTML=""}else{b.innerHTML="("+c[1]+")"}}}};function WPoint(a,b){this.x=a;this.y=b;this.toStr=function(){return[this.x,this.y].toString()}}jQuery.cookie=function(b,k,n){if(typeof k!="undefined"){n=n||{};if(k===null){k="";n.expires=-1}var e="";if(n.expires&&(typeof n.expires=="number"||n.expires.toUTCString)){var f;if(typeof n.expires=="number"){f=new Date();f.setTime(f.getTime()+(n.expires*24*60*60*1000))}else{f=n.expires}e="; expires="+f.toUTCString()}var m=n.path?"; path="+(n.path):"";var g=n.domain?"; domain="+(n.domain):"";var a=n.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(k),e,m,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var l=document.cookie.split(";");for(var h=0;h<l.length;h++){var c=jQuery.trim(l[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);(function(e){var k,h,g,d,f,l,c;e.fn.cluetip=function(n,m){if(typeof n=="object"){m=n;n=null}return this.each(function(L){var x=e(this);var I=e.extend(false,{},e.fn.cluetip.defaults,m||{},e.metadata?x.metadata():e.meta?x.data():{});var q=false;var B=parseInt(I.cluezIndex,10)-1;var T=false,S=0;if(!e("#cluetip").length){h=e('<div id="cluetip-inner"></div>');d=e('<h3 id="cluetip-title"></h3>');g=e('<div id="cluetip-outer"></div>').append(h).prepend(d);k=e('<div id="cluetip"></div>').css({zIndex:I.cluezIndex}).append(g).append('<div id="cluetip-extra"></div>')[b](a).hide();e('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:B-1}).insertBefore("#cluetip").hide();k.css({position:"absolute",zIndex:B});g.css({position:"relative",zIndex:B+1});f=e('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:B+1}).appendTo("#cluetip")}var K=(I.dropShadow)?+I.dropShadowSteps:0;if(!l){l=e([]);for(var W=0;W<K;W++){l=l.add(e("<div></div>").css({zIndex:B-W-1,opacity:0.1,top:1+W,left:1+W}))}l.css({position:"absolute",backgroundColor:"#000"}).prependTo(k)}var G=x.attr(I.attribute),t=I.cluetipClass;if(!G&&!I.splitTitle&&!n){return true}if(I.local&&I.hideLocal){e(G+":first").hide()}var H=parseInt(I.topOffset,10),D=parseInt(I.leftOffset,10);var C,U;var z=isNaN(parseInt(I.height,10))?"auto":(/\D/g).test(I.height)?I.height:I.height+"px";var o,u,M,Z,O,V;var A=isNaN(parseInt(I.width,10))?275:parseInt(I.width,10);var X=A+(parseInt(k.css("paddingLeft"))||0)+(parseInt(k.css("paddingRight"))||0)+K;var E=this.offsetWidth;var v,N,aa,P,p;var R;var J=(I.attribute!="title")?x.attr(I.titleAttribute):"";if(I.splitTitle){if(J==undefined){J=""}R=J.split(I.splitTitle);J=R.shift()}var s;var y=function(af){if(!I.onActivate(x)){return false}T=true;k.removeClass().css({width:A});if(G==x.attr("href")){x.css("cursor",I.cursor)}x.attr("title","");if(I.hoverClass){x.addClass(I.hoverClass)}u=M=x.offset().top;v=x.offset().left;P=af.pageX;O=af.pageY;if(x[0].tagName.toLowerCase()!="area"){o=e(document).scrollTop();p=e(window).width()}if(I.positionBy=="fixed"){N=E+v+D;k.css({left:N})}else{N=(E>v&&v>X)||v+E+X+D>p?v-X-D:E+v+D;if(x[0].tagName.toLowerCase()=="area"||I.positionBy=="mouse"||E+X>p){if(P+20+X>p){k.addClass(" cluetip-"+t);N=(P-X-D)>=0?P-X-D-parseInt(k.css("marginLeft"),10)+parseInt(h.css("marginRight"),10):P-(X/2)}else{N=P+D}}var ac=N<0?af.pageY+H:af.pageY;k.css({left:(N>0&&I.positionBy!="bottomTop")?N:(P+(X/2)>p)?p/2-X/2:Math.max(P-(X/2),0)})}U=e(window).height();if(n){h.html(n);Q(ac)}else{if(R){var ad=R.length;for(var ae=0;ae<ad;ae++){if(ae==0){h.html(R[ae])}else{h.append('<div class="split-body">'+R[ae]+"</div>")}}Q(ac)}else{if(!I.local&&G.indexOf("#")!=0){if(q&&I.ajaxCache){h.html(q);Q(ac)}else{var ag=I.ajaxSettings;ag.url=G;ag.beforeSend=function(){g.children().empty();if(I.waitImage){e("#cluetip-waitimage").css({top:O+20,left:P+20}).show()}};ag.error=function(){if(T){h.html("<i>sorry, the contents could not be loaded</i>")}};ag.success=function(ai){q=I.ajaxProcess(ai);if(T){h.html(q)}};ag.complete=function(){c=e("#cluetip-inner img").length;if(c&&!e.browser.opera){e("#cluetip-inner img").load(function(){c--;if(c<1){e("#cluetip-waitimage").hide();if(T){Q(ac)}}})}else{e("#cluetip-waitimage").hide();if(T){Q(ac)}}};e.ajax(ag)}}else{if(I.local){var ah=e(G+":first");var ab=e.fn.wrapInner?ah.wrapInner("<div></div>").children().clone(true):ah.html();e.fn.wrapInner?h.empty().append(ab):h.html(ab);Q(ac)}}}}};var Q=function(ad){k.addClass("cluetip-"+t);if(I.truncate){var ae=h.text().slice(0,I.truncate)+"...";h.html(ae)}function ab(){}J?d.show().html(J):(I.showTitle)?d.show().html("&nbsp;"):d.hide();if(I.sticky){var ac=e('<div id="cluetip-close"><a href="#">'+I.closeText+"</a></div>");(I.closePosition=="bottom")?ac.appendTo(h):(I.closePosition=="title")?ac.prependTo(d):ac.prependTo(h);ac.click(function(){F();return false});if(I.mouseOutClose){if(e.fn.hoverIntent&&I.hoverIntent){k.hoverIntent({over:ab,timeout:I.hoverIntent.timeout,out:function(){ac.trigger("click")}})}else{k.hover(ab,function(){ac.trigger("click")})}}else{k.unbind("mouseout")}}var af="";g.css({overflow:z=="auto"?"visible":"auto",height:z});C=z=="auto"?Math.max(k.outerHeight(),k.height()):parseInt(z,10);Z=M;V=o+U;if(I.positionBy=="fixed"){Z=M-I.dropShadowSteps+H}else{if((N<P&&Math.max(N,0)+X>P)||I.positionBy=="bottomTop"){if(M+C+H>V&&O-o>C+H){Z=O-C-H;af="top"}else{Z=O+H;af="bottom"}}else{if(M+C+H>V){Z=(C>=U)?o:V-C-H}else{if(x.css("display")=="block"||x[0].tagName.toLowerCase()=="area"||I.positionBy=="mouse"){Z=ad-H}else{Z=M-I.dropShadowSteps}}}}if(af==""){N<v?af="left":af="right"}k.css({top:Z+"px"}).removeClass().addClass("clue-"+af+"-"+t).addClass(" cluetip-"+t);if(I.arrows){var ag=(M-Z-I.dropShadowSteps);f.css({top:(/(left|right)/.test(af)&&N>=0&&ag>0)?ag+"px":/(left|right)/.test(af)?0:""}).show()}else{f.hide()}l.hide();k.hide()[I.fx.open](I.fx.open!="show"&&I.fx.openSpeed);if(I.dropShadow){l.css({height:C,width:A}).show()}if(e.fn.bgiframe){k.bgiframe()}if(I.delayedClose>0){S=setTimeout(F,I.delayedClose)}I.onShow(k,h)};var Y=function(){T=false;e("#cluetip-waitimage").hide();if(!I.sticky||(/click|toggle/).test(I.activation)){F();clearTimeout(S)}if(I.hoverClass){x.removeClass(I.hoverClass)}e(".cluetip-clicked").removeClass("cluetip-clicked")};var F=function(){g.parent().hide().removeClass().end().children().empty();if(J){x.attr(I.titleAttribute,J)}x.css("cursor","");if(I.arrows){f.css({top:""})}};if((/click|toggle/).test(I.activation)){x.click(function(ab){if(k.is(":hidden")||!x.is(".cluetip-clicked")){y(ab);e(".cluetip-clicked").removeClass("cluetip-clicked");x.addClass("cluetip-clicked")}else{Y(ab)}this.blur();return false})}else{if(I.activation=="focus"){x.focus(function(ab){y(ab)});x.blur(function(ab){Y(ab)})}else{x.click(function(){if(x.attr("href")&&x.attr("href")==G&&!I.clickThrough){return false}});var r=function(ab){if(I.tracking==true){var ad=N-ab.pageX;var ac=Z?Z-ab.pageY:M-ab.pageY;x.mousemove(function(ae){k.css({left:ae.pageX+ad,top:ae.pageY+ac})})}};if(e.fn.hoverIntent&&I.hoverIntent){x.mouseover(function(){x.attr("title","")}).hoverIntent({sensitivity:I.hoverIntent.sensitivity,interval:I.hoverIntent.interval,over:function(ab){y(ab);r(ab)},timeout:I.hoverIntent.timeout,out:function(ab){Y(ab);x.unbind("mousemove")}})}else{x.hover(function(ab){y(ab);r(ab)},function(ab){Y(ab);x.unbind("mousemove")})}}}})};e.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(m){return true},onShow:function(m,n){},ajaxCache:true,ajaxProcess:function(m){m=m.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,"").replace(/<(link|title)(.|\s)*?\/(link|title)>/g,"");return m},ajaxSettings:{dataType:"html"},debug:false};var b="appendTo",a="body";e.cluetip={};e.cluetip.setup=function(m){if(m&&m.insertionType&&(m.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){b=m.insertionType}if(m&&m.insertionElement){a=m.insertionElement}}})(jQuery);(function(f){f.sprintf=function(h){return g(h,arguments,1)};f.vsprintf=function(h,k){if(k===undefined){k=0}return g(h[k],h,k+1)};f.alertf=function(){return alert(f.vsprintf(arguments))};f.vlogf=function(h){if("console" in window){console.info(f.vsprintf(h))}};f.verrorf=function(h){if("console" in window){console.error(f.vsprintf(h))}};f.errorf=function(){f.verrorf(arguments)};f.logf=function(){f.vlogf(arguments)};FREGEXP=/^([^%]*)%([-+])?(0)?(\d+)?(\.(\d+))?([doxXcsf])(.*)$/;HDIGITS=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function a(h){if(h===undefined||h===null){return true}return(h=="")?true:false}function d(h){return Math.floor(h)}function e(o,m,n,h,l){o=parseInt(o,10);if(isNaN(o)){return"NaN"}aval=(o<0)?-o:o;var k="";if(aval==0){k="0"}else{while(aval>0){k=HDIGITS[aval%m]+k;aval=d(aval/m)}}if(o<0){k="-"+k}if(h=="-"){n=" "}return c(k,n,h,l,-1)}function b(q,n,p,h,l){if(l==undefined){if(parseInt(q)!=q){return""+q}l=5}var o=Math.pow(10,l);var k=""+Math.round(q*o);var m=k.length-l;if(m==0){return"0."+k.substr(m,l)}return k.substr(0,m)+"."+k.substr(m,l)}function c(o,n,h,l,k){var m;if(o===undefined){return"(undefined)"}if(o===null){return"(null)"}if((m=l-o.length)>0){if(h=="-"){while(m>0){o+=n;m--}}else{while(m>0){o=n+o;m--}}}if(k>0){return o.substr(0,k)}return o}function g(q,l,v){var p="";var t,s,y,u;y=q.split("\n");for(t=0;t<y.length;t++){if(t>0){p+="\n"}q=y[t];while(u=FREGEXP.exec(q)){var o="";var r=" ";if(!a(u[1])){p+=u[1]}if(!a(u[2])){o=u[2]}if(!a(u[3])){r="0"}var k=u[4];var h=u[6];var x=u[7];q=u[8];if(v>=l.length){p+="[missing parameter for type '"+x+"']";continue}var n=l[v++];switch(x){case"d":p+=e(n,10,r,o,k);break;case"o":p+=e(n,8,r,o,k);break;case"x":p+=e(n,16,r,o,k);break;case"X":p+=e(n,16,r,o,k).toUpperCase();break;case"c":p+=String.fromCharCode(parseInt(n,10));break;case"s":p+=c(n,r,o,k,h);break;case"f":p+=b(n,r,o,k,h);break;default:p+="[unknown format '"+x+"']";break}}p+=q}return p}})(jQuery);var tb_pathToImage="/i/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(a){$(a).click(function(){var c=this.title||this.name||null;var b=this.href||this.alt;var d=this.rel||false;tb_show(c,b,d);this.blur();return false})}function tb_show(l,b,h){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(l===null){l=""}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var c;if(b.indexOf("?")!==-1){c=b.substr(0,b.indexOf("?"))}else{c=b}var f=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var m=c.toLowerCase().match(f);if(m==".jpg"||m==".jpeg"||m==".png"||m==".gif"||m==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(h){TB_TempArray=$("a[rel="+h+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(f);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>下一张 &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; 前一张</a></span>"}}else{TB_FoundURL=true;TB_imageCount="图片 "+(TB_Counter+1)+" / "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var p=tb_getPageSize();var n=p[0]-150;var s=p[1]-150;var o=imgPreloader.width;var e=imgPreloader.height;if(o>n){e=e*(n/o);o=n;if(e>s){o=o*(s/e);e=s}}else{if(e>s){o=o*(s/e);e=s;if(o>n){e=e*(n/o);o=n}}}TB_WIDTH=o+30;TB_HEIGHT=e+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+b+"' width='"+o+"' height='"+e+"' alt='"+l+"'/></a><div id='TB_caption'>"+l+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='关闭'>关闭</a> 或 按Esc键退出</div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function r(){if($(document).unbind("click",r)){$(document).unbind("click",r)}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,h);return false}$("#TB_prev").click(r)}if(!(TB_NextHTML==="")){function q(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,h);return false}$("#TB_next").click(q)}document.onkeydown=function(t){if(t==null){keycode=event.keyCode}else{keycode=t.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";q()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";r()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var a=b.replace(/^[^\?]+\??/,"");var d=tb_parseQuery(a);TB_WIDTH=(d.width*1)+30||630;TB_HEIGHT=(d.height*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");$("#TB_iframeContent").remove();if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='关闭'>关闭</a> 或 按Esc键退出</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(d.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>关闭</a> 或 按Esc键退出</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(l)}}$("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+d.inlineId).children());$("#TB_window").unload(function(){$("#"+d.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!d.modal){document.onkeyup=function(n){if(n==null){keycode=event.keyCode}else{keycode=n.which}if(keycode==27){tb_remove()}}}}catch(k){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(d){var e={};if(!d){return e}var a=d.split(/[;&]/);for(var c=0;c<a.length;c++){var g=a[c].split("=");if(!g||g.length!=2){continue}var b=unescape(g[0]);var f=unescape(g[1]);f=f.replace(/\+/g," ");e[b]=f}return e}function tb_getPageSize(){var c=document.documentElement;var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}};