(function(){if(window.ntes)return;var h,b=window.$,n=window.ntes=window.$=function($,_){if(null==$||$.$)return $;var a;if("string"===typeof $){_=_||(this.alert?document:this);a=i.query($,_)}else a=$;if(a&&!a.$)if(a.nodetype){if("unknown"!==typeof a.getattribute)a=p(a,n.element)}else a=p(l(a),n.element);return a};n.version="1.1.6 build 20091119";n.resume=function(){b=window.$;window.$=n;window.ntes=n;return b};n.retire=function(){window.$=b;return n};var i={space:/\s*([\s>~+,])\s*/g,issimple:/^#?([\w\u00c0-\uffff_-]+)$/,impliedall:/([>\s~\+,]|^)([#\.\[:])/g,attrvalues:/=(["'])([^'"]*)\1]/g,attr:/\[\s*([\w\u00c0-\uffff_-]+)\s*(?:(\s?\=)\s*(.*?))?\s*\]/g,beginidapart:/^(?:\*#([\w\u00c0-\uffff_-]+))/,standard:/^[>\s~\+:]/,stream:/[#\.>\s\[\]:~\+]+|[^#\.>\s\[\]:~\+]+/g,isint:/^\d+$/,tempattrvalues:[],tempattrs:[],idname:"uniqueidforntes",id:0,query:function($,i){var a,g,e,c,b,j,k,f,h,m,d=this;$=$.trim();if(""===$)return;if(d.issimple.test($))if(0===$.indexof("#")&&typeof i.getelementbyid!=="undefined")return d.getelembyid(i,$.substr(1));else if(typeof i.getelementsbytagname!=="undefined")return l(i.getelementsbytagname($));if(!w(i))i=i.nodetype?[i]:l(i);g=$.replace(d.space,"$1").replace(d.attrvalues,d.analyzeattrvalues).replace(d.attr,d.analyzeattrs).replace(d.impliedall,"$1*$2").split(",");e=g.length;c=-1;a=[];while(++c1?d.unique(a):a},analyzeattrs:function(_,b,a,$){return"[]"+(i.tempattrs.push([b,a,$])-1)},analyzeattrvalues:function($,a,_){return"="+(i.tempattrvalues.push(_)-1)+"]"},generateid:function(_){var b=this.idname,$;try{$=_[b]=_[b]||new number(++this.id)}catch(a){$=_.getattribute(b);if(!$){$=new number(++this.id);_.setattribute(b,$)}}return $.valueof()},unique:function(c){var a=[],d=0,b={},_,$;while(_=c[d++])if(1===_.nodetype){$=this.generateid(_);if(!b[$]){b[$]=true;a.push(_)}}return a},attrmap:{"class":"classname","for":"htmlfor"},getattribute:function($,a){var _=this.attrmap[a]||a,b=$[_];if("string"!==typeof b)if("undefined"!==typeof $.getattributenode){b=$.getattributenode(a);b=h==b?b:b.value}else if($.attributes)b=string($.attributes[a]);return null==b?"":b},getelembyid:function(a,$){var _=a.getelementbyid($);if(_&&_.id!==$&&a.all){_=a.all[$];if(_){for(var b=0;b<_.length;b++)if(this.getattribute(_[b],"id")===$)return _[b];_=h}}return _},getelemsbytagname:function(f,h,e,d,_){var a=[],i=-1,g=f.length,$,c,b;if(d!=="*")b=d.touppercase();while(++i":function(_,$){return i.getelemsbytagname(_,"firstchild","nextsibling",$)},"[]":function($,_){_=i.tempattrs[_];if(_){if(i.isint.test(_[2]))_[2]=i.tempattrvalues[_[2]];return i.getelemsbyattribute($,_)}else return $}},attroperators:{"":function($){return $!==""},"=":function(_,$){return $===_},"~=":function(_,$){return(" "+_+" ").indexof($)>=0},"!=":function(_,$){return $!==_}}};n.element={$:function($){return n($,this)},addcss:function($){return n.style.addcss(this,$)},removecss:function($){return n.style.removecss(this,$)},addevent:function(_,a,$){return n.event.addevent(this,_,a,$)},removeevent:function($,_){return n.event.removeevent(this,$,_)},attr:function(_,a){var $=this;_=i.attrmap[_]||_;if(a!==h)return n.dom.eachnode($,function($,_){this[$]=n.util.isfunction(_)?_.call(this):_},arguments);else return w($)?($[0]?$[0][_]:h):$[_]}};window.addevent=document.addevent=n.element.addevent;window.removeevent=document.removeevent=n.element.removeevent;var a={},v=object.prototype.tostring;n.util={isarray:function($){return v.call($)==="[object array]"},isfunction:function($){return v.call($)==="[object function]"},toarray:function($){if(w($))return $;else if($.toarray)return $.toarray();else{var _=[],a=$.length;while(a)_[--a]=$[a];return _}},merge:function(_,$){var b=$.length,a=_.length;while(--b>=0)_[a+b]=$[b];return _},parsetpl:function(c,$,b){var d=a[c];$=null==$?{}:$;if(!d){var _="var _=[];with(obj){_.push('"+c.replace(/[\r\t\n]/g," ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("<#").join("');").split("#>").join("_.push('")+"');}return _.join('');";d=new function("obj",_);if(null==b||true===b)a[c]=d}return d($)},extend:function($,a){for(var _ in a)$[_]=a[_];return $}};n.dom={eachnode:function(_,a,$){if(!_)return;if(_.nodetype||_.alert)a.apply(_,$);else{var c=-1,b=_.length;while(++c=0,$=a.indexof(":")>=0;if(_||$){a=a.trim().replace(o,"$1").replace($?d:m,q).match(m);if($&&a.length%2!==0)throw"invalid inline style";a.styletype="style"}else{a=a.match(e);a.styletype="class"}return a},addcss:function($,_){_=n.style.parse(_);return n.dom.eachnode($,"class"===_.styletype?function($,a){var _=" "+this.classname+" ";for(var b=0;b0)settimeout(function(){if(!e){a.abort();if(h.ontimeout)h.ontimeout(a)}},h.timeout);a.onreadystatechange=function(){if(4==a.readystate){e=true;var $=200==a.status?"onsuccess":"onerror";h[$]&&h[$](a)}};if(_&&"get"===c){g+=("?"+_);_=null}a.open(c,g,h.async,h.username,h.password);var d=[];if("post"===c)d.push("application/x-www-form-urlencoded");if(h.headers)for(var f in h.headers)if("content-type"===f.tolowercase())d.push(h.headers[f]);else a.setrequestheader(f,h.headers[f]);if(d.length)a.setrequestheader("content-type",d.join(";").replace(/;+/g,";").replace(/;$/,""));a.send(_);return a},importjs:function(b,$,_){var a=document.createelement("script");a.language="javascript";a.type="text/javascript";if(_)a.charset=_;a.onload=a.onreadystatechange=function(){var _=this;if(!_.readystate||"loaded"==_.readystate||"complete"==_.readystate){$&&$(_);_.parentnode.removechild(_);_.onload=_.onreadystatechange=null}};a.src=b;document.getelementsbytagname("head")[0].appendchild(a)}};var x=/([smhdmy])$/,k={"s":1,"m":60,"h":60*60,"d":24*60*60,"m":30*24*60*60,"y":365*24*60*60};n.cookie={encoder:window.encodeuricomponent,decoder:window.decodeuricomponent,get:function(b,d){var _=n.cookie;b=_.encoder(b)+"=";var $=document.cookie,a=$.indexof(b),c;if(-1===a)return d?h:"";a+=b.length;c=$.indexof(";",a);if(c===-1)c=$.length;return _.decoder($.substring(a,c))},set:function(c,g,a,f,e,d){var _=n.cookie,b=[_.encoder(c)+"="+_.encoder(g)];if(a){var h,$;if("[object date]"===v.call(a))h=a;else{if("string"===typeof a&&x.test(a)){a=a.substring(0,a.length-1);$=regexp.$1}if(!isnan(a)){h=new date();h.settime(h.gettime()+a*k[$||"m"]*1000)}}h&&b.push("expires="+h.toutcstring())}e!=null&&e!==""&&b.push("path="+e);f&&b.push("domain="+f);d&&b.push("secure");document.cookie=b.join(";")},del:function($,a,_){document.cookie=n.cookie.encoder($)+"="+(_!=null&&_!==""?";path="+_:"")+(a?";domain="+a:"")+";expires=thu, 01-jan-1970 00:00:01 gmt"}};n.ui={};function f(_,$){return(_+1)%$}function j(_,$){return _<=0?$-1:(_-1)%$}n.ui.slide=function(_,b,e,d,a){if(!arguments.length)return;var $=this;$.total=b.length;if(_&&$.total!==_.length)throw"can not match ctrls("+_.length+") and contents("+$.total+")";$.constructor=arguments.callee;$._curindex=-1;$._ctrls=_;$._contents=b;$._css=e;$._eventname=d;$.interval=a;$.playmode=f;$.rollbackmode=j;if($._ctrls&&$._ctrls.length&&$._eventname){var c=function(_,$){this.show($);_.preventdefault()}.bind($);for(var g=$.total-1;g>=0;g--)n.event.addevent($._ctrls[g],d,c,new number(g))}$.interval&&$.play()};n.ui.slide.prototype={show:function(_){var a=this;_=_<0?0:_>=a.total?a.total-1:_;var b=a._ctrls?a._ctrls[_]:null,$=a._contents[_];if(-1===a._curindex)a._curindex=0;n.style.removecss(a._ctrls,a._css);n.style.removecss(a._contents,a._css);n.style.addcss(b,a._css);n.style.addcss($,a._css);a.onshow&&a.onshow(_,b,$);a._curindex=_},shownext:function(){this.show(this.playmode(this._curindex,this.total))},showprevious:function(){this.show(this.rollbackmode(this._curindex,this.total))},play:function(a){var _=this;if(!isnan(a))_.interval=parseint(a);if(h===_._timerid){if(!_._hasevent){var $=_.pause.bind(_),b=_.play.bind(_);n.event.addevent(_._ctrls,"mouseover",$);n.event.addevent(_._ctrls,"mouseout",b);n.event.addevent(_._contents,"mouseover",$);n.event.addevent(_._contents,"mouseout",b);_._hasevent=1}_._timerid=setinterval(_.shownext.bind(_),_.interval)}},pause:function(){var _=this;if(_._timerid!==h){clearinterval(_._timerid);_._timerid=h;if(_.onstop){var $=_._curindex;_.onstop($,_._ctrls[$],_._contents[$])}}}};var s=/^\s+|\s+$/g;string.prototype.trim=function($){return this.replace(null==$?s:new regexp("^"+$+"+|"+$+"+$","g"),"")};string.format=function($){var _=arguments,a=new regexp("%([1-"+_.length+"])","g");return string($).replace(a,function($,a){return _[a]})};array.prototype.indexof=array.prototype.indexof||function($,_){var b=isnan(_)||_<0?-1:_-1,a=this.length;while(++b