var $version=20081027;var $A=function(C){var A=[];for(var B=0;B<C.length;B++){A.push(C[B])}return A};var $break=new Object();var $continue=new Object();var $E=function(A){if($.isString(A)){return $("#"+A)}if($.isElement(A)){return new Dollar(A)}return A};var $EXPORT=["Event","Browser","Effect.Transitions","Builder"];function $export(){var H=[].concat(arguments[0]||$EXPORT);for(var B=0;B<H.length;B++){var C=H[B].split(".");var F=$,G=true;for(var A=0;A<C.length;A++){F=F[C[A]];if(!F){G=false;break}}if(!G||F.EXPORT==undefined){continue}if($.isString(F.EXPORT)){if(F.EXPORT.toLowerCase()=="all"){for(var E in F){if(E!=="EXPORT"&&!(E in $)){$[E]=F[E]}}}else{var E=F.EXPORT;if(E in F){if(!(E in $)){$[E]=F[E]}}}continue}if($.isArray(F.EXPORT)){for(var A=0;A<=F.EXPORT.length;A++){var E=F.EXPORT[A],D;if(/^(.+)=>(.+)$/.test(E)){E=RegExp.$1;D=RegExp.$2}else{D=E}if(!(D in $)){if($.isFunction(F[E])){$[D]=F[E].bind(F)}else{$[D]=F[E]}}}}}}var $=function(){var E=$A(arguments);if(E.length==1&&$.isObject(E[0],true)&&E[0].timespan&&E[0].callback){return $.Timer.add(E[0])}if(E.length==0||$.isObject(E[0],true)){var A=function(){this.__init.apply(this,arguments)};if(E.length){A.prototype=E[0]}return A}if($.isString(E[0])){switch(true){case E[0].test(/^<(.|\n)+>$/):return $.Builder.node(E[0]);case E[0].test(/^(url|http)/i):if(E[1]&&E[1]["callback"]){$.dataQuery(E[0].replace(/^url:/i,""),E[1])}else{new $.Ajax.Simple(E[0].replace(/^url:/i,""),E[1])}return ;case E[0].test(/^(get|post|json)/i):var D=RegExp.$1;if(D=="json"){new $.Json(E[0].replace(/^(json):/i,""),E[1],E[2])}else{new $.Ajax.Simple(E[0].replace(/^(get|post):/i,""),{method:D,onSuccess:E[1],postBody:E[2]})}return ;default:var G=E[0].split(";"),C=[];for(var F=0;F<G.length;F++){var B=$.getElements(G[F].trim(),E[1]);if(B===false){return false}C=C.concat(B)}return new Dollar(C)}}if($.isObject(E[0])){if($.isEvent(E[0])){return E[1] in $.Event.Methods?$.Event.Methods[E[1]](E[0],E[2]):E[0][E[1]]}if($.isElement(E[0])||E[0]==document){return new Dollar(E[0])}}if($.isFunction(E[0])){if($.isReady){E[0]()}if(!$.ReadyList){$.ReadyList=[]}$.ReadyList.push(E[0])}};$empty=$.empty=function(){};$.K=function(A){return A};var $gidbase=0;$.gid=function(){return"GID"+($gidbase++)};$.events=["abort","blur","change","click","dblclick","error","focus","keydown","keyup","load","mousedown","mousemove","mouseout","mouseover","mouseup","reset","resize","scroll","select","submit","unload"];$.isArray=function(A){return A&&A.constructor===Array};$.isObject=function(B,A){return B&&(A?(B.constructor===Object&&!$.isEvent(B)&&!$.isElement(B)):typeof B=="object")};$.isString=function(A){return A!==undefined&&A!==null&&A.constructor===String};$.isNumber=function(A){return A!==undefined&&A!==null&&A.constructor==Number};$.isStringOrNumber=function(A){return["string","number"].include(typeof A)};$.isFunction=function(A){return typeof A=="function"};$.isEvent=function(A){return A&&!$.isElement(A)&&A.type&&$.events.include(A.type)};$.isElement=function(A){return A&&A.nodeType===1};$.require=function(){if(!/^(\$|\w+)\s+(\d+)$/.test(arguments[0])){throw"invalid argument "+arguments[0]+" for $.require!"}var A=RegExp.$1=="$"?$version:($[RegExp.$1]?($[RegExp.$1].version||0):0);var B=parseInt(RegExp.$2);if(B>A){throw ["Version too low:$.",arguments[1]||""," require ",RegExp.$1=="$"?"dollar":("$."+RegExp.$2)," version ",B,", but version is ",A].join("")}};$.error="";$.getElements=function(){var _atts=[];var _attCollect=function(a,b,c,d,e){var att=e?"className="+c:b;var i=_atts.push(att)-1;return"["+i+"]"};var getElementsByAttribute=function(es,attsStr){var ret=[];atts=attsStr.split("][");for(var j=0;j<atts.length;j++){var attPart=_atts[atts[j]];switch(true){case /^[\d\s,]+$/.test(attPart):var ma=attPart.split(",");for(var i=0;i<ma.length;i++){var index=parseInt(ma[i]);if(es.length>index){ret.push(es[index])}}break;case /^:(\w+)$/.test(attPart):switch(RegExp.$1.toLowerCase()){case"first":if(es.length){ret.push(es[0])}break;case"last":if(es.length){ret.push(es.last())}break}break;case /^((?::first|\d+))\.\.((?::last|\d+)(?:\s*-\s*\d+)?)$/.test(attPart):var parts=attPart.split("..");var start=parts[0]==":first"?0:parseInt(parts[0],10),end=eval(parts[1].replace(/:last/,es.length-1));for(var i=start;i<=end&&i<es.length;i++){ret.push(es[i])}break;case /^(\w+)\s*(\!|\^|\$|\*)?=\s*(.+)$/.test(attPart):var att=RegExp.$1,etype=RegExp.$2,vl=RegExp.$3,testBool;for(var i=0;i<es.length;i++){if(att=="className"){testBool=es[i].className.test(new RegExp("(^|\\s+)"+vl+"(\\s+|$)"));if(testBool){ret.push(es[i])}}else{var attVal=$.getAttribute(es[i],att),hasAtt=true;if(attVal===null){hasAtt=false}else{attVal=String(attVal)}switch(etype){case"!":testBool=hasAtt&&(attVal!=vl);break;case"^":testBool=hasAtt&&(attVal.indexOf(vl)==0);break;case"$":testBool=hasAtt&&(attVal.indexOf(vl)+vl.length==attVal.length);break;case"*":testBool=hasAtt&&(attVal.indexOf(vl)!=-1);break;default:testBool=hasAtt&&(attVal==vl);break}if(testBool){ret.push(es[i])}}}break;case /^@(\w+)/.test(attPart):var attName=RegExp.$1;for(var i=0;i<es.length;i++){if($.getAttribute(es[i],attName)){ret.push(es[i])}}break}if(j!=atts.length-1){es=ret;ret=[]}}return ret};return function(path){var ps=path.trim().replace(/(^|\s)\./g,"$1*.").replace(/>\s+(?=\S)/g,">").replace(/\[([^\]]+)\]/g,_attCollect).replace(/(\.)([\w-]+)/g,_attCollect).split(" "),stack1=[],stack2=[];for(var i=0;i<ps.length;i++){if(ps[i]==""){continue}var p=ps[i];var ma=p.match(/^([#>]?)([\w-]+|\*)(?:\[(.+)\])?$/);if(!ma){$.error="wrong format:"+path;_atts.length=0;return false}if(stack1.length==0){if(i!=0){return[]}stack1=[].concat(arguments[1]||document)}switch(ma[1]){case"":for(var j=0;j<stack1.length;j++){var temp=$A(stack1[j].getElementsByTagName(ma[2]));if(temp.length){stack2.push(temp)}}break;case"#":delete stack1;stack1=[];var e=document.getElementById(ma[2]);stack2=e?[e]:[];break;case">":var tag=ma[2].toUpperCase();for(var j=0;j<stack1.length;j++){var children=stack1[j].childNodes,temp=[];for(var k=0;k<children.length;k++){if($.isElement(children[k])&&(children[k].nodeName==tag||tag=="*")){temp.push(children[k])}}if(temp.length){stack2.push(temp)}}break}if(stack2.length==0){_atts.length=0;return[]}delete stack1;stack1=[];for(var j=0;j<stack2.length;j++){stack1=stack1.concat(ma[3]?getElementsByAttribute(stack2[j],ma[3]):stack2[j])}delete stack2;stack2=[]}_atts.length=0;return stack1}}();$.getElementsByClassName=function(A,B){$.Dom._elementsWithClass(B||document,A)};$.props={"for":"htmlFor","class":"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName",childNodes:"childNodes",offsetLeft:"offsetLeft",offsetTop:"offsetTop",offsetWidth:"offsetWidth",offsetHeight:"offsetHeight",offsetLeft:"offsetLeft",offsetTop:"offsetTop"};$.getAttribute=function(C,A){var B=$.props;if(B[A]){return C[B[A]]}if($.Browser.IE&&/src|href/.test(A.toLowerCase())){return C.getAttribute(A,2)}if(C.tagName=="SELECT"&&A=="value"){return C.options[C.selectedIndex].value}if(C.attributes&&C.attributes[A]){return C.attributes[A].nodeValue}return C.getAttribute?C.getAttribute(A):undefined};$.setAttribute=function(E,A,D){var C=$.props;if(C[A]){E[C[A]]=D;return }if(E.tagName=="SELECT"&&A=="value"){for(var B=0;B<E.options.length;B++){if(E.options[B].value==D){E.selectedIndex=B;break}}return }if(E.attributes[A]){E.attributes[A].nodeValue=D;return }E.setAttribute(A,""+D)};var Dollar=$({__init:function(){this.elements=[].concat(arguments[0]||[]);this.e=this.elements[0];this._$=true;this.length=this.elements.length;for(var A=0;A<this.elements.length;A++){this[A]=this.elements[A]}},$:function(){var H=$A(arguments),E=false,F;if($.isNumber(H[0])){E=H.shift()}var I=H.shift().match(/^(\$?)(\$?)(.+)$/),G=!!I[1],B=!!I[2],D=I[3];if(this.length==0){return B?undefined:this}if(G){if("_"+D in $.Dom){var A="_"+D;if(false!==E){F=$.Dom[A].apply(null,[this[E]].concat(H))}else{F=[];for(var C=0;C<this.length;C++){F.push($.Dom[A].apply(null,[this[C]].concat(H)))}F.length==1&&(F=F[0])}return B?F:this}if(false!==E){if(!this[E][D]){throw"Can't fiind method:"+D+"!"}F=this[E][D](H[0],H[1],H[2])}else{F=[];for(var C=0;C<this.length;C++){F.push(this[C][D](H[0],H[1],H[2]))}F.length==1&&(F=F[0])}return B?F:this}if(H[0]!==undefined){if(false!==E){this.length&&$.setAttribute(this[E],D,H[0])}else{for(var C=0;C<this.length;C++){$.setAttribute(this[C],D,H[0])}}return this}if(false!==E){return this.length&&$.getAttribute(this[E],D)}F=[];for(var C=0;C<this.length;C++){F.push($.getAttribute(this[C],D))}return this.length&&F.length==1?F[0]:F},css:function(){var C=$A(arguments),B=false;if($.isNumber(C[0])){B=C.shift()}if($.isString(C[0])&&!/:/.test(C[0])){if(B!==false){return this.length&&$.Dom._style(this[B],C[0])}var A=[];for(var E=0;E<this.length;E++){A.push($.Dom._style(this[E],C[0]))}return this.length&&A.length==1?A[0]:A}var G;if($.isString(C[0])){G={};C[0]=C[0].replace(/;$/,"");var F=C[0].split(";"),E,D;for(E=0;E<F.length;E++){D=F[E].split(":");G[D[0].trim()]=D[1].trim()}}else{G=C[0]}if(B!==false){this.length&&$.Dom._style(this[B],G);return this}for(E=0;E<this.length;E++){$.Dom._style(this[E],G)}return this},each:function(B){try{for(var A=0;A<this.length;A++){try{B(this[A],A)}catch(C){if(C!=$continue){throw C}}}}catch(C){if(C!=$break){throw C}}},find:function(){return $(arguments[0],this.elements)},html:function(){var C=$A(arguments),B=false;if($.isNumber(C[0])){B=C.shift()}if(C.length==0){var A=[];if(B!==false){if(this.length==1){this[0].innerHTML=B;return this}return this[B].innerHTML}for(var D=0;D<this.length;D++){A.push(this[D].innerHTML)}return this.length&&A.length==1?A[0]:A}if(C.length==1){if(B!==false){this.length&&(this[B].innerHTML=C[0]);return this}for(var D=0;D<this.length;D++){this[D].innerHTML=C[0]}return this}return this},item:function(A){return this[A]},fill:function(A,B){var C=this;B=B||{};if(B.preCall){B.preCall()}$("url:"+A,{method:"get",onSuccess:function(E,D){if(C.length){C[0].innerHTML=B.process?B.process(E.responseText,D):E.responseText}(B.sufCall||$.empty).bind(C[0])()},onFailure:function(){if(C.length){C[0].innerHTML=B.failedText||"Fail to Load data"}(B.sufCall||$.empty).bind(C[0])()}})},add:function(){var A=$A(arguments);for(var B=0;B<A.length;B++){this.elements.push(A[B]);this[this.length]=A[B];this.length++}this.length&&(thie.e=this[0]);return this},unbind:function(){for(var A=0;A<this.length;A++){$.Event.stopObserving(this[A])}}});$.extend=function(D,B,A){for(var C in B){if(A&&C in D){continue}D[C]=B[C]}return D};$.clone=function(C){var B=new C.constructor();for(var A in C){if(C[A]!==B[A]){B[A]=C[A]}}return arguments[1]==undefined?B:$.extend(B,arguments[1])};$.extend(Function.prototype,{bind:function(){var B=this,A=$A(arguments),C=A.shift();return function(){return B.apply(C,A.concat($A(arguments)))}},bindAsEventListener:function(){var B=this,A=$A(arguments),C=A.shift();return function(D){B.apply(C,[D||window.event].concat(A).concat($A(arguments)))}}});$.extend(String.prototype,{camelize:function(){var B=this.split("-");var C=-1,A=0;while((C=this.indexOf("-",C+1))!=-1){B[A+1]=B[A+1].charAt(0).toUpperCase()+B[A+1].substring(1);A++}return B.join("")},decode:function(){return decodeURIComponent(this)},encode:function(){return encodeURIComponent(this)},format:function(){var B=this;for(var A=0;A<arguments.length;A++){B=B.replace(new RegExp("\\{"+A+"\\}","g"),arguments[A])}return B},getQueryParams:function(){var A=this.replace(/^\??/,"").split("&");var B={};for(var C=0;C<A.length;C++){var D=A[C].split("=");B[D[0].decode()]=D[1]?D[1].decode():null}return B},isEmpty:function(){return/^[\s　]*$/.test(this)},process:function(A){return this.replace(/\$\{([^\}]+)\}/g,function(C,B){B=B.trim();if(B in A){return A[B]}return window[B]||""})},test:function(A){return A.test(this)},trim:function(){return this.replace(/^[\s　]+|[\s　]+$/g,"")},truncate:function(A,D){var E=this;A=A||30;if(E.replace(/[^\x00-\xff]/g,"aa").length<=A){return E}if(D===undefined){D="..."}A-=D.length;for(var C=0,B=0;C<A;++C){if(E.charCodeAt(C-B)>255){++C;++B}}if(C!=A){--B;C-=2}return E.slice(0,C-B)+D}});$.extend(Array.prototype,{each:function(B){try{for(var A=0;A<this.length;A++){try{B(this[A],A)}catch(C){if(C!=$continue){throw C}}}}catch(C){if(C!=$break){throw C}}},last:function(){return this[this.length-1]},include:function(A){return this.indexOf(A)!=-1},indexOf:function(B){for(var A=0;A<this.length;A++){if(this[A]==B){return A}}return -1}});$.events.each(function(A){Dollar.prototype[A]=function(B,D){for(var C=0;C<this.elements.length;C++){$.Event.observe(this.elements[C],A,D?B.bind(this[C]):B)}return this};Dollar.prototype["$"+A]=function(B){for(var C=0;C<this.elements.length;C++){$.Event.stopObserving(this[C],A,B)}return this}});$.doException=function(){};$.geval=function(s){try{if(window.execScript){window.execScript(s)}else{window.eval(s)}return true}catch(e){$.doException("$.geval",e);return false}};$.jeval=function(t){try{return eval("("+t+")")}catch(e){$.doException("$.jeval",e);return false}};$.run=function(o){if(!o){return }if($.isString(o)){return eval(o)}if($.isFunction(o)){return o()}};$.Dom={_addTo:function(B,A){A.appendChild(B)},_class:function(C,E){E=E.replace(/^(.+?)\s*=>\s*(.+)$/,"~$1 $2");var D=E.match(/^(\W)?([\w-]+)\s*([\w-]+)?$/),B=C.className||"",A=new RegExp("(^|\\s+)("+D[2]+")($|\\s+)");if(!D){return false}switch(D[1]){case"@":return A.test(B);case"~":C.className=B.replace(A,"$1"+D[3]+"$3");break;case"-":C.className=B.replace(A,"$1$3");break;case"+":default:if(!$.Dom._class(C,"@"+D[2])){C.className=B+(B==""?"":" ")+D[2]}}return true},_elementsWithClass:function(F,D){var B=F.getElementsByTagName("*");var E=[],C=new RegExp("(^|\\s)"+D+"(\\s|$)");for(var A=0;A<B.length;A++){var G=B[A];if(G.className.match(C)){E.push(G)}}return E},_hide:function(A){A.style.display="none"},_position:function(C){var A=y=0,D=C;var B=D.style.display;D.style.display="";while(C){A+=C.offsetLeft||0;y+=C.offsetTop||0;C=C.offsetParent}D.style.display=B;return[A,y]},_remove:function(A){A.parentNode.removeChild(A);return A},_empty:function(C){var B=$A(C.childNodes);for(var A=0;A<B.length;A++){C.removeChild(B[A])}C.firstChild&&C.removeChild(C.firstChild)},_show:function(A){A.style.display=""},_style:function(e,style){if($.isString(style)){var value=e.style[style.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(e,null);value=css?css.getPropertyValue(style):null}else{if(e.currentStyle){value=e.currentStyle[style.camelize()]}}}if(window.opera&&["left","top","right","bottom"].include(style)&&$.Dom._style(e,"position")=="static"){value="auto"}return value=="auto"?null:value}var o=style;try{with(e){for(var pro in o){if($.isFunction(o[pro])){continue}style[pro.camelize()]=o[pro]}}}catch(e){$.doException("$.Dom._style",e)}},_opacity:function(B,A){if($.isIE){B.style.filter="alpha(opacity="+Math.round(A*100)+")"}else{B.style.opacity=A}},_toggleDisplay:function(A){$.Dom[A.style.display=="none"?"_show":"_hide"](A)},_append:function(A,B){if($.isElement(A)){A.appendChild($.isString(B)?$(B):B)}},_prepend:function(A,B){if($.isElement(A)){A.insertBefore($.isString(B)?$(B):B,A.firstChild)}},_before:function(A,B){A.parentNode.insertBefore($.isString(B)?$(B):B,A)},_after:function(A,B){A.parentNode.insertBefore($.isString(B)?$(B):B,A.nextSibling)},_pre:function(A){while(A){A=A.previousSibling;if($.isElement(A)){return new Dollar(A)}}return null},_next:function(A){while(A){A=A.nextSibling;if($.isElement(A)){return new Dollar(A)}}return null},_toggle:function(D,C,B){if(D){var A=new $.Toggle(B);$.observe(D,C,function(){A.call(null,D)})}}};$.Dom.bind=function(C,A,B){if(!(C in Dollar.prototype)||A){Dollar.prototype[C]=function(){var E=arguments,D;if(this.length){D=$.Dom["_"+C](this[0],E.length>0?E[0]:undefined,E.length>1?E[1]:undefined,E.length>2?E[2]:undefined)}return B?D:this}}};$.Dom.extend=function(E,A,B){for(var D in E){if(!$.isFunction(E[D])){continue}var C=D;if(D.charAt(0)!="_"){C="_"+D}if(!(C in $.Dom)||A){$.Dom[C]=E[D]}if($.isArray(B)){$.Dom.bind(D,B[0],B[1])}}};["empty","hide","show","remove","toggleDisplay","opacity","addTo","append","prepend","before","after","toggle"].each(function(A){$.Dom.bind(A)});["pre","next"].each(function(A){$.Dom.bind(A,true,true)});$.Toggle=$({__init:function(){this.funs=$.isArray(arguments[0])?arguments[0]:$A(arguments);this.pos=0},call:function(A,B){A=[].concat(A);this.funs[this.pos++%this.funs.length].apply(B||null,A)}});$.Cookie=function(A,B,F,E,C,D){this.$document=A;this.$name=B;this.$days=F||null;this.$path=E||null;this.$domain=C||null;this.$secure=D||false};$.Cookie.prototype={load:function(){var C=$.Cookie.All.get(this.$document,this.$name);if(!C){return }var A=C.split("&");for(var B=0;B<A.length;B++){A[B]=A[B].split(":")}for(var B=0;B<A.length;B++){this[A[B][0]]=A[B][1].decode()}return },remove:function(){$.Cookie.All.remove(this.$document,this.$name,this.$path,this.$domain)},store:function(){var A="";for(var B in this){if((B.charAt(0)=="$")||((typeof this[B])=="function")){continue}if(A!=""){A+="&"}A+=B+":"+this[B].encode()}$.Cookie.All.set(this.$document,this.$name,A,this.$days,this.$path,this.$domain,this.$secure)}};$.Cookie.All={get:function(){var D=[].concat($A(arguments)),G=D.shift();var F=G.cookie.replace(/\s/g,"");var C=[];if(F==""){return false}for(var E=0;E<D.length;E++){var B=D[E];var H=F.indexOf(B+"=");if(H==-1){C.push(null);continue}H+=B.length+1;var A=F.indexOf(";",H);if(A==-1){A=F.length}C.push(F.substring(H,A))}return C.length==1?C[0]:C},set:function(E,B,F,G,I,D,A){var C=B+"="+F;var H=G?new Date((new Date()).getTime()+G*24*3600000):null;if(H){C+="; expires="+H.toGMTString()}if(I){C+="; path="+I}if(D){C+=";domain="+D}if(A){C+=";secure"}E.cookie=C},remove:function(E,A,D,C){var B=A+"=";if(D){B+="; path="+D}if(C){B+="; domain="+C}B+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";E.cookie=B}};$.Builder={EXPORT:["node"],NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(D){if(/^\w+$/.test(D)){return document.createElement(D)}if(!/^<[^>]+?\/?>((.|\n)*<\/[^>]+>)?$/.test(D)){return null}var C=D.match(/<(\w+)(?:\s|>)/)[1].toUpperCase();var F=this.NODEMAP[C]||"DIV";var A=document.createElement(F);try{A.innerHTML=D}catch(E){}var B=A.firstChild||null;if(B&&(B.tagName!=C)){B=B.getElementsByTagName(C)[0]}if(!B){return null}if(arguments[1]){this.addChildren(B,arguments[1])}return B},addChildren:function(C,B){var D=[].concat(B);for(var A=0;A<D.length;A++){if($.isStringOrNumber(D[A])){C.appendChild(this.text(D[A]))}else{C.appendChild(D[A])}}},text:function(A){return document.createTextNode(A)}};$.Ajax={defaultSets:{method:"post",asyn:true},querying:{},cache:{}};$.Ajax.Base={getHeader:function(A){try{return this.http.getResponseHeader(A)}catch(B){$.doException("$.Ajax.getHeader",B);return false}},getHttp:function(){var trys=["new XMLHttpRequest()",'new ActiveXObject("Msxml2.XMLHTTP")','new ActiveXObject("Microsoft.XMLHTTP")'];for(var i=0;i<trys.length;i++){try{return eval(trys[i])}catch(e){}}return false}};$.Ajax.Simple=$($.extend({__init:function(A,B){this.sets=$.clone($.Ajax.defaultSets,B);this.http=this.getHttp();if(!this.http){return null}this._run(A)},_run:function(A){var C=this;if(!["get","post"].include(C.sets.method)){C.sets.method="post"}C.http.open(C.sets.method,A,C.sets.asyn);C.http.onreadystatechange=C.onStateChange.bind(C);if(C.sets.method=="post"){C.http.setRequestHeader("Content-type","application/x-www-form-urlencoded")}if(C.sets.headers){for(var B=0;B<C.sets.headers.length;B++){var D=C.sets.headers[B];C.http.setRequestHeader(D[0],D[1])}}C.http.send(C.sets.method=="post"?(C.sets.postBody||"_"):null)},onStateChange:function(){var A=this.http;if(A.readyState==4){if(A.status==200){(this.sets.onSuccess||$.empty)(A,this.getHeader("X-JSON"))}else{(this.sets.onFailure||$.empty)(A)}}}},$.Ajax.Base));$.Json=$({__init:function(C,F){var A=false;if($.isString(F)){A=F}else{if($.isFunction(F)){var E=$.gid();window[E]=function(G){F(G);window[E]=undefined;try{delete window[E]}catch(H){}if(D){setTimeout(function(){D.removeChild(B)},10)}};A=E}}if(A){C=C+(C.indexOf("?")==-1?"?":"&")+"callback="+A}var D=document.getElementsByTagName("head")[0];var B=document.createElement("script");B.src=C;D.appendChild(B)}});$.dataQuery=function(A,B){if(!B){B={}}var C=B.cacheID===undefined?A:B.cacheID;if($.Ajax.cache[C]){return(B.callback||$.empty)($.Ajax.cache[C])}if($.Ajax.querying[C]){return }$.Ajax.querying[C]=true;new $.Ajax.Simple(A,{method:B.method||"get",onSuccess:function(D){var E=B.process?B.process(D):D.responseText;if(!B.noCache){$.Ajax.cache[C]=E}delete $.Ajax.querying[C];(B.callback||$.empty)(E)},onFailure:function(){delete $.Ajax.querying[C];(B.onerror||$.empty)()}})};$.Event={EXPORT:["observe","stopObserving","Keys"],Keys:{BACKSPACE:8,TAB:9,RETURN:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34},observers:[],_observeAndCache:function(D,C,B,A){if(D.addEventListener){$.Event.observers.push([D,C,B,A]);D.addEventListener(C,B,A)}else{if(D.attachEvent){$.Event.observers.push([D,C,B,A]);D.attachEvent("on"+C,B)}}},observe:function(D,C,B,A){A=A||false;if(C=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||D.attachEvent)){C="keydown"}this._observeAndCache(D,C,B,A);return[D,C,B,A]},stopObserving:function(E,B,G,C){if($.Event.observers==null||$.Event.observers.length==0){return }var A=[];if(arguments.length==1){var H=$.Event.observers,J=[],I;for(var D=0;D<H.length;D++){I=H[D];if(I[0]==E){A.push(I)}else{J.push(I)}}$.Event.observers=J}else{A.push([E,B,G,C||false])}for(var D=0;D<A.length;D++){var I=A[D];var E=I[0],B=I[1],G=I[2],C=I[3];if(B=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||E.detachEvent)){B="keydown"}if(E.removeEventListener){E.removeEventListener(B,G,C)}else{if(E.detachEvent){try{E.detachEvent("on"+B,G)}catch(F){}}}}},unloadCache:function(){if($.Event.observers==null){return }for(var A=0;A<$.Event.observers.length;A++){$.Event.stopObserving.apply(this,$.Event.observers[A]);$.Event.observers[A][0]=null}$.Event.observers=null}};$.Event.Methods={element:function(A){return A.target||A.srcElement},find:function(B,A){var C=B.target||B.srcElement;A=A.toUpperCase();while(C.tagName!=A&&C.tagName!="HTML"){C=C.parentNode}return C.tagName==A?C:false},x:function(A){return A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},y:function(A){return A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},keyCode:function(A){return A.keyCode||A.which},stop:function(B){var A=B;if(A.preventDefault){A.preventDefault();A.stopPropagation()}else{A.returnValue=false;A.cancelBubble=true}}};$.Event.observe(window,"unload",$.Event.unloadCache,false);$.Browser={EXPORT:["Gecko=>isGecko","IE=>isIE","Opera=>isOpera","WebKit=>isWebKit","Version=>BrowserVersion"],Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1,IE:/msie/.test(navigator.userAgent.toLowerCase()),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Version:(navigator.userAgent.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/i)||[])[1]};$.Timer={defaultSets:{timespan:2,callback:$.empty},add:function(A){if(!this.queen){this.queen=[]}$.extend(A,this.defaultSets,true);A.callPos=new Date().getTime()+A.timespan*1000;this.queen.push(A);if(!this.timer){this.timer=setInterval(this.loop.bind(this),40)}return A},remove:function(C){var B=[];for(var A=0;A<this.queen.length;A++){if(this.queen[A]!=C){B.push(this.queen[A])}}delete this.queen;this.queen=B;if(this.queen.length==0){clearInterval(this.timer);this.timer=false}},loop:function(){var A=new Date().getTime();for(var B=0;B<this.queen.length;B++){var C=this.queen[B];if(C.callPos<=A){if("callback" in C){$.run(C.callback)}if(C.loop){C.callPos=A+C.timespan*1000}else{this.remove(C)}}}}};$.Effect={effects:[],add:function(A){var B=new Date().getTime();A.startOn=A.delay*1000+B;A.finishOn=A.startOn+A.duration*1000;A.currentFrame=0;A.totalFrames=A.fps*A.duration;A.status="idle";this.effects.push(A);if(!this.interval){this.interval=$.Timer.add({timespan:0.04,loop:true,callback:this.loop.bind(this)})}},remove:function(D,A){var B=[];for(var C=0;C<this.effects.length;C++){if(this.effects[C]!=D){B.push(this.effects[C])}else{if(A){D.render(D.to);D.status="finish";(D.onFinish||$.empty)()}(D.onRemove||$.empty)()}}delete this.effects;this.effects=B;if(this.effects.length==0){$.Timer.remove(this.interval);this.interval=false}},loop:function(){var E=new Date().getTime();for(var B=0;B<this.effects.length;B++){var A=this.effects[B];if(E>=A.finishOn){A.status="finish";this.remove(A,true);return }if(A.status=="idle"){(A.onStart||$.empty)();A.status="running"}var D=(E-A.startOn)/(A.finishOn-A.startOn);var C=Math.round(D*A.totalFrames);if(C>A.currentFrame){D=A.transition(D);D=A.from+((A.to-A.from)*D);A.render(D);A.currentFrame=C}}}};$.Effect.Transitions={EXPORT:"all",linear:function(A){return A},sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){return((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(A){return(Math.floor(A*10)%2==0?(A*10-Math.floor(A*10)):1-(A*10-Math.floor(A*10)))}};$.Effect.DefaultSets={transition:$.Effect.Transitions.sinoidal,duration:1,fps:25,from:0,to:1,delay:0};$.effect=function(A){return $.clone($.Effect.DefaultSets,A)};$export();if($.isIE&&document&&document.execCommand){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}}(function(){var A=function(){if($.isReady||!$.ReadyList){return }if($.isIE){try{document.documentElement.doScroll("left")}catch(B){setTimeout(arguments.callee,0);return }}$.isReady=true;$.ReadyList.each(function(C){C()});delete $.ReadyList};__onload__={E:function(){window.onload=null;A()},IES:function(B){if(B.readyState==="complete"){this.E()}}};onload=A;if($.isWebKit||($.isOpera&&parseInt($.BrowserVersion)<9)){(function(){/loaded|complete/.test(document.readyState)?__onload__.E():setTimeout(arguments.callee,1)})()}else{if(document.addEventListener){document.addEventListener("DOMContentLoaded",__onload__.E,false)}else{if(!$.isOpera||parseInt($.BrowserVersion)>=9){document.write('<SCRIPT onreadystatechange="__onload__.IES(this)" src="javascript:void(0)" defer="defer"></SCRIPT>')}}}})();$.RText=$({__init:function(C){C=$.extend({noResultText:"No Result!",hideWhenNoResult:true,bgE:false,"class":"RTextElement",classSelected:"RTextElementSelected",delay:1,hideDelay:0.3,valueField:0,useJson:false,noCache:false,getRetArr:function(b){return b&&b.result},getRetWord:function(b){return b&&b.word},getRelatedTextObject:false,mode:1},C);var a=$E(C.textInput),S=$E(C.showBox),U=C.bgE&&$E(C.bgE);var J=null,N=null,H=null,Y=null,L=null,D=null,X=this;var V=function(){if(L){clearTimeout(L)}L=null};if(C.useJson&&!C.jsonCallbackName){C.jsonCallbackName=$.gid()}var G=function(c){var b=$(c,"keyCode");if(c.type=="keydown"){if(b==$.Keys.DOWN){E()}return }switch(b){case $.Keys.DOWN:if(!$.isOpera){E()}return ;case $.Keys.UP:return E(true);case $.Keys.RETURN:K();return(C.onPressEnter||$.empty)();case $.Keys.ESC:return K();default:F()}};var P=function(){K();V();$.RText.Mgr.activeInstance=null};var M=function(){return a.$("value").trim().toLowerCase()};var F=function(){var b=M();if(N==b&&S.css("display")!="none"){return }H=b;T();if(H==""||(C.mode==1&&$.RText.NoResultPrefix.has(H))){R();K();return }$.RText.Mgr.activeInstance=X;if(!C.delay){return Z(H)}V();L=setTimeout(Q.bind(null,H),C.delay*1000)};var T=function(){if(S.css("display")=="none"){return }R();D=setTimeout(K,C.hideDelay*1000)};var R=function(){if(D!=null){clearTimeout(D);D=null}};var Q=function(b){if(b==M()){Z(b)}};var Z=function(b){if(C.getRelatedTextObject){return B(C.getRelatedTextObject(b))}var c=C.url.format(b.encode());if(C.noCache){c+="&rand="+Math.random()}if(C.useJson){if(C.jsonCallbackName){if(!window[C.jsonCallbackName]){window[C.jsonCallbackName]=function(d){$.RText.Mgr.show(d)}}return new $.Json(c,C.jsonCallbackName)}return new $.Json(c,B)}if(C.noCache){new $.Ajax.Simple(c,{method:"get",onSuccess:function(d){B($.jeval(d.responseText))}})}else{$.dataQuery(c,{callback:B,process:function(d){return $.jeval(d.responseText)}})}};var B=function(g){var c=C.getRetWord(g);var b=C.getRetArr(g);if(!c||c!=M()||!b){return }N=c;J=null;var h=[];if(C.prefix){h.push(C.prefix)}if(b.length==0){$.RText.NoResultPrefix.add(c)}for(var d=0;d<b.length;d++){h.push(C.process(b[d],d))}if(b.length==0){if(C.hideWhenNoResult){return }h.push(C.noResultText)}R();if(C.suffix){h.push(C.suffix)}S.html(h.join(""));(S.find(">*."+C["class"])||[]).each(function(k,j){k.title=b[j][C.valueField];k.onmouseover=function(){I(k,true)};k.onmousedown=function(){W(k.title)}});S.$("$show");if(U){U.css("height:"+S[0].offsetHeight+"px").$("$show");var f=U.find("iframe");if(f){f.css("height:"+S[0].offsetHeight+"px")}}};var K=function(){if(S.css("display")=="none"){return }if(U){U.$("$hide")}S.$("$hide");C.onHide&&C.onHide();J=null};var O=false;this.activate=function(){if(O){return }if($.isOpera){a.keydown(G)}a.keyup(G);a.blur(P);O=true};this.disable=function(){if(!O){return }if($.isOpera){a.$keydown(G)}a.$keyup(G);a.$blur(P);V();O=false};this.setUrlTpl=function(b){C.url=b;N=null;H=null;if(C.mode==1){$.RText.NoResultPrefix.length=0}};var W=function(b){H=b;a.$("value",b);K();if(C.oncheck){C.oncheck(a)}};var A=function(b){$.Dom._class(b,"-"+C.classSelected)};var I=function(d,c){if(J){A(J)}if(d===null){J=null;return a.$("value",Y||"")}$.Dom._class(d,C.classSelected);J=d;if(!c){var b=d.title;H=b.toLowerCase();a.$("value",b)}};this.choose=I;var E=function(b){if(S.css("display")=="none"){return }var d=S.find("*."+C["class"]);if(!d){return }if(J==null){Y=a.$("value");if(b){return I(d.elements.last())}return I(d[0])}var c;for(c=0;c<d.length;c++){if(J==d[c]){break}}if(b){if(c==0){return I(null)}return I(d[--c])}if(c==d.length-1){return I(null)}return I(d[++c])};this.__show=B;this.activate()}});$.RText.NoResultPrefix={list:[],add:function(A){this.list.push(A)},has:function(A){if(!A){return false}for(var B=0;B<this.list.length;B++){if(A.indexOf(this.list[B])==0){return true}}return false}};$.RText.Mgr={activeInstance:null,show:function(A){if(this.activeInstance){this.activeInstance.__show(A)}}};$.RText.version=20081120;$.require("$ 20080412","RText");function img_err(B){var A=ResWebRoot+"images/default.jpg";if(B.src.indexOf(A)==-1){B.src=A}}function setHome(D){var B="http://www.pp.tv";if($.isIE){D.style.behavior="url(#default#homepage)";D.setHomePage(B)}else{if($.isGecko){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");if(confirm("确定要设将"+B+"设为主页？")){var A=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);A.setCharPref("browser.startup.homepage",B)}}catch(C){alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'")}}else{alert("该功能暂未实现对你正在使用浏览器的支持")}}}$.Dom.extend({fadeIn:function(C){var A=$(C);A.opacity(0.01).show();var B=$.effect({render:function(D){A.opacity(D)},duration:0.5});$.Effect.add(B)},sliderHeight:function(B,D,C,A){$.Effect.add($.effect({duration:0.5,from:D,to:C,render:function(E){B.style.height=Math.round(E)+"px"},onFinish:A||$.empty}))},sliderWidth:function(B,D,C,A){$.Effect.add($.effect({duration:0.5,from:D,to:C,render:function(E){B.style.width=Math.round(E)+"px"},onFinish:A||$.empty}))}},1,[1,0]);function getCookieObj(A,C){var B="___global_cookieobj_"+A+"__";if(!window[B]){window[B]=new $.Cookie(document,A,C||360*10,"/");window[B].load()}return window[B]}function stat(B){var A=window.stat_handler_page||"http://s.pp.tv/a.png";A+=(A.indexOf("?")==-1?"?":"&")+B+"&r="+Math.random();(new Image()).src=A};
