var Prototype={Version:"1.5.1.1",Description:"Prototype JavaScript framework, version 1.5.1.1 (c) 2005-2007 Sam Stephenson,Prototype is freely distributable under the terms of an MIT-style license.For details, see the Prototype web site: http://www.prototypejs.org/",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(B){return B}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(D,E){for(var F in E){D[F]=E[F]}return D};Object.extend(Object,{inspect:function(C){try{if(C===undefined){return"undefined"}if(C===null){return"null"}return C.inspect?C.inspect():C.toString()}catch(D){if(D instanceof RangeError){return"..."}throw D}},toJSON:function(F){var I=typeof F;switch(I){case"undefined":case"function":case"unknown":return ;case"boolean":return F.toString()}if(F===null){return"null"}if(F.toJSON){return F.toJSON()}if(F.ownerDocument===document){return }var J=[];for(var G in F){var H=Object.toJSON(F[G]);if(H!==undefined){J.push(G.toJSON()+": "+H)}}return"{"+J.join(", ")+"}"},keys:function(D){var F=[];for(var E in D){F.push(E)}return F},values:function(F){var D=[];for(var E in F){D.push(F[E])}return D},clone:function(B){return Object.extend({},B)}});Function.prototype.bind=function(){var D=this,E=$A(arguments),F=E.shift();return function(){return D.apply(F,E.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(E){var D=this,F=$A(arguments),E=F.shift();return function(A){return D.apply(E,[A||window.event].concat(F))}};Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(B){$R(0,this,true).each(B);return this},toPaddedString:function(E,F){var D=this.toString(F||10);return"0".times(E-D.length)+D},toJSON:function(){return isFinite(this)?this.toString():"null"}});Date.prototype.toJSON=function(){return'"'+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+'"'};var Try={these:function(){var I;for(var J=0,H=arguments.length;J<H;J++){var F=arguments[J];try{I=F();break}catch(G){}}return I}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(D,C){this.callback=D;this.frequency=C;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}}};Object.extend(String,{interpret:function(B){return B==null?"":String(B)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(G,I){var F="",H=this,J;I=arguments.callee.prepareReplacement(I);while(H.length>0){if(J=H.match(G)){F+=H.slice(0,J.index);F+=String.interpret(I(J));H=H.slice(J.index+J[0].length)}else{F+=H,H=""}}return F},sub:function(E,D,F){D=this.gsub.prepareReplacement(D);F=F===undefined?1:F;return this.gsub(E,function(A){if(--F<0){return A[0]}return D(A)})},scan:function(D,C){this.gsub(D,C);return this},truncate:function(D,C){D=D||30;C=C===undefined?"...":C;return this.length>D?this.slice(0,D-C.length)+C:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var D=new RegExp(Prototype.ScriptFragment,"img");var C=new RegExp(Prototype.ScriptFragment,"im");return(this.match(D)||[]).map(function(A){return(A.match(C)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var B=arguments.callee;B.text.data=this;return B.div.innerHTML},unescapeHTML:function(){var B=document.createElement("div");B.innerHTML=this.stripTags();return B.childNodes[0]?(B.childNodes.length>1?$A(B.childNodes).inject("",function(D,A){return D+A.nodeValue}):B.childNodes[0].nodeValue):""},toQueryParams:function(D){var C=this.strip().match(/([^?#]*)(#.*)?$/);if(!C){return{}}return C[1].split(D||"&").inject({},function(B,A){if((A=A.split("="))[0]){var H=decodeURIComponent(A.shift());var G=A.length>1?A.join("="):A[0];if(G!=undefined){G=decodeURIComponent(G)}if(H in B){if(B[H].constructor!=Array){B[H]=[B[H]]}B[H].push(G)}else{B[H]=G}}return B})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(E){var D="";for(var F=0;F<E;F++){D+=this}return D},camelize:function(){var F=this.split("-"),E=F.length;if(E==1){return F[0]}var G=this.charAt(0)=="-"?F[0].charAt(0).toUpperCase()+F[0].substring(1):F[0];for(var H=1;H<E;H++){G+=F[H].charAt(0).toUpperCase()+F[H].substring(1)}return G},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(D){var C=this.gsub(/[\x00-\x1f\\]/,function(B){var A=String.specialChar[B[0]];return A?A:"\\u00"+B[0].charCodeAt().toPaddedString(2,16)});if(D){return'"'+C.replace(/"/g,'\\"')+'"'}return"'"+C.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(B){return this.sub(B||Prototype.JSONFilter,"#{1}")},isJSON:function(){var B=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(B)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(B){return this.indexOf(B)>-1},startsWith:function(B){return this.indexOf(B)===0},endsWith:function(C){var D=this.length-C.length;return D>=0&&this.lastIndexOf(C)===D},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)}});String.prototype.gsub.prepareReplacement=function(D){if(typeof D=="function"){return D}var C=new Template(D);return function(A){return C.evaluate(A)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});with(String.prototype.escapeHTML){div.appendChild(text)}var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;Template.prototype={initialize:function(C,D){this.template=C.toString();this.pattern=D||Template.Pattern},evaluate:function(B){return this.template.gsub(this.pattern,function(D){var A=D[1];if(A=="\\"){return D[2]}return A+String.interpret(B[D[3]])})}};var $break={},$continue=new Error('"throw $continue" is deprecated, use "return" instead');var Enumerable={each:function(F){var D=0;try{this._each(function(A){F(A,D++)})}catch(E){if(E!=$break){throw E}}return this},eachSlice:function(I,J){var F=-I,H=[],G=this.toArray();while((F+=I)<G.length){H.push(G.slice(F,F+I))}return H.map(J)},all:function(D){var C=true;this.each(function(A,B){C=C&&!!(D||Prototype.K)(A,B);if(!C){throw $break}});return C},any:function(D){var C=false;this.each(function(A,B){if(C=!!(D||Prototype.K)(A,B)){throw $break}});return C},collect:function(D){var C=[];this.each(function(A,B){C.push((D||Prototype.K)(A,B))});return C},detect:function(D){var C;this.each(function(A,B){if(D(A,B)){C=A;throw $break}});return C},findAll:function(D){var C=[];this.each(function(A,B){if(D(A,B)){C.push(A)}});return C},grep:function(E,F){var D=[];this.each(function(A,B){var C=A.toString();if(C.match(E)){D.push((F||Prototype.K)(A,B))}});return D},include:function(C){var D=false;this.each(function(A){if(A==C){D=true;throw $break}});return D},inGroupsOf:function(D,C){C=C===undefined?null:C;return this.eachSlice(D,function(A){while(A.length<D){A.push(C)}return A})},inject:function(C,D){this.each(function(A,B){C=D(C,A,B)});return C},invoke:function(D){var C=$A(arguments).slice(1);return this.map(function(A){return A[D].apply(A,C)})},max:function(D){var C;this.each(function(A,B){A=(D||Prototype.K)(A,B);if(C==undefined||A>=C){C=A}});return C},min:function(D){var C;this.each(function(A,B){A=(D||Prototype.K)(A,B);if(C==undefined||A<C){C=A}});return C},partition:function(E){var F=[],D=[];this.each(function(A,B){((E||Prototype.K)(A,B)?F:D).push(A)});return[F,D]},pluck:function(D){var C=[];this.each(function(A,B){C.push(A[D])});return C},reject:function(D){var C=[];this.each(function(A,B){if(!D(A,B)){C.push(A)}});return C},sortBy:function(B){return this.map(function(A,D){return{value:A,criteria:B(A,D)}}).sort(function(A,F){var G=A.criteria,H=F.criteria;return G<H?-1:G>H?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var F=Prototype.K,D=$A(arguments);if(typeof D.last()=="function"){F=D.pop()}var E=[this].concat(D).map($A);return this.map(function(A,B){return F(E.pluck(B))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(F){if(!F){return[]}if(F.toArray){return F.toArray()}else{var H=[];for(var E=0,G=F.length;E<G;E++){H.push(F[E])}return H}};if(Prototype.Browser.WebKit){$A=Array.from=function(F){if(!F){return[]}if(!(typeof F=="function"&&F=="[object NodeList]")&&F.toArray){return F.toArray()}else{var H=[];for(var E=0,G=F.length;E<G;E++){H.push(F[E])}return H}}}Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(F){for(var D=0,E=this.length;D<E;D++){F(this[D])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(B){return B!=null})},flatten:function(){return this.inject([],function(D,C){return D.concat(C&&C.constructor==Array?C.flatten():[C])})},without:function(){var B=$A(arguments);return this.select(function(A){return !B.include(A)})},indexOf:function(D){for(var F=0,E=this.length;F<E;F++){if(this[F]==D){return F}}return -1},reverse:function(B){return(B!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(B){return this.inject([],function(A,E,F){if(0==F||(B?A.last()!=E:!A.include(E))){A.push(E)}return A})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var B=[];this.each(function(D){var A=Object.toJSON(D);if(A!==undefined){B.push(A)}});return"["+B.join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;function $w(B){B=B.strip();return B?B.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var G=[];for(var J=0,I=this.length;J<I;J++){G.push(this[J])}for(var J=0,I=arguments.length;J<I;J++){if(arguments[J].constructor==Array){for(var F=0,H=arguments[J].length;F<H;F++){G.push(arguments[J][F])}}else{G.push(arguments[J])}}return G}}var Hash=function(B){if(B instanceof Hash){this.merge(B)}else{Object.extend(this,B||{})}};Object.extend(Hash,{toQueryString:function(D){var C=[];C.add=arguments.callee.addPair;this.prototype._each.call(D,function(A){if(!A.key){return }var B=A.value;if(B&&typeof B=="object"){if(B.constructor==Array){B.each(function(F){C.add(A.key,F)})}return }C.add(A.key,B)});return C.join("&")},toJSON:function(C){var D=[];this.prototype._each.call(C,function(A){var B=Object.toJSON(A.value);if(B!==undefined){D.push(A.key.toJSON()+": "+B)}});return"{"+D.join(", ")+"}"}});Hash.toQueryString.addPair=function(D,E,F){D=encodeURIComponent(D);if(E===undefined){this.push(D)}else{this.push(D+"="+(E==null?"":encodeURIComponent(E)))}};Object.extend(Hash.prototype,Enumerable);Object.extend(Hash.prototype,{_each:function(H){for(var E in this){var G=this[E];if(G&&G==Hash.prototype[E]){continue}var F=[E,G];F.key=E;F.value=G;H(F)}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(B){return $H(B).inject(this,function(D,A){D[A.key]=A.value;return D})},remove:function(){var E;for(var H=0,G=arguments.length;H<G;H++){var F=this[arguments[H]];if(F!==undefined){if(E===undefined){E=F}else{if(E.constructor!=Array){E=[E]}E.push(F)}}delete this[arguments[H]]}return E},toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(B){return B.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Hash.toJSON(this)}});function $H(B){if(B instanceof Hash){return B}return new Hash(B)}if(function(){var D=0,E=function(A){this.key=A};E.prototype.key="foo";for(var F in new E("bar")){D++}return D>1}()){Hash.prototype._each=function(I){var F=[];for(var J in this){var H=this[J];if((H&&H==Hash.prototype[J])||F.include(J)){continue}F.push(J);var G=[J,H];G.key=J;G.value=H;I(G)}}}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(E,D,F){this.start=E;this.end=D;this.exclusive=F},_each:function(C){var D=this.start;while(this.include(D)){C(D);D=D.succ()}},include:function(B){if(B<this.start){return false}if(this.exclusive){return B<this.end}return B<=this.end}});var $R=function(E,D,F){return new ObjectRange(E,D,F)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(B){this.responders._each(B)},register:function(B){if(!this.include(B)){this.responders.push(B)}},unregister:function(B){this.responders=this.responders.without(B)},dispatch:function(F,H,G,E){this.each(function(B){if(typeof B[F]=="function"){try{B[F].apply(B,[H,G,E])}catch(A){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(B){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,B||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string"){this.options.parameters=this.options.parameters.toQueryParams()}}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(D,C){this.transport=Ajax.getTransport();this.setOptions(C);this.request(D)},request:function(D){this.url=D;this.method=this.options.method;var E=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){E._method=this.method;this.method="post"}this.parameters=E;if(E=Hash.toQueryString(E)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+E}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){E+="&_="}}}try{if(this.options.onCreate){this.options.onCreate(this.transport)}Ajax.Responders.dispatch("onCreate",this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){setTimeout(function(){this.respondToReadyState(1)}.bind(this),10)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||E):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(F){this.dispatchException(F)}},onStateChange:function(){var B=this.transport.readyState;if(B>1&&!((B==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var G={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){G["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){G.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var I=this.options.requestHeaders;if(typeof I.push=="function"){for(var J=0,H=I.length;J<H;J+=2){G[I[J]]=I[J+1]}}else{$H(I).each(function(A){G[A.key]=A.value})}}for(var F in G){this.transport.setRequestHeader(F,G[F])}},success:function(){return !this.transport.status||(this.transport.status>=200&&this.transport.status<300)},respondToReadyState:function(F){var I=Ajax.Request.Events[F];var G=this.transport,J=this.evalJSON();if(I=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(G,J)}catch(H){this.dispatchException(H)}}try{(this.options["on"+I]||Prototype.emptyFunction)(G,J,this.options);Ajax.Responders.dispatch("on"+I,this,G,J)}catch(H){this.dispatchException(H)}if(I=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},getHeader:function(C){try{return this.transport.getResponseHeader(C)}catch(D){return null}},evalJSON:function(){try{var C=this.getHeader("X-JSON");return C?C.evalJSON():null}catch(D){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(B){(this.options.onException||Prototype.emptyFunction)(this,B);Ajax.Responders.dispatch("onException",this,B)}});function $(H){if(arguments.length>1){for(var E=0,F=[],G=arguments.length;E<G;E++){F.push($(arguments[E]))}return F}if(typeof H=="string"){H=document.getElementById(H)}return Element.extend(H)}if(!window.Element){var Element={}}Element.extend=function(M){var L=Prototype.BrowserFeatures;if(!M||!M.tagName||M.nodeType==3||M._extended||L.SpecificElementExtensions||M==window){return M}var P={},N=M.tagName,F=Element.extend.cache,O=Element.Methods.ByTag;if(!L.ElementExtensions){Object.extend(P,Element.Methods),Object.extend(P,Element.Methods.Simulated)}if(O[N]){Object.extend(P,O[N])}for(var J in P){var K=P[J];if(typeof K=="function"&&!(J in M)){M[J]=F.findOrStore(K)}}M._extended=Prototype.emptyFunction;return M};Element.extend.cache={findOrStore:function(B){return this[B]=this[B]||function(){return B.apply(null,[this].concat($A(arguments)))}}};Element.Methods={visible:function(B){return $(B).style.display!="none"},toggle:function(B){B=$(B);Element[Element.visible(B)?"hide":"show"](B);return B},hide:function(B){$(B).style.display="none";return B},show:function(B){$(B).style.display="";return B},remove:function(B){B=$(B);B.parentNode.removeChild(B);return B},update:function(D,C){C=typeof C=="undefined"?"":C.toString();$(D).innerHTML=C.stripScripts();setTimeout(function(){C.evalScripts()},10);return D},replace:function(E,F){E=$(E);F=typeof F=="undefined"?"":F.toString();if(E.outerHTML){E.outerHTML=F.stripScripts()}else{var D=E.ownerDocument.createRange();D.selectNodeContents(E);E.parentNode.replaceChild(D.createContextualFragment(F.stripScripts()),E)}setTimeout(function(){F.evalScripts()},10);return E},inspect:function(D){D=$(D);var C="<"+D.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(A){var B=A.first(),H=A.last();var G=(D[B]||"").toString();if(G){C+=" "+H+"="+G.inspect(true)}});return C+">"},recursivelyCollect:function(D,E){D=$(D);var F=[];while(D=D[E]){if(D.nodeType==1){F.push(Element.extend(D))}}return F},ancestors:function(B){return $(B).recursivelyCollect("parentNode")},descendants:function(B){return $A($(B).getElementsByTagName("*")).each(Element.extend)},firstDescendant:function(B){B=$(B).firstChild;while(B&&B.nodeType!=1){B=B.nextSibling}return $(B)},immediateDescendants:function(B){if(!(B=$(B).firstChild)){return[]}while(B&&B.nodeType!=1){B=B.nextSibling}if(B){return[B].concat($(B).nextSiblings())}return[]},previousSiblings:function(B){return $(B).recursivelyCollect("previousSibling")},nextSiblings:function(B){return $(B).recursivelyCollect("nextSibling")},siblings:function(B){B=$(B);return B.previousSiblings().reverse().concat(B.nextSiblings())},match:function(D,C){if(typeof C=="string"){C=new Selector(C)}return C.match($(D))},up:function(H,F,E){H=$(H);if(arguments.length==1){return $(H.parentNode)}var G=H.ancestors();return F?Selector.findElement(G,F,E):G[E||0]},down:function(H,G,E){H=$(H);if(arguments.length==1){return H.firstDescendant()}var F=H.descendants();return G?Selector.findElement(F,G,E):F[E||0]},previous:function(H,F,E){H=$(H);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(H))}var G=H.previousSiblings();return F?Selector.findElement(G,F,E):G[E||0]},next:function(G,F,H){G=$(G);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(G))}var E=G.nextSiblings();return F?Selector.findElement(E,F,H):E[H||0]},getElementsBySelector:function(){var C=$A(arguments),D=$(C.shift());return Selector.findChildElements(D,C)},readAttribute:function(G,E){G=$(G);if(Prototype.Browser.IE){if(!G.attributes){return null}var H=Element._attributeTranslations;if(H.values[E]){return H.values[E](G,E)}if(H.names[E]){E=H.names[E]}var F=G.attributes[E];return F?F.nodeValue:null}return G.getAttribute(E)},getHeight:function(B){return $(B).getDimensions().height},getWidth:function(B){return $(B).getDimensions().width},classNames:function(B){return new Element.ClassNames(B)},hasClassName:function(D,F){if(!(D=$(D))){return }var E=D.className;if(E.length==0){return false}if(E==F||E.match(new RegExp("(^|\\s)"+F+"(\\s|$)"))){return true}return false},addClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C).add(D);return C},removeClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C).remove(D);return C},toggleClassName:function(C,D){if(!(C=$(C))){return }Element.classNames(C)[C.hasClassName(D)?"remove":"add"](D);return C},observe:function(){Event.observe.apply(Event,arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(F){F=$(F);var E=F.firstChild;while(E){var D=E.nextSibling;if(E.nodeType==3&&!/\S/.test(E.nodeValue)){F.removeChild(E)}E=D}return F},empty:function(B){return $(B).innerHTML.blank()},descendantOf:function(D,C){D=$(D),C=$(C);while(D=D.parentNode){if(D==C){return true}}return false},scrollTo:function(C){C=$(C);var D=Position.cumulativeOffset(C);window.scrollTo(D[0],D[1]);return C},getStyle:function(H,G){H=$(H);G=G=="float"?"cssFloat":G.camelize();var F=H.style[G];if(!F){var E=document.defaultView.getComputedStyle(H,null);F=E?E[G]:null}if(G=="opacity"){return F?parseFloat(F):1}return F=="auto"?null:F},getOpacity:function(B){return $(B).getStyle("opacity")},setStyle:function(F,I,J){F=$(F);var G=F.style;for(var H in I){if(H=="opacity"){F.setOpacity(I[H])}else{G[(H=="float"||H=="cssFloat")?(G.styleFloat===undefined?"cssFloat":"styleFloat"):(J?H:H.camelize())]=I[H]}}return F},setOpacity:function(C,D){C=$(C);C.style.opacity=(D==1||D==="")?"":(D<0.00001)?0:D;return C},getDimensions:function(O){O=$(O);var K=$(O).getStyle("display");if(K!="none"&&K!=null){return{width:O.offsetWidth,height:O.offsetHeight}}var P=O.style;var L=P.visibility;var N=P.position;var I=P.display;P.visibility="hidden";P.position="absolute";P.display="block";var J=O.clientWidth;var M=O.clientHeight;P.display=I;P.position=N;P.visibility=L;return{width:J,height:M}},makePositioned:function(C){C=$(C);var D=Element.getStyle(C,"position");if(D=="static"||!D){C._madePositioned=true;C.style.position="relative";if(window.opera){C.style.top=0;C.style.left=0}}return C},undoPositioned:function(B){B=$(B);if(B._madePositioned){B._madePositioned=undefined;B.style.position=B.style.top=B.style.left=B.style.bottom=B.style.right=""}return B},makeClipping:function(B){B=$(B);if(B._overflow){return B}B._overflow=B.style.overflow||"auto";if((Element.getStyle(B,"overflow")||"visible")!="hidden"){B.style.overflow="hidden"}return B},undoClipping:function(B){B=$(B);if(!B._overflow){return B}B.style.overflow=B._overflow=="auto"?"":B._overflow;B._overflow=null;return B}};Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(H,G){var K=[];var I=document.evaluate(H,$(G)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var L=0,J=I.snapshotLength;L<J;L++){K.push(I.snapshotItem(L))}return K}}if(!document.getElementsByClassName){if(Prototype.BrowserFeatures.XPath){document.getElementsByClassName=function(F,D){var E=".//*[contains(concat(' ', @class, ' '), ' "+F+" ')]";return document._getElementsByXPath(E,D)}}else{document.getElementsByClassName=function(P,N){var J=($(N)||document.body).getElementsByTagName("*");var M=[],L,Q=new RegExp("(^|\\s)"+P+"(\\s|$)");for(var R=0,K=J.length;R<K;R++){L=J[R];var O=L.className;if(O.length==0){continue}if(O==P||O.match(Q)){M.push(Element.extend(L))}}return M}}Object.extend(Element.Methods,{getElementsByClassName:function(C,D){return document.getElementsByClassName(D,C)}})}if(Prototype.Browser.Opera){Element.Methods._getStyle=Element.Methods.getStyle;Element.Methods.getStyle=function(C,D){switch(D){case"left":case"top":case"right":case"bottom":if(Element._getStyle(C,"position")=="static"){return null}default:return Element._getStyle(C,D)}}}else{if(Prototype.Browser.IE){Element.Methods.getStyle=function(D,F){D=$(D);F=(F=="float"||F=="cssFloat")?"styleFloat":F.camelize();var E=D.style[F];if(!E&&D.currentStyle){E=D.currentStyle[F]}if(F=="opacity"){if(E=(D.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(E[1]){return parseFloat(E[1])/100}}return 1}if(E=="auto"){if((F=="width"||F=="height")&&(D.getStyle("display")!="none")){return D["offset"+F.capitalize()]+"px"}return null}return E};Element.Methods.setOpacity=function(E,F){E=$(E);var G=E.getStyle("filter"),H=E.style;if(F==1||F===""){H.filter=G.replace(/alpha\([^\)]*\)/gi,"");return E}else{if(F<0.00001){F=0}}H.filter=G.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(F*100)+")";return E};Element.Methods.update=function(G,H){G=$(G);H=typeof H=="undefined"?"":H.toString();var E=G.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(E)){var F=document.createElement("div");switch(E){case"THEAD":case"TBODY":F.innerHTML="<table><tbody>"+H.stripScripts()+"</tbody></table>";depth=2;break;case"TR":F.innerHTML="<table><tbody><tr>"+H.stripScripts()+"</tr></tbody></table>";depth=3;break;case"TD":F.innerHTML="<table><tbody><tr><td>"+H.stripScripts()+"</td></tr></tbody></table>";depth=4}$A(G.childNodes).each(function(A){G.removeChild(A)});depth.times(function(){F=F.firstChild});$A(F.childNodes).each(function(A){G.appendChild(A)})}else{G.innerHTML=H.stripScripts()}setTimeout(function(){H.evalScripts()},10);return G}}else{if(Prototype.Browser.Gecko){Element.Methods.setOpacity=function(C,D){C=$(C);C.style.opacity=(D==1)?0.999999:(D==="")?"":(D<0.00001)?0:D;return C}}}}Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(C,D){return C.getAttribute(D,2)},_flag:function(C,D){return $(C).hasAttribute(D)?D:null},style:function(B){return B.style.cssText.toLowerCase()},title:function(C){var D=C.getAttributeNode("title");return D.specified?D.nodeValue:null}}};(function(){Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag})}).call(Element._attributeTranslations.values);Element.Methods.Simulated={hasAttribute:function(H,F){var E=Element._attributeTranslations,G;F=E.names[F]||F;G=$(H).getAttributeNode(F);return G&&G.specified}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div").__proto__;Prototype.BrowserFeatures.ElementExtensions=true}Element.hasAttribute=function(C,D){if(C.hasAttribute){return C.hasAttribute(D)}return Element.Methods.Simulated.hasAttribute(C,D)};Element.addMethods=function(K){var O=Prototype.BrowserFeatures,F=Element.Methods.ByTag;if(!K){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var L=K;K=arguments[1]}if(!L){Object.extend(Element.Methods,K||{})}else{if(L.constructor==Array){L.each(P)}else{P(L)}}function P(A){A=A.toUpperCase();if(!Element.Methods.ByTag[A]){Element.Methods.ByTag[A]={}}Object.extend(Element.Methods.ByTag[A],K)}function M(G,B,C){C=C||false;var A=Element.extend.cache;for(var D in G){var E=G[D];if(!C||!(D in B)){B[D]=A.findOrStore(E)}}}function R(A){var C;var B={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(B[A]){C="HTML"+B[A]+"Element"}if(window[C]){return window[C]}C="HTML"+A+"Element";if(window[C]){return window[C]}C="HTML"+A.capitalize()+"Element";if(window[C]){return window[C]}window[C]={};window[C].prototype=document.createElement(A).__proto__;return window[C]}if(O.ElementExtensions){M(Element.Methods,HTMLElement.prototype);M(Element.Methods.Simulated,HTMLElement.prototype,true)}if(O.SpecificElementExtensions){for(var N in Element.Methods.ByTag){var Q=R(N);if(typeof Q=="undefined"){continue}M(F[N],Q.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag};var Toggle={display:Element.toggle};Abstract.Insertion=function(B){this.adjacency=B};Abstract.Insertion.prototype={initialize:function(H,G){this.element=$(H);this.content=G.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(F){var E=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(E)){this.insertContent(this.contentFromAnonymousTable())}else{throw F}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){G.evalScripts()},10)},contentFromAnonymousTable:function(){var B=document.createElement("div");B.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(B.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(B){B.each((function(A){this.element.parentNode.insertBefore(A,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(B){B.reverse(false).each((function(A){this.element.insertBefore(A,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(B){B.each((function(A){this.element.appendChild(A)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(B){B.each((function(A){this.element.parentNode.insertBefore(A,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(B){this.element=$(B)},_each:function(B){this.element.className.split(/\s+/).select(function(A){return A.length>0})._each(B)},set:function(B){this.element.className=B},add:function(B){if(this.include(B)){return }this.set($A(this).concat(B).join(" "))},remove:function(B){if(!this.include(B)){return }this.set($A(this).without(B).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();Selector.prototype={initialize:function(B){this.expression=B.strip();this.compileMatcher()},compileMatcher:function(){if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){return this.compileXPathMatcher()}var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return }this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var I=this.expression,H=Selector.patterns,L=Selector.xpath,J,G;if(Selector._cache[I]){this.xpath=Selector._cache[I];return }this.matcher=[".//*"];while(I&&J!=I&&(/\S/).test(I)){J=I;for(var K in H){if(G=I.match(H[K])){this.matcher.push(typeof L[K]=="function"?L[K](G):new Template(L[K]).evaluate(G));I=I.replace(G[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(B){B=B||document;if(this.xpath){return document._getElementsByXPath(this.xpath,B)}return this.matcher(B)},match:function(B){return this.findElements(document).include(B)},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}};Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(B){if(B[1]=="*"){return""}return"[local-name()='"+B[1].toLowerCase()+"' or local-name()='"+B[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(B){B[3]=B[5]||B[6];return new Template(Selector.xpath.operators[B[2]]).evaluate(B)},pseudo:function(C){var D=Selector.xpath.pseudos[C[1]];if(!D){return""}if(typeof D==="function"){return D(C)}return new Template(Selector.xpath.pseudos[C[1]]).evaluate(C)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",checked:"[@checked]",disabled:"[@disabled]",enabled:"[not(@disabled)]",not:function(P){var J=P[6],K=Selector.patterns,I=Selector.xpath,M,P,O;var L=[];while(J&&M!=J&&(/\S/).test(J)){M=J;for(var N in K){if(P=J.match(K[N])){O=typeof I[N]=="function"?I[N](P):new Template(I[N]).evaluate(P);L.push("("+O.substring(1,O.length-1)+")");J=J.replace(P[0],"");break}}}return"[not("+L.join(" and ")+")]"},"nth-child":function(B){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",B)},"nth-last-child":function(B){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",B)},"nth-of-type":function(B){return Selector.xpath.pseudos.nth("position() ",B)},"nth-last-of-type":function(B){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",B)},"first-of-type":function(B){B[6]="1";return Selector.xpath.pseudos["nth-of-type"](B)},"last-of-type":function(B){B[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](B)},"only-of-type":function(C){var D=Selector.xpath.pseudos;return D["first-of-type"](C)+D["last-of-type"](C)},nth:function(K,M){var J,I=M[6],N;if(I=="even"){I="2n+0"}if(I=="odd"){I="2n+1"}if(J=I.match(/^(\d+)$/)){return"["+K+"= "+J[1]+"]"}if(J=I.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(J[1]=="-"){J[1]=-1}var L=J[1]?Number(J[1]):1;var H=J[2]?Number(J[2]):0;N="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(N).evaluate({fragment:K,a:L,b:H})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);   c = false;',className:'n = h.className(n, r, "#{1}", c); c = false;',id:'n = h.id(n, r, "#{1}", c);        c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}"); c = false;',attr:function(B){B[3]=(B[5]||B[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(B)},pseudo:function(B){if(B[6]){B[6]=B[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(B)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/},handlers:{concat:function(H,E){for(var G=0,F;F=E[G];G++){H.push(F)}return H},mark:function(D){for(var F=0,E;E=D[F];F++){E._counted=true}return D},unmark:function(D){for(var F=0,E;E=D[F];F++){E._counted=undefined}return D},index:function(G,J,H){G._counted=true;if(J){for(var L=G.childNodes,I=L.length-1,K=1;I>=0;I--){node=L[I];if(node.nodeType==1&&(!H||node._counted)){node.nodeIndex=K++}}}else{for(var I=0,K=1,L=G.childNodes;node=L[I];I++){if(node.nodeType==1&&(!H||node._counted)){node.nodeIndex=K++}}}},unique:function(J){if(J.length==0){return J}var H=[],G;for(var I=0,F=J.length;I<F;I++){if(!(G=J[I])._counted){G._counted=true;H.push(Element.extend(G))}}return Selector.handlers.unmark(H)},descendant:function(F){var H=Selector.handlers;for(var I=0,J=[],G;G=F[I];I++){H.concat(J,G.getElementsByTagName("*"))}return J},child:function(I){var L=Selector.handlers;for(var M=0,N=[],K;K=I[M];M++){for(var P=0,O=[],J;J=K.childNodes[P];P++){if(J.nodeType==1&&J.tagName!="!"){N.push(J)}}}return N},adjacent:function(F){for(var I=0,J=[],G;G=F[I];I++){var H=this.nextElementSibling(G);if(H){J.push(H)}}return J},laterSibling:function(F){var H=Selector.handlers;for(var I=0,J=[],G;G=F[I];I++){H.concat(J,Element.nextSiblings(G))}return J},nextElementSibling:function(B){while(B=B.nextSibling){if(B.nodeType==1){return B}}return null},previousElementSibling:function(B){while(B=B.previousSibling){if(B.nodeType==1){return B}}return null},tagName:function(P,I,M,J){M=M.toUpperCase();var N=[],L=Selector.handlers;if(P){if(J){if(J=="descendant"){for(var O=0,K;K=P[O];O++){L.concat(N,K.getElementsByTagName(M))}return N}else{P=this[J](P)}if(M=="*"){return P}}for(var O=0,K;K=P[O];O++){if(K.tagName.toUpperCase()==M){N.push(K)}}return N}else{return I.getElementsByTagName(M)}},id:function(P,I,J,L){var K=$(J),N=Selector.handlers;if(!P&&I==document){return K?[K]:[]}if(P){if(L){if(L=="child"){for(var O=0,M;M=P[O];O++){if(K.parentNode==M){return[K]}}}else{if(L=="descendant"){for(var O=0,M;M=P[O];O++){if(Element.descendantOf(K,M)){return[K]}}}else{if(L=="adjacent"){for(var O=0,M;M=P[O];O++){if(Selector.handlers.previousElementSibling(K)==M){return[K]}}}else{P=N[L](P)}}}}for(var O=0,M;M=P[O];O++){if(M==K){return[K]}}return[]}return(K&&Element.descendantOf(K,I))?[K]:[]},className:function(H,E,G,F){if(H&&F){H=this[F](H)}return Selector.handlers.byClassName(H,E,G)},byClassName:function(O,P,L){if(!O){O=Selector.handlers.descendant([P])}var J=" "+L+" ";for(var M=0,N=[],K,I;K=O[M];M++){I=K.className;if(I.length==0){continue}if(I==L||(" "+I+" ").include(J)){N.push(K)}}return N},attrPresence:function(K,L,G){var I=[];for(var J=0,H;H=K[J];J++){if(Element.hasAttribute(H,G)){I.push(H)}}return I},attr:function(N,Q,R,P,M){if(!N){N=Q.getElementsByTagName("*")}var O=Selector.operators[M],K=[];for(var T=0,L;L=N[T];T++){var S=Element.readAttribute(L,R);if(S===null){continue}if(O(S,P)){K.push(L)}}return K},pseudo:function(J,I,G,F,H){if(J&&H){J=this[H](J)}if(!J){J=F.getElementsByTagName("*")}return Selector.pseudos[I](J,G,F)}},pseudos:{"first-child":function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(Selector.handlers.previousElementSibling(I)){continue}K.push(I)}return K},"last-child":function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(Selector.handlers.nextElementSibling(I)){continue}K.push(I)}return K},"only-child":function(N,I,H){var K=Selector.handlers;for(var L=0,M=[],J;J=N[L];L++){if(!K.previousElementSibling(J)&&!K.nextElementSibling(J)){M.push(J)}}return M},"nth-child":function(F,E,D){return Selector.pseudos.nth(F,E,D)},"nth-last-child":function(F,E,D){return Selector.pseudos.nth(F,E,D,true)},"nth-of-type":function(F,E,D){return Selector.pseudos.nth(F,E,D,false,true)},"nth-last-of-type":function(F,E,D){return Selector.pseudos.nth(F,E,D,true,true)},"first-of-type":function(F,E,D){return Selector.pseudos.nth(F,"1",D,false,true)},"last-of-type":function(F,E,D){return Selector.pseudos.nth(F,"1",D,true,true)},"only-of-type":function(H,F,E){var G=Selector.pseudos;return G["last-of-type"](G["first-of-type"](H,F,E),F,E)},getIndices:function(F,D,E){if(F==0){return D>0?[D]:[]}return $R(1,E).inject([],function(B,A){if(0==(A-D)%F&&(A-D)/F>=0){B.push(A)}return B})},nth:function(T,Y,W,Z,R){if(T.length==0){return[]}if(Y=="even"){Y="2n+0"}if(Y=="odd"){Y="2n+1"}var a=Selector.handlers,b=[],S=[],g;a.mark(T);for(var c=0,Q;Q=T[c];c++){if(!Q.parentNode._counted){a.index(Q.parentNode,Z,R);S.push(Q.parentNode)}}if(Y.match(/^\d+$/)){Y=Number(Y);for(var c=0,Q;Q=T[c];c++){if(Q.nodeIndex==Y){b.push(Q)}}}else{if(g=Y.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(g[1]=="-"){g[1]=-1}var V=g[1]?Number(g[1]):1;var X=g[2]?Number(g[2]):0;var U=Selector.pseudos.getIndices(V,X,T.length);for(var c=0,Q,f=U.length;Q=T[c];c++){for(var d=0;d<f;d++){if(Q.nodeIndex==U[d]){b.push(Q)}}}}}a.unmark(T);a.unmark(S);return b},empty:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.tagName=="!"||(I.firstChild&&!I.innerHTML.match(/^\s*$/))){continue}K.push(I)}return K},not:function(N,K,P){var R=Selector.handlers,O,L;var Q=new Selector(K).findElements(P);R.mark(Q);for(var S=0,T=[],M;M=N[S];S++){if(!M._counted){T.push(M)}}R.unmark(Q);return T},enabled:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(!I.disabled){K.push(I)}}return K},disabled:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.disabled){K.push(I)}}return K},checked:function(L,H,G){for(var J=0,K=[],I;I=L[J];J++){if(I.checked){K.push(I)}}return K}},operators:{"=":function(D,C){return D==C},"!=":function(D,C){return D!=C},"^=":function(D,C){return D.startsWith(C)},"$=":function(D,C){return D.endsWith(C)},"*=":function(D,C){return D.include(C)},"~=":function(D,C){return(" "+D+" ").include(" "+C+" ")},"|=":function(D,C){return("-"+D.toUpperCase()+"-").include("-"+C.toUpperCase()+"-")}},matchElements:function(J,I){var K=new Selector(I).findElements(),L=Selector.handlers;L.mark(K);for(var M=0,N=[],H;H=J[M];M++){if(H._counted){N.push(H)}}L.unmark(K);return N},findElement:function(F,E,D){if(typeof E=="number"){D=E;E=false}return Selector.matchElements(F,E||"*")[D||0]},findChildElements:function(M,K){var J=K.join(","),K=[];J.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(A){K.push(A[1].strip())});var N=[],L=Selector.handlers;for(var O=0,P=K.length,I;O<P;O++){I=new Selector(K[O].strip());L.concat(N,I.findElements(M))}return(P>1)?L.unique(N):N}});function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(B){$(B).reset();return B},serializeElements:function(E,D){var F=E.inject({},function(H,B){if(!B.disabled&&B.name){var C=B.name,A=$(B).getValue();if(A!=null){if(C in H){if(H[C].constructor!=Array){H[C]=[H[C]]}H[C].push(A)}else{H[C]=A}}}return H});return D?F:Hash.toQueryString(F)}};Form.Methods={serialize:function(D,C){return Form.serializeElements(Form.getElements(D),C)},getElements:function(B){return $A($(B).getElementsByTagName("*")).inject([],function(D,A){if(Form.Element.Serializers[A.tagName.toLowerCase()]){D.push(Element.extend(A))}return D})},getInputs:function(K,O,N){K=$(K);var I=K.getElementsByTagName("input");if(!O&&!N){return $A(I).map(Element.extend)}for(var M=0,J=[],L=I.length;M<L;M++){var P=I[M];if((O&&P.type!=O)||(N&&P.name!=N)){continue}J.push(Element.extend(P))}return J},disable:function(B){B=$(B);Form.getElements(B).invoke("disable");return B},enable:function(B){B=$(B);Form.getElements(B).invoke("enable");return B},findFirstElement:function(B){return $(B).getElements().find(function(A){return A.type!="hidden"&&!A.disabled&&["input","select","textarea"].include(A.tagName.toLowerCase())})},focusFirstElement:function(B){B=$(B);B.findFirstElement().activate();return B},request:function(F,D){F=$(F),D=Object.clone(D||{});var E=D.parameters;D.parameters=F.serialize(true);if(E){if(typeof E=="string"){E=E.toQueryParams()}Object.extend(D.parameters,E)}if(F.hasAttribute("method")&&!D.method){D.method=F.method}return new Ajax.Request(F.readAttribute("action"),D)}};Form.Element={focus:function(B){$(B).focus();return B},select:function(B){$(B).select();return B}};Form.Element.Methods={serialize:function(D){D=$(D);if(!D.disabled&&D.name){var F=D.getValue();if(F!=undefined){var E={};E[D.name]=F;return Hash.toQueryString(E)}}return""},getValue:function(C){C=$(C);var D=C.tagName.toLowerCase();return Form.Element.Serializers[D](C)},clear:function(B){$(B).value="";return B},present:function(B){return $(B).value!=""},activate:function(C){C=$(C);try{C.focus();if(C.select&&(C.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(C.type))){C.select()}}catch(D){}return C},disable:function(B){B=$(B);B.blur();B.disabled=true;return B},enable:function(B){B=$(B);B.disabled=false;return B}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(B){switch(B.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(B);default:return Form.Element.Serializers.textarea(B)}},inputSelector:function(B){return B.checked?B.value:null},textarea:function(B){return B.value},select:function(B){return this[B.type=="select-one"?"selectOne":"selectMany"](B)},selectOne:function(D){var C=D.selectedIndex;return C>=0?this.optionValue(D.options[C]):null},selectMany:function(H){var F,G=H.length;if(!G){return null}for(var I=0,F=[];I<G;I++){var J=H.options[I];if(J.selected){F.push(this.optionValue(J))}}return F},optionValue:function(B){return Element.extend(B).hasAttribute("value")?B.value:B.text}};Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(D,F,E){this.frequency=F;this.element=$(D);this.callback=E;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var C=this.getValue();var D=("string"==typeof this.lastValue&&"string"==typeof C?this.lastValue!=C:String(this.lastValue)!=String(C));if(D){this.callback(this.element,C);this.lastValue=C}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(C,D){this.element=$(C);this.callback=D;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var B=this.getValue();if(this.lastValue!=B){this.callback(this.element,B);this.lastValue=B}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback.bind(this))},registerCallback:function(B){if(B.type){switch(B.type.toLowerCase()){case"checkbox":case"radio":Event.observe(B,"click",this.onElementEvent.bind(this));break;default:Event.observe(B,"change",this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(B){return $(B.target||B.srcElement)},isLeftClick:function(B){return(((B.which)&&(B.which==1))||((B.button)&&(B.button==1)))},pointerX:function(B){return B.pageX||(B.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(B){return B.pageY||(B.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(B){if(B.preventDefault){B.preventDefault();B.stopPropagation()}else{B.returnValue=false;B.cancelBubble=true}},findElement:function(E,F){var D=Event.element(E);while(D.parentNode&&(!D.tagName||(D.tagName.toUpperCase()!=F.toUpperCase()))){D=D.parentNode}return D},observers:false,_observeAndCache:function(F,G,H,E){if(!this.observers){this.observers=[]}if(F.addEventListener){this.observers.push([F,G,H,E]);F.addEventListener(G,H,E)}else{if(F.attachEvent){this.observers.push([F,G,H,E]);F.attachEvent("on"+G,H)}}},unloadCache:function(){if(!Event.observers){return }for(var C=0,D=Event.observers.length;C<D;C++){Event.stopObserving.apply(this,Event.observers[C]);Event.observers[C][0]=null}Event.observers=false},observe:function(F,G,H,E){F=$(F);E=E||false;if(G=="keypress"&&(Prototype.Browser.WebKit||F.attachEvent)){G="keydown"}Event._observeAndCache(F,G,H,E)},stopObserving:function(H,I,J,F){H=$(H);F=F||false;if(I=="keypress"&&(Prototype.Browser.WebKit||H.attachEvent)){I="keydown"}if(H.removeEventListener){H.removeEventListener(I,J,F)}else{if(H.detachEvent){try{H.detachEvent("on"+I,J)}catch(G){}}}}});if(Prototype.Browser.IE){Event.observe(window,"unload",Event.unloadCache,false)}var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(F){var D=0,E=0;do{D+=F.scrollTop||0;E+=F.scrollLeft||0;F=F.parentNode}while(F);return[E,D]},cumulativeOffset:function(F){var D=0,E=0;do{D+=F.offsetTop||0;E+=F.offsetLeft||0;F=F.offsetParent}while(F);return[E,D]},positionedOffset:function(H){var E=0,F=0;do{E+=H.offsetTop||0;F+=H.offsetLeft||0;H=H.offsetParent;if(H){if(H.tagName=="BODY"){break}var G=Element.getStyle(H,"position");if(G=="relative"||G=="absolute"){break}}}while(H);return[F,E]},offsetParent:function(B){if(B.offsetParent){return B.offsetParent}if(B==document.body){return B}while((B=B.parentNode)&&B!=document.body){if(Element.getStyle(B,"position")!="static"){return B}}return document.body},within:function(F,D,E){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(F,D,E)}this.xcomp=D;this.ycomp=E;this.offset=this.cumulativeOffset(F);return(E>=this.offset[1]&&E<this.offset[1]+F.offsetHeight&&D>=this.offset[0]&&D<this.offset[0]+F.offsetWidth)},withinIncludingScrolloffsets:function(H,E,F){var G=this.realOffset(H);this.xcomp=E+G[0]-this.deltaX;this.ycomp=F+G[1]-this.deltaY;this.offset=this.cumulativeOffset(H);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+H.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+H.offsetWidth)},overlap:function(D,C){if(!D){return 0}if(D=="vertical"){return((this.offset[1]+C.offsetHeight)-this.ycomp)/C.offsetHeight}if(D=="horizontal"){return((this.offset[0]+C.offsetWidth)-this.xcomp)/C.offsetWidth}},page:function(F){var E=0,G=0;var H=F;do{E+=H.offsetTop||0;G+=H.offsetLeft||0;if(H.offsetParent==document.body){if(Element.getStyle(H,"position")=="absolute"){break}}}while(H=H.offsetParent);H=F;do{if(!window.opera||H.tagName=="BODY"){E-=H.scrollTop||0;G-=H.scrollLeft||0}}while(H=H.parentNode);return[G,E]},clone:function(K,I){var G=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});K=$(K);var J=Position.page(K);I=$(I);var H=[0,0];var L=null;if(Element.getStyle(I,"position")=="absolute"){L=Position.offsetParent(I);H=Position.page(L)}if(L==document.body){H[0]-=document.body.offsetLeft;H[1]-=document.body.offsetTop}if(G.setLeft){I.style.left=(J[0]-H[0]+G.offsetLeft)+"px"}if(G.setTop){I.style.top=(J[1]-H[1]+G.offsetTop)+"px"}if(G.setWidth){I.style.width=K.offsetWidth+"px"}if(G.setHeight){I.style.height=K.offsetHeight+"px"}},absolutize:function(L){L=$(L);if(L.style.position=="absolute"){return }Position.prepare();var J=Position.positionedOffset(L);var H=J[1];var I=J[0];var K=L.clientWidth;var G=L.clientHeight;L._originalLeft=I-parseFloat(L.style.left||0);L._originalTop=H-parseFloat(L.style.top||0);L._originalWidth=L.style.width;L._originalHeight=L.style.height;L.style.position="absolute";L.style.top=H+"px";L.style.left=I+"px";L.style.width=K+"px";L.style.height=G+"px"},relativize:function(D){D=$(D);if(D.style.position=="relative"){return }Position.prepare();D.style.position="relative";var E=parseFloat(D.style.top||0)-(D._originalTop||0);var F=parseFloat(D.style.left||0)-(D._originalLeft||0);D.style.top=E+"px";D.style.left=F+"px";D.style.height=D._originalHeight;D.style.width=D._originalWidth}};if(Prototype.Browser.WebKit){Position.cumulativeOffset=function(F){var D=0,E=0;do{D+=F.offsetTop||0;E+=F.offsetLeft||0;if(F.offsetParent==document.body){if(Element.getStyle(F,"position")=="absolute"){break}}F=F.offsetParent}while(F);return[E,D]}}Element.addMethods();function $$(E,D,F){return Selector.findChildElements(D,[E])}var Builder={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(G){G=G.toUpperCase();var H=this.NODEMAP[G]||"div";var L=document.createElement(H);try{L.innerHTML="<"+G+"></"+G+">"}catch(I){}var J=L.firstChild||null;if(J&&(J.tagName.toUpperCase()!=G)){J=J.getElementsByTagName(G)[0]}if(!J){J=document.createElement(G)}if(!J){return }if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(J,arguments[1])}else{var K=this._attributes(arguments[1]);if(K.length){try{L.innerHTML="<"+G+" "+K+"></"+G+">"}catch(I){}J=L.firstChild||null;if(!J){J=document.createElement(G);for(attr in arguments[1]){J[attr=="class"?"className":attr]=arguments[1][attr]}}if(J.tagName.toUpperCase()!=G){J=L.getElementsByTagName(G)[0]}}}}if(arguments[2]){this._children(J,arguments[2])}return J},_text:function(B){return document.createTextNode(B)},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(C){var D=[];for(attribute in C){D.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+C[attribute].toString().escapeHTML()+'"')}return D.join(" ")},_children:function(D,C){if(C.tagName){D.appendChild(C);return }if(typeof C=="object"){C.flatten().each(function(A){if(typeof A=="object"){D.appendChild(A)}else{if(Builder._isStringOrNumber(A)){D.appendChild(Builder._text(A))}}})}else{if(Builder._isStringOrNumber(C)){D.appendChild(Builder._text(C))}}},_isStringOrNumber:function(B){return(typeof B=="string"||typeof B=="number")},build:function(D){var C=this.node("div");$(C).update(D.strip());return C.down()},dump:function(D){if(typeof D!="object"&&typeof D!="function"){D=window}var C=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);C.each(function(A){D[A]=function(){return Builder.node.apply(Builder,[A].concat($A(arguments)))}})}};Function.prototype.bind=function(){var D=this,E=$A(arguments),F=E.shift();return function(){if(typeof $A=="function"){return D.apply(F,E.concat($A(arguments)))}}};Function.prototype.bindAsEventListener=function(E){var D=this,F=$A(arguments),E=F.shift();return function(A){if(typeof $A=="function"){return D.apply(E,[A||window.event].concat(F))}}};Object.extend(Event,{onDOMReady:function(B){Ready.onIdReady("contentEnd",B)},onReady:function(B){Ready.onDOMReady(B)},onDone:function(B){Ready.onDOMDone(B)},onIdReady:function(D,C){Ready.onIdReady(D,C)},findElement:function(E,F){var D=Event.element(E);while(D.parentNode&&(!D.tagName||(D.tagName.toUpperCase()!=F.toUpperCase()))){D=D.parentNode}if(D&&D!=null){Element.extend(D)}return D},stopAllObserving:function(E,D){if(!Event.observers){return }E=$(E);for(var F=0;F<Event.observers.length;F++){if(Event.observers[F][0]==E){if((D==null)||(Event.observers[F][1]==D)){Event.stopObserving.apply(Event,Event.observers[F])}}}}});Element.Methods.readAttribute=function(G,E){G=$(G);if(IE){if(!G.attributes){return null}var F=G[E];if(typeof F!="undefined"&&F!=null){return F}var H=Element._attributeTranslations;if(H.values[E]){return H.values[E](G,E)}if(H.names[E]){E=H.names[E]}F=G.attributes[E];return F?F.nodeValue:null}return G.getAttribute(E)};Element.Methods.remove=function(C){C=$(C);if(IE){if(C&&C.tagName!="BODY"){var D=document.createElement("div");D.appendChild(C);D.innerHTML=""}}else{if(C&&C.parentNode&&C.tagName!="BODY"){C.parentNode.removeChild(C)}}return C};var GlobalResponder={loadingElement:$("globalLoading"),callInProgress:function(B){switch(B.readyState){case 1:case 2:case 3:return true;break;default:return false;break}},onCreate:function(B){GlobalResponder.beginWaiting();B.timeoutId=window.setTimeout(function(){if(GlobalResponder.callInProgress(B.transport)){GlobalResponder.endWaiting();B.transport.abort();if(B.options.onFailure){B.options.onFailure(B.transport,B.json)}}},B.options.timeout)},onComplete:function(B){GlobalResponder.endWaiting();if(B.timeoutId){window.clearTimeout(B.timeoutId)}},onException:function(D,C){GlobalResponder.endWaiting();if(D.timeoutId){window.clearTimeout(D.timeoutId)}if(C&&typeof C.message=="string"){if(C.message.indexOf("Component returned failure code: 0x80040111")!=0){if(debug){alert("Exception:"+C.message)}}}},beginWaiting:function(){var B=this._getLoadingElement();if(B){B.show()}},endWaiting:function(){var B=this._getLoadingElement();if(B){B.hide()}},_getLoadingElement:function(){if(this.loadingElement==null){this.loadingElement=$("globalLoading")}return this.loadingElement}};Ajax.Responders.register(GlobalResponder);Object.extend(Template.prototype,{initialize:function(C,D){C=C.toString();this.template=C;this.pattern=D||Template.Pattern},eval:function(B){return this.evaluate(B)}});var Fx={};Fx.Base=Class.create();Fx.Base.prototype={initialize:function(D,C){this.element=$(D);this.options=C||{};this.duration=(this.options.duration||1)*1000;this.fps=this.options.fps||24;this.steps=Math.floor(this.duration/this.fps);this.maxSteps=this.steps;this.timer=null;if(this.options.delay){FunctionExt.defer(this.start,this.options.delay*1000,this)}else{this.start()}},start:function(){this.setup(this);(this.options.onStart||Prototype.emptyFunction)(this);this.timer=setInterval(this.run.bind(this),this.fps)},run:function(){if(this.isFinished()){clearInterval(this.timer);this.end(this);return(this.options.onComplete||Prototype.emptyFunction)(this)}this.duration-=this.fps;this.steps--;var B=1-this.steps/this.maxSteps;this.loop(this,B);(this.options.onUpdate||Prototype.emptyFunction)(this,B)},isFinished:function(){return this.steps<=0},setup:function(B){},loop:function(C,D){this.update(C,D)},end:function(B){}};Fx.Slide=Class.create();Object.extend(Object.extend(Fx.Slide.prototype,Fx.Base.prototype),{setup:function(D){var C;if(this.options.dimensions){C=this.options.dimensions}else{C=this.element.getDimensions()}this.originalHeight=C.height;this.originalWidth=C.width;this.factor=1;this.slideType=D.options.slideType||"down";if(this.slideType=="down"){this.element.setStyle({height:"0px"}).show()}},update:function(K,H){var J=this.factor*H;var L=this.originalWidth*J;var G=this.originalHeight*J;var I={};if(K.options.scaleX){I.width=Math.round(L)+"px"}if(K.options.scaleY){I.height=Math.round(G)+"px"}this.element.setStyle(I)},end:function(B){if(this.slideType=="up"){this.element.hide()}if(B.options.callback){B.options.callback()}}});String.prototype.Trim=function(){return this.replace(/(^[\s　]*)|([\s　]*$)/g,"")};String.prototype.trim=String.prototype.Trim;String.prototype.Ltrim=function(){return this.replace(/(^[\s　]*)/g,"")};String.prototype.Rtrim=function(){return this.replace(/([\s　]*$)/g,"")};String.prototype.bytelength=function(){var B=this.match(/[^\x00-\xff]/ig);return this.length+(B==null?0:B.length)};String.prototype.Cut=function(){var G=arguments[0]*2;var F=this.bytelength();if(G>F){return this}var H=0,E=0;for(H=0;H<this.length;H++){if(this.charCodeAt(H)>255){E+=2}else{E++}if(E>G){break}}return this.substr(0,H)+"..."};String.prototype.cut=String.prototype.Cut;String.prototype.empty=function(){return this.trim().length==0};String.prototype.extract=function(){var L=arguments,J=this,K=L[0],I=L[1];var N=J.indexOf(K)+K.length;var M=J.indexOf(I);var H="";if(M>N){H=J.substr(N,M-N)}return H};String.prototype.formatWithWBR=function(){var Q=arguments,O=10;if(Q.length>0){var M=parseInt(Q[0],10);if(!isNaN(M)&&M>0){O=M}}var P=this,K=[],N=0,T=0,L;for(var S=1,R=P.length;S<R;S++){L=P.charAt(S);if(/\s/.test(L)){T=S}else{if((S-T)==O){K.push(P.substring(N,S));K.push("<wbr>");N=T=S}}}K.push(P.substr(N));return K.join("")};String.prototype.formatWithWBRAndEscapeHTML=function(){var Q=arguments,O=10;if(Q.length>0){var M=parseInt(Q[0],10);if(!isNaN(M)&&M>0){O=M}}var P=this,K=[],N=0,T=0,L;for(var S=1,R=P.length;S<R;S++){L=P.charAt(S);if(/\s/.test(L)){T=S}else{if((S-T)==O){K.push(P.substring(N,S).escapeHTML());K.push("<wbr>");N=T=S}}}K.push(P.substr(N).escapeHTML());return K.join("")};String.prototype.isNumber=function(){var F=this;if(F.length===0){return false}for(var D=0,E=F.length;D<E;D++){if(isNaN(parseInt(F.charAt(D),10))){return false}}return true};Date.prototype.toString=function(){var I=this;var G=I.getMonth();G=(G+1).toString().length==2?G+1:"0"+(G+1);var J=I.getDate();J=J.toString().length==2?J:"0"+J;var F=I.getHours();F=F.toString().length==2?F:"0"+F;var H=I.getMinutes();H=H.toString().length==2?H:"0"+H;return I.getFullYear()+"-"+G+"-"+J+" "+F+":"+H};Number.prototype.NaN0=function(){var B=this;return isNaN(B)?0:B};if(typeof debug!=="boolean"){debug=false}if(typeof version==="undefined"){version="1.0.js"}if(typeof cssVersion==="undefined"){cssVersion="1.0.css"}if(typeof mtimeCookieDomain==="undefined"){mtimeCookieDomain="mtime.com"}if(typeof siteType==="undefined"){siteType="mtime"}if(typeof enable08==="undefined"){enable08="true"}if(typeof crossDomainUpload==="undefined"){crossDomainUpload="http://upload.mtime.com/Upload.ashx"}if(typeof jsServer==="undefined"){jsServer=""}if(typeof cssServer==="undefined"){cssServer=""}if(typeof subJsServer==="undefined"){subJsServer=""}if(typeof siteUrl==="undefined"){siteUrl="http://www.mtime.com"}if(typeof siteMcUrl==="undefined"){siteMcUrl="http://my.mtime.com"}var Mtime={version:"0.1",emptyFunction:function(){},K:function(B){return B},RELATED_OBJ_TYPE_MOVIE:1,RELATED_OBJ_TYPE_PERSON:2,RELATED_OBJ_TYPE_MOVIE_IMAGE:11,RELATED_OBJ_TYPE_PERSON_IMAGE:21,RELATED_OBJ_TYPE_TOPIC:10,RELATED_OBJ_TYPE_GROUP:9,RELATED_OBJ_TYPE_USER:4,RELATED_OBJ_TYPE_PHOTO:5,RELATED_OBJ_TYPE_BLOG:6,RELATED_OBJ_TYPE_THEATER:33,RELATED_OBJ_TYPE_VIDEO:41,namespace:function(){var F=arguments,G=null,I,J,H;for(I=0;I<F.length;I=I+1){H=F[I].split(".");G=Mtime;for(J=(H[0]=="Mtime")?1:0;J<H.length;J=J+1){G[H[J]]=G[H[J]]||{};G=G[H[J]]}}return G},extend:function(D,E){for(var F in E){D[F]=E[F]}return D},extendIf:function(D,E){if(extend&&E){for(var F in E){if(typeof D[F]=="undefined"){D[F]=E[F]}}}return D},augmentObject:function(I,J){if(!J||!I){throw new Error("Absorb failed, verify dependencies.")}var G=arguments,K,H,L=G[2];if(L&&L!==true){for(K=2;K<G.length;K=K+1){I[G[K]]=J[G[K]]}}else{for(H in J){if(L||!(H in I)){I[H]=J[H]}}Mtime._IEEnumFix(I,J)}},merge:function(){var F={},H=arguments;for(var G=0,E=H.length;G<E;G=G+1){Mtime.augmentObject(F,H[G],true)}return F},isArray:function(B){if(B){return Mtime.isNumber(B.length)&&Mtime.isFunction(B.splice)}return false},isBoolean:function(B){return typeof B==="boolean"},isFunction:function(B){return typeof B==="function"},isNull:function(B){return B===null},isNumber:function(B){return typeof B==="number"&&isFinite(B)},isObject:function(B){return(B&&(typeof B==="object"||Mtime.isFunction(B)))||false},isString:function(B){return typeof B==="string"},isUndefined:function(B){return typeof B==="undefined"},isValue:function(B){return(Mtime.isObject(B)||Mtime.isString(B)||Mtime.isNumber(B)||Mtime.isBoolean(B))},isEmpty:function(D,C){return Mtime.isNull(D)||Mtime.isUndefined(D)||(!C?D==="":false)},later:function(O,L,N,J,R){O=O||0;L=L||{};var K=N,P=J,Q,M;if(Mtime.isString(N)){K=L[N]}if(!K){throw new TypeError("method undefined")}if(!Mtime.isArray(P)){P=[J]}Q=function(){K.apply(L,P)};M=(R)?setInterval(Q,O):setTimeout(Q,O);return{interval:R,cancel:function(){if(this.interval){clearInterval(M)}else{clearTimeout(M)}}}},log:function(E,D,F){alert(E)}};Mtime.namespace("Mtime.Component","Mtime.Control","Mtime.Page","Mtime.Utility");Mtime.browser=function(){var E={ie:0,opera:0,gecko:0,webkit:0};var F=navigator.userAgent,D;if((/KHTML/).test(F)){E.webkit=1}D=F.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){E.webkit=parseFloat(D[1])}if(!E.webkit){D=F.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){E.opera=parseFloat(D[1])}else{D=F.match(/MSIE\s([^;]*)/);if(D&&D[1]){E.ie=parseFloat(D[1])}else{D=F.match(/Gecko\/([^\s]*)/);if(D){E.gecko=1;D=F.match(/rv:([^\s\)]*)/);if(D&&D[1]){E.gecko=parseFloat(D[1])}}}}}return E}();if(Object.prototype.hasOwnProperty){Mtime.hasOwnProperty=function(C,D){return C&&C.hasOwnProperty(D)}}else{Mtime.hasOwnProperty=function(C,D){return !Mtime.isUndefined(C[D])&&C.constructor.prototype[D]!==C[D]}}var browser=Mtime.browser;if(browser.ie){var ADD=["toString","valueOf"];Mtime._IEEnumFix=function(I,J){for(var F=0;F<ADD.length;F=F+1){var G=ADD[F],H=J[G];if(Mtime.isFunction(H)&&H!=Object.prototype[G]){I[G]=H}}}}else{Mtime._IEEnumFix=Mtime.emptyFunction}if(browser.ie&&browser.ie<7){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}window.attachEvent("onunload",function(){var E=document.getElementsByTagName("OBJECT");for(var F=E.length-1;F>=0;F--){E[F].style.display="none";for(var D in E[F]){if(typeof E[F][D]=="function"){E[F][D]=Mtime.emptyFunction}}}})}Mtime.Utility.JSON={toObject:function(text){var o=null;if(typeof JSON==="object"&&typeof JSON.parse==="function"){try{o=JSON.parse(text)}catch(e){o=null}}if(o===null){if(browser.gecko){o=new Function("return "+text)()}else{o=eval("("+text+")")}}return o}};Mtime.loader=function(){var X={},Y=0,S=0,g=false,W=Mtime.browser;var a=function(B,E,A){var D=A||window,G=D.document,F=G.createElement(B);for(var C in E){if(E[C]&&Mtime.hasOwnProperty(E,C)){F.setAttribute(C,E[C])}}return F};var c=function(D,C,A){var B=A||"utf-8";return a("link",{id:"__core_"+(S++),type:"text/css",charset:B,rel:"stylesheet",href:D},C)};var U=function(D,C,A){var B=A||"utf-8";return a("script",{id:"__core_"+(S++),type:"text/javascript",charset:B,src:D},C)};var l=function(B,A){return{tId:B.tId,win:B.win,data:B.data,nodes:B.nodes,msg:A,purge:function(){h(this.tId)}}};var k=function(D,A){var C=X[A],B=(Mtime.isString(D))?C.win.document.getElementById(D):D;if(!B){T(A,"target node not found: "+D)}return B};var T=function(A,B){Mtime.log("get failure: "+B,"warn","Get");var D=X[A];if(D.onFailure){var C=D.scope||D.win;D.onFailure.call(C,l(D,B))}};var j=function(A){var D=X[A];D.finished=true;if(D.aborted){var B="transaction "+A+" was aborted";T(A,B);return }if(D.onSuccess){var C=D.scope||D.win;D.onSuccess.call(C,l(D))}};var V=function(A){Mtime.log("Timeout "+A,"info","get");var C=X[A];if(C.onTimeout){var B=C.context||C;C.onTimeout.call(B,l(C))}};var d=function(F,B){var G=X[F];if(G.timer){G.timer.cancel()}if(G.aborted){var D="transaction "+F+" was aborted";T(F,D);return }if(B){G.url.shift();if(G.varName){G.varName.shift()}}else{G.url=(Mtime.isString(G.url))?[G.url]:G.url;if(G.varName){G.varName=(Mtime.isString(G.varName))?[G.varName]:G.varName}}var J=G.win,K=J.document,A=K.getElementsByTagName("head")[0],E;if(G.url.length===0){if(G.type==="script"&&Mtime.browser.webkit&&Mtime.browser.webkit<420&&!G.finalpass&&!G.varName){var C=U(null,G.win,G.charset);C.innerHTML='Mtime.loader._finalize("'+F+'");';G.nodes.push(C);A.appendChild(C)}else{j(F)}return }var H=G.url[0];if(!H){G.url.shift();return d(F)}if(G.timeout){G.timer=Mtime.later(G.timeout,G,V,F)}if(G.type==="script"){E=U(H,J,G.charset)}else{E=c(H,J,G.charset)}f(G.type,E,F,H,J,G.url.length);G.nodes.push(E);if(G.insertBefore){var I=k(G.insertBefore,F);if(I){I.parentNode.insertBefore(E,I)}}else{A.appendChild(E)}if((Mtime.browser.webkit||Mtime.browser.gecko)&&G.type==="css"){d(F,H)}};var Z=function(){if(g){return }g=true;for(var B in X){var A=X[B];if(A.autopurge&&A.finished){h(A.tId);delete X[B]}}g=false};var h=function(F){var A=X[F];if(A){var G=A.nodes,E=G.length,H=A.win.document,B=H.getElementsByTagName("head")[0];if(A.insertBefore){var C=k(A.insertBefore,F);if(C){B=C.parentNode}}for(var D=0;D<E;D=D+1){B.removeChild(G[D])}A.nodes=[]}};var b=function(D,E,C){var A="q"+(Y++);C=C||{};if(Y%Mtime.loader.PURGE_THRESH===0){Z()}X[A]=Mtime.merge(C,{tId:A,type:D,url:E,finished:false,aborted:false,nodes:[]});var B=X[A];B.win=B.win||window;B.scope=B.scope||B.win;B.autopurge=("autopurge" in B)?B.autopurge:(D==="script")?true:false;Mtime.later(0,B,d,A);return{tId:A}};var f=function(I,D,E,G,C,B,J){var A=J||d;if(W.ie){D.onreadystatechange=function(){var K=this.readyState;if("loaded"===K||"complete"===K){D.onreadystatechange=null;A(E,G)}}}else{if(Mtime.browser.webkit){if(I==="script"){if(Mtime.browser.webkit>=420){D.addEventListener("load",function(){A(E,G)})}else{var H=X[E];if(H.varName){var F=Mtime.loader.POLL_FREQ;H.maxattempts=YAHOO.util.Get.TIMEOUT/F;H.attempts=0;H._cache=H.varName[0].split(".");H.timer=Mtime.later(F,H,function(K){var N=this._cache,O=N.length,P=this.win,M;for(M=0;M<O;M=M+1){P=P[N[M]];if(!P){this.attempts++;if(this.attempts++>this.maxattempts){var L="Over retry limit, giving up";H.timer.cancel();T(E,L)}else{Mtime.log(N[M]+" failed, retrying")}return }}H.timer.cancel();A(E,G)},null,true)}else{Mtime.later(Mtime.loader.POLL_FREQ,null,A,[E,G])}}}}else{D.onload=function(){A(E,G)}}}};return{POLL_FREQ:20,PURGE_THRESH:30,TIMEOUT:30000,_finalize:function(A){Mtime.later(0,null,j,A)},abort:function(B){var A=(Mtime.isString(B))?B:B.tId;var C=X[A];if(C){C.aborted=true}},script:function(B,A){return b("script",B,A)},css:function(B,A){return b("css",B,A)}}}();$get=function(C,D){$defer(function(B,A){return Mtime.loader.script(B,{onSuccess:A})},this,[C,D])};$loadJs=function(F,E,D){$defer(function(B,A,K){K=K||0;if(!K){if(Mtime.isString(B)){B=B.indexOf("http")!==0?jsServer+B:B}else{if(Mtime.isArray(B)&&B.length>0){var M=[],C="";for(var N=0,L=B.length;N<L;N++){C=B[N];M.push(C.indexOf("http")!==0?(jsServer+C):C)}B=M}}}return Mtime.loader.script(B,{onSuccess:A,onFailure:function(){return Mtime.loader.script(B,{onSuccess:A})},onTimeout:function(){return Mtime.loader.script(B,{onSuccess:A})}})},this,[F,E,D])};$loadSubJs=function(F,E,D){$defer(function(B,A,K){K=K||0;if(!K){if(Mtime.isString(B)){B=B.indexOf("http")!==0?subJsServer+B:B}else{if(Mtime.isArray(B)&&B.length>0){var M=[],C="";for(var N=0,L=B.length;N<L;N++){C=B[N];M.push(C.indexOf("http")!==0?(subJsServer+C):C)}B=M}}}return Mtime.loader.script(B,{onSuccess:A})},this,[F,E,D])};$loadCss=function(C,D){$defer(function(B,A){B=B.indexOf("http")!==0?cssServer+B:B;return Mtime.loader.css(B,{onSuccess:A,onFailure:function(){return Mtime.loader.css(B,{onSuccess:A,onFailure:A,onTimeout:A})},onTimeout:function(){return Mtime.loader.css(B,{onSuccess:A,onFailure:A,onTimeout:A})}})},this,[C,D])};Mtime.Component.Ajax={MAX_REREQUEST_COUNT:2,_requestKeys:[],_requestErrorCounts:[],requestQueue:[],get:function(P,M,N,K,O,I,J,L){this.request(siteUrl,P,M,N,K,O,I,J,L)},request:function(T,P,M,Q,N,L,K,O,S){var R=new StringBuilder();if(L.indexOf("Ajax_CallBack=true")<0){R.append("Ajax_CallBack=true&")}R.append("Ajax_CallBackType=");R.append(P);R.append("&Ajax_CallBackMethod=");R.append(M);R.append(this.toQueryString(Q));L=L.indexOf("http")!==0?T+L:L;if(L.indexOf("?")>0){L+="&"+R.toString()}else{L+="?"+R.toString()}$get(L,N)},callBack:function(S,O,U,P,N,Z,R,X){var W=null;if(this.isValid(X)){W=this.addOverlay(X)}R=R||20000;var Y=true;if(!P||P==null){Y=false}if(Y){var Q={serverType:S,serverMethod:O,clientCallBack:P,args:U,url:N,submitButton:X,overlay:W};if(this.inQueue(Q)){return }this.requestQueue.push(Q)}var T=encodeURIComponent(location.href);var V=new StringBuilder();if(N.indexOf("Ajax_CallBack=true")<0){V.append("Ajax_CallBack=true&")}V.append("Ajax_CallBackType=");V.append(S);V.append("&Ajax_CallBackMethod=");V.append(O);V.append("&Ajax_RequestUrl=");V.append(T);V.append(this.toQueryString(U));Z=Z||"post";new Ajax.Request(N,{parameters:V.toString(),requestObj:Q,method:Z,timeout:R,onComplete:this.onComplete.bind(this)})},SERVICE_URL:"/callbackServices.m?Ajax_CallBack=true",callBack08:function(U,d,W,P,Z,c,T,Q,a){var Y=null;if(this.isValid(a)){Y=this.addOverlay(a)}T=T||20000;var b=true;if(!P||P==null){b=false}if(b){var S={serverType:U,serverMethod:d,clientCallBack:P,args:W,url:Z,submitButton:a,overlay:Y};if(this.inQueue(S)){return }this.requestQueue.push(S)}Q=(typeof Q==="undefined"||Q.length===0)?"":("&"+Q);var V=encodeURIComponent(location.href);var X=new StringBuilder();X.append("Ajax_CallBackType=");X.append(U);X.append("&Ajax_CallBackMethod=");X.append(d);X.append("&Ajax_RequestUrl=");X.append(V);X.append("&Ajax_Command=");X.append(Z);X.append(this.toQueryString(W));c=c||"post";var R=this.SERVICE_URL+Q;new Ajax.Request(R,{parameters:X.toString(),requestObj:S,method:c,timeout:T,onComplete:this.onComplete.bind(this)})},toQueryString:function(F){var G="";if(F){var I=[];for(var J=0,H=F.length;J<H;J++){I.push("&Ajax_CallBackArgument");I.push(J);I.push("=");I.push(encodeURIComponent(F[J]))}G=I.join("")}return G},inQueue:function(G){if(this.requestQueue.length>0){var H=this.requestQueue,I=null;for(var F=0,J=H.length;F<J;F++){I=H[F];if(I==G){return true}else{if(this.equal(I,G)){return true}}}return false}},dequeue:function(H){if(this.requestQueue.length>0){var I=this.requestQueue,J=null,G=-1;for(var L=0,K=I.length;L<K;L++){J=I[L];if(J==H){G=L;break}else{if(this.equal(J,H)){G=L;break}}}if(G>=0){I.splice(G,1)}}},equal:function(C,D){if(C.url==D.url&&C.serverType==D.serverType&&C.serverMethod==D.serverMethod&&C.args==D.args){return true}return false},onComplete:function(H,J,L){if(!Mtime.isEmpty(H.responseText)){var G=Mtime.Utility.JSON.toObject(H.responseText);var I=L.requestObj;this.dequeue(I);FunctionExt.defer(I.clientCallBack,1,null,[G]);I.clientCallBack=null;delete I.clientCallBack;var K=I.submitButton;if(this.isValid(K)&&I.overlay){this.removeOverlay(K,I.overlay)}I.overlay=null;I=null;delete I;L.requestObj=null;delete L.requestObj}},isValid:function(B){if(!Mtime.isUndefined(B)&&!Mtime.isNull(B)&&!Mtime.isString(B)){return true}return false},addOverlay:function(H){if(typeof H==="undefined"||H===null){return }var G=new Date().getTime();var I="submitOverlay_"+G;var F=H.parentNode;var J=Element.extend(document.createElement("div"));J.id=I;J.className="submiting";$("contentEnd").appendChild(J);Position.clone(H,J);return J},removeOverlay:function(D,C){if(typeof D==="undefined"||D===null){return }if(C){FunctionExt.defer(function(A,B){$("contentEnd").removeChild(B)},1000,this,[D,C])}}};Mtime.Component.Statistic=Class.create();Mtime.Component.Statistic.Service={Log:function(E,G,F,H){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","Log",[E,G,F],H,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetUnreadMessages:function(B){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetUnreadMessages",[],B,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetImageCounts:function(D,C){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetImageCounts",[D],C,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetUserPhotoCounts:function(D,C){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetUserPhotoCounts",[D],C,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetBlogCategoryCounts:function(F,E,D){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetBlogCategoryCounts",[F,E],D,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetBlogCommentCount:function(D,C){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetBlogCommentCount",[D],C,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")},GetBlogs:function(D,C){return Mtime.Component.Ajax.callBack("Mtime.Community.Controls.CommunityPages.StatisticService","GetBlogs",[D],C,"/Utility/StatisticService.m?Ajax_CallBack=true","get","20000")}};Mtime.Component.Statistic.prototype={initialize:function(){this.relatedObjTypes=[];this.relatedIds=[]},viewTheater:function(B){this.add(Mtime.RELATED_OBJ_TYPE_THEATER,B)},viewMovie:function(B){this.add(Mtime.RELATED_OBJ_TYPE_MOVIE,B)},viewPerson:function(B){this.add(Mtime.RELATED_OBJ_TYPE_PERSON,B)},viewMovieImage:function(B){this.add(Mtime.RELATED_OBJ_TYPE_MOVIE_IMAGE,B)},viewPersonImage:function(B){this.add(Mtime.RELATED_OBJ_TYPE_PERSON_IMAGE,B)},viewGroup:function(B){this.add(Mtime.RELATED_OBJ_TYPE_GROUP,B)},viewUser:function(B){this.add(Mtime.RELATED_OBJ_TYPE_USER,B)},viewPhoto:function(B){this.add(Mtime.RELATED_OBJ_TYPE_PHOTO,B)},viewBlog:function(B){this.add(Mtime.RELATED_OBJ_TYPE_BLOG,B)},viewBlogs:function(B){this.addRange(Mtime.RELATED_OBJ_TYPE_BLOG,B)},viewVideo:function(B){this.add(Mtime.RELATED_OBJ_TYPE_VIDEO,B)},add:function(C,D){this.relatedObjTypes.push(C);this.relatedIds.push(D);this.log()},addRange:function(F,I){var G=I.split("|");if(G.length>0){for(var J=0,H=G.length;J<H;J++){if(G[J].length>0){this.relatedObjTypes.push(F);this.relatedIds.push(G[J])}}this.log()}},isLogged:false,log:function(){var G=this.relatedIds;var J=this.relatedObjTypes;if(typeof (G)!="undefined"&&G&&G.length>0){var I="";if(typeof (requestUserId)!="undefined"){I=requestUserId}var F=this.relatedObjTypes.join("|");var H=this.relatedIds.join("|");Mtime.Component.Statistic.Service.Log(F,H,I,function(){}.bind(this));this.relatedObjTypes.clear();this.relatedIds.clear()}},getPeriodicalUnreadMessages:function(J){var P=false;if(typeof topMenu!=="undefined"&&topMenu.isLogin){P=true;var I=getCookie("unReadMsg");var L=getCookie("getUnReadMsgTime");if(I&&L){try{L=new Date(L)}catch(M){L=new Date()}var N=new Date()-L;if(N>0&&N<180*1000){P=false;var K=I.split("|");if(K.length===5){var O={receiveCount:K[0],promptCount:K[1],noticeCount:K[2],allCount:K[3],unreadCount:K[4]};topMenu.setMessageCount(O)}}}if(P){Mtime.Component.Statistic.Service.GetUnreadMessages(function(C){if(C&&typeof (C.value)!="undefined"&&C.value!=null){var A=C.value;var B={receiveCount:A.receiveCount,promptCount:A.promptCount,noticeCount:A.noticeCount,allCount:A.allCount,unreadCount:A.receiveCount+A.promptCount+A.noticeCount};topMenu.setMessageCount(B);setCookie("unReadMsg",B.receiveCount+"|"+B.promptCount+"|"+B.noticeCount+"|"+B.allCount+"|"+B.unreadCount);setCookie("getUnReadMsgTime",new Date().toUTCString())}})}}},getUnreadMessages:function(B){if(typeof topMenu!=="undefined"&&topMenu.isLogin){Mtime.Component.Statistic.Service.GetUnreadMessages(function(F){if(F&&typeof (F.value)!="undefined"&&F.value!=null){var A=F.value;var E={receiveCount:A.receiveCount,promptCount:A.promptCount,noticeCount:A.noticeCount,allCount:A.allCount,unreadCount:A.receiveCount+A.promptCount+A.noticeCount};topMenu.setMessageCount(E);setCookie("unReadMsg",E.receiveCount+"|"+E.promptCount+"|"+E.noticeCount+"|"+E.allCount+"|"+E.unreadCount);setCookie("getUnReadMsgTime",new Date().toUTCString())}})}},onGetUnreadMessagesCallback:function(D){if(D.value!==null){var C=parseInt(D.value);if(typeof (mf_chageMessageImage)!=="undefined"){mf_chageMessageImage(C)}}}};var FunctionExt=Mtime.Component.FunctionExt;FunctionExt={createCallback:function(F){var D=arguments;var E=F;return function(){return E.apply(window,D)}},createDelegate:function(H,I,J,F){var G=H;return function(){var A=J||arguments;if(F===true){A=Array.prototype.slice.call(arguments,0);A=A.concat(J)}else{if(typeof F=="number"){A=Array.prototype.slice.call(arguments,0);var B=[F,0].concat(J);Array.prototype.splice.apply(A,B)}}return G.apply(I||window,A)}},defer:function(H,K,I,L,G){var J=this.createDelegate(H,I,L,G);if(K){return setTimeout(J,K)}J();return 0}};var Ready=Mtime.Component.Ready;Ready={timePassed:0,lastTimerInterval:0,finalTimeout:20,timerInterval:1000,intervalId:0,isDOMDone:0,isDOMReady:0,runReadyCallbacking:0,onFunctionReadyCallbacks:{},onDOMReadyCallbacks:[],onDOMDoneCallbacks:[],onIdReadyCallbacks:{},isRun:0,onFunctionReady:function(F,E){if(!Ready._checkFunctionReady(F)){var D=Ready.onFunctionReadyCallbacks[F];if(!D){D=[]}D.push(E);Ready.onFunctionReadyCallbacks[F]=D;Ready.start()}else{$defer(E)}},onDOMReady:function(B){if(Ready._checkDOMReady()){$defer(B)}else{Ready.onDOMReadyCallbacks.push(B);Ready.start()}},onDOMDone:function(B){if(Ready._checkDOMDone()){$defer(B)}else{Ready.onDOMDoneCallbacks.push(B);Ready.start()}},onIdReady:function(F,G){if(Ready._checkDOMReady()){var E=document.getElementById(F);if(E){$defer(G,this,[$(E)]);return }}var H=Ready.onIdReadyCallbacks[F];if(!H){H=[]}H.push(G);Ready.onIdReadyCallbacks[F]=H;Ready.start()},runFunctionCallbacks:function(){var E=true;for(var F in Ready.onFunctionReadyCallbacks){if(Ready.onFunctionReadyCallbacks.hasOwnProperty(F)){if(Ready._checkFunctionReady(F)){var G=Ready.onFunctionReadyCallbacks[F];for(var H=0;H<G.length;H++){$defer(G[H])}delete Ready.onFunctionReadyCallbacks[F];delete G}else{if(E){E=false}}}}return E},runDOMReadyCallbacks:function(){for(var B=0;B<Ready.onDOMReadyCallbacks.length;B++){$defer(Ready.onDOMReadyCallbacks[B])}Ready.onDOMReadyCallbacks=[]},runDOMDoneCallbacks:function(){for(var B=0;B<Ready.onDOMDoneCallbacks.length;B++){$defer(Ready.onDOMDoneCallbacks[B])}Ready.onDOMDoneCallbacks=[]},runIdCallbacks:function(){var H=true;for(var G in Ready.onIdReadyCallbacks){if(Ready.onIdReadyCallbacks.hasOwnProperty(G)){var J=document.getElementById(G);if(typeof J!="undefined"&&J!=null){var I=Ready.onIdReadyCallbacks[G];for(var F=0;F<I.length;F++){$defer(I[F],this,[$(J)])}delete Ready.onIdReadyCallbacks[G];delete I}else{if(H){H=false}}}}return H},runReadyCallbacks:function(){if(Ready.runReadyCallbacking){return }Ready.runReadyCallbacking=1;var E=true;if(Ready._checkDOMReady()){Ready.runDOMReadyCallbacks();var F=Ready.runIdCallbacks();if(!F){E=false}}else{E=false}if(Ready._checkDOMDone()){Ready.runDOMDoneCallbacks()}else{E=false}var D=Ready.runFunctionCallbacks();if(!D){E=false}if(E){Ready.stop()}else{Ready.timePassed+=Ready.lastTimerInterval;if((Ready.timePassed/Ready.timerInterval)>=Ready.finalTimeout){Ready.stop()}}Ready.runReadyCallbacking=0},start:function(){if(!Ready.isRun){if(debug){alert("请尽量避免,Ready.start")}Ready.isRun=1;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){Ready.isDOMDone=1},false)}Ready.lastTimerInterval=Ready.timerInterval;Ready.intervalId=setInterval(Ready.runReadyCallbacks,Ready.timerInterval)}},stop:function(){if(Ready.isRun){Ready.isRun=0;Ready.isDOMReady=0;Ready.isDOMDone=0;Ready.onDOMReadyCallbacks=[];Ready.onDOMDoneCallbacks=[];Ready.onIdReadyCallbacks={};Ready.timePassed=0;Ready.onFunctionReadyCallbacks={};if(Ready.intervalId){clearInterval(Ready.intervalId);Ready.intervalId=null}}},reset:function(){Ready.stop();Ready.start()},runCallbacks:function(){Ready.runReadyCallbacks()},_checkFunctionReady:function(J){var G=Ready._checkObjectReady;if(J.indexOf(",")<=0){return G(J)}else{var H=J.split(",");for(var L=0,K=H.length;L<K;L++){var I=H[L];if(!G(I)){return false}}return true}},_checkObjectReady:function(B){B=B.trim();if(typeof (this[B])!=="undefined"&&this[B]!==null){return true}return false},_checkDOMReady:function(){if(Ready.isDOMReady){return Ready.isDOMReady}if(typeof document.getElementsByTagName!=="undefined"&&typeof document.getElementById!=="undefined"&&(document.getElementsByTagName("body")[0]!==null||document.body!==null)){Ready.isDOMReady=1}return Ready.isDOMReady},_checkDOMDone:function(){if(document.readyState&&document.readyState==="complete"){return 1}return Ready.isDOMDone}};function $FuncReady(C,D){Ready.onFunctionReady(C,D)}function $DOMReady(B){Ready.onDOMReady(B)}function $IdReady(D,C){Ready.onIdReady(D,C)}$onId=$IdReady;$onDOM=$DOMReady;$onFunc=$FuncReady;function $visible(B){B=$(B);return !B.hasClassName("none")&&B.visible()}function $hide(B){B=$(B);B.addClassName("none");B.hide()}function $show(B){B=$(B);B.removeClassName("none");B.show()}function $defer(G,H,J,F){try{return FunctionExt.defer(G,0.1,H,J,F)}catch(I){alert(I)}}function $Redirect(K){if(IE){var L=["object","embed","applet"],J,G;for(J=0;J<L.length;J++){var I=document.getElementsByTagName(L[J]);for(G=0;G<I.length;G++){try{$(I[G]).innerHTML=""}catch(H){}}}}location.href=K}var $redirect=$Redirect;var port=window.location.port;var AppPath=window.location.protocol+"//"+window.location.host;var Globals={SiteUrl:"http://test.com",UrlParamsCacheKey:"Global-UrlParamsCacheKey",getSiteUrl:function(B){alert("不要在客户端拼装URL");return this.SiteUrl+B},isDefined:function(B){return typeof (B)!="undefined"&&B!=null},isNullOrEmpty:function(B){if(!this.isDefined(B)){return true}if(this.isDefined(B.length)&&B.length==0){return true}if(B.toString()=="null"){return true}return false},getParam:function(C){var D=this._getParams();if(!this.isDefined(D)){return""}return D[C]},_getParams:function(){var H={};var I=document.location.search.substr(1).split("&");if(Globals.isNullOrEmpty(I)){return null}for(var G=0,L=I.length;G<L;G++){try{var J=I[G].split("=");if(J.length<2){continue}H[J[0]]=J[1].Trim()}catch(K){}}return H},copyToClipboard:function(J){if(window.clipboardData){window.clipboardData.setData("Text",J)}else{if(Opera){window.location=J}else{if(Prototype.Browser.WebKit){var O=document.createElement("input");O.type="text";O.value=J;document.body.appendChild(O);O.select();document.execCommand("copy",false,null);document.body.removeChild(O);O=null}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(Q){alert("你的firefox安全限制限制您进行剪贴板操作，请在地址栏输入: about:config 将signed.applets.codebase_principal_support设置为true之后重试");return false}var K=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!K){return false}var N=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!N){return false}N.addDataFlavor("text/unicode");var R={};var P=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var L=J;P.data=L;N.setTransferData("text/unicode",P,L.length*2);var M=Components.interfaces.nsIClipboard;if(!K){return false}K.setData(N,null,M.kGlobalClipboard)}}}}return true},hideSelect:function(){if(IE){var F=document.getElementsByTagName("SELECT");for(var D=0,E=F.length;D<E;D++){F[D].style.visibility="hidden"}}},showSelect:function(){if(IE){var F=document.getElementsByTagName("SELECT");for(var D=0,E=F.length;D<E;D++){F[D].style.visibility="visible"}}}};var IE=document.all?true:false;var _ieVersion=navigator.appVersion.match(/MSIE (.\..)/);var IE6=IE&&(_ieVersion&&_ieVersion[1]==6);var FireFox=document.getElementById&&!document.all;var Safari=/webkit/.test(navigator.userAgent.toLowerCase());var Opera=navigator.userAgent.indexOf("Opera")!=-1?true:false;var disappearDelay=500;function getCookie(G){var H=""+document.cookie;var F=H.indexOf(G);if(H==""||F==-1){return""}var E=H.indexOf(";",F);if(E==-1){E=H.length}return unescape(H.substring(F+G.length+1,E))}function setCookie(D,C){setCookieForever(D,C)}function setCookieForever(D,C){document.cookie=D+"="+escape(C)+";path=/;expires=Fri, 1 Jan 2050 00:00:00 GMT;domain="+mtimeCookieDomain+";"}function setCookieTerminable(H,J,I){var L=new Date();var K=new Date(L.toDateString());var G=new Date();if(I==null||I==0){I=1}G.setTime(K.getTime()+3600*1000*24*I);document.cookie=H+"="+escape(J)+";path=/;expires="+G.toUTCString()+";domain="+mtimeCookieDomain+";"}function Random(B){return Math.floor(Math.random()*100000)%B}function showHTMLContent(P,N,L){if(typeof N=="undefined"||N==null){N=400}if(typeof L=="undefined"||L==null){L=true}var S=$(P);if(!IE6){if(S.offsetWidth){var Q=parseInt(S.offsetWidth,10);N=Q-30}}var R=S.getElementsByTagName("img");if(R&&R.length>0){R=$(R);for(var V=0,U=R.length;V<U;V++){var M=$(R[V]);if(M){M.observe("load",function(){if(M.width>N){M.height=N*M.height/M.width;M.width=N}});M.observe("error",function(){if(!M._error){M._error=true;M.onerror=null;M.src=M.src}});M.src=M.src;if(M.width>N){M.height=N*M.height/M.width;M.width=N}}}}if(L){var O=S.getElementsByTagName("embed");if(O&&O.length>0){O=$(O);for(var V=0,U=O.length;V<U;V++){var T=$(O[V]);T.setAttribute("autostart",0)}}}}function $Name(B){return $A(document.getElementsByName(B))}function $SelectOne(E){var F=document.getElementsByName(E);if(F&&F.length){for(var H=0,G=F.length;H<G;H++){if(F[H].checked){return $(F[H])}}}return null}function $Value(G){var L=[];var H=$Name(G);if(H&&H.length>0){for(var K=0,J=H.length;K<J;K++){var I=H[K].value;if(I.length>0){L[K]=I}}}return L}var Utility={};Utility.Dom={nextElement:function(B){B=$(B);while(B=B.nextSibling){if(B.nodeType==1){return $(B)}}return null},previousElement:function(B){B=$(B);while(B=B.previousSibling){if(B.nodeType==1){return $(B)}}return null},remove:function(B){return $(B).parentNode.removeChild(B)},insertAfter:function(C,D){return $(C).previousSibling.inserBefore(D)},replaceElement:function(C,D){$(C).parentNode.replaceChild(D,C);return D},setSelectedValue:function(G,J,L){L=$(L);var H=document.getElementsByName(G);for(var K=0,I=H.length;K<I;K++){if(H[K].value==J){if(L){if(H[K].parentNode==L){H[K].checked=true}}else{H[K].checked=true}}else{H[K].checked=false}}},getSelectedValues:function(F,G){var I=[];var J=$Name(F);if(Globals.isNullOrEmpty(J)){return I}G=G||J.length;var H=0;J.each(function(A){if(A.checked){if(H<G){I[H++]=A.value}}});if(G==1){if(I.length==1){return I[0]}else{return 0}}return I},collapse:function(M,L,N,O,J,P){var K=$(M);var I=$(L);if(!K||!I){return }N=N||"/images/m_down.gif";O=O||"/images/m_up.gif";J=J||"收起";P=P||"展开";if(!K.visible()){K.show();if(I){I.src=O;I.title=P}}else{K.hide();if(I){I.src=N;I.title=J}}},getInt:function(B){return parseInt(B.replace(/[^ \d.-]/g,""))}};function collapseOfFrontWeb(C,D){Utility.Dom.collapse(C,D,"/images/i-down.gif","/images/i-up.gif","展开","隐藏")}String.Format=function(){var I=arguments,G=I.length;if(G==0){return""}if(G==1){return I[0]}var H=/{(\d+)?}/g,J,F;if(I[1] instanceof Array){J=I[1];F=I[0].replace(H,function(A,B){return J[parseInt(B)]})}else{J=I;F=I[0].replace(H,function(A,B){return J[parseInt(B)+1]})}return F};String.format=String.Format;function StringBuilder(){this.strings=[]}StringBuilder.prototype.append=function(B){this.strings.push(B)};StringBuilder.prototype.add=function(B){this.strings.push(B)};StringBuilder.prototype.toString=function(){if(arguments.length==0){return this.strings.join("")}else{return this.strings.join(arguments[0])}};StringBuilder.prototype.clear=function(){this.strings.clear()};StringBuilder.prototype.backspace=function(){this.strings.pop()};function f_switchTarget(F,G){searchTarget=G;var H=F.parentNode.childNodes;var E=H.length;for(i=0;i<E;i++){H[i].className=""}F.className="on"}function f_searchText(){txt=$("txtSearch").value.Trim();if(txt!=""){window.location.href="/search/"+searchTarget+"?"+encodeURIComponent(txt).replace(/'/g,"%27")}}function f_searchTextNewWindow(){txt=$("txtSearch").value.Trim();if(txt!=""){window.open("/search/"+searchTarget+"?"+encodeURIComponent(txt).replace(/'/g,"%27"))}}if(typeof (stat)=="undefined"){stat=new Mtime.Component.Statistic();if(PeriodicalExecuter){var unreadMessagePeriodicalExecuter=new PeriodicalExecuter(stat.getPeriodicalUnreadMessages,180);Event.observe(window,"unload",function(){if(unreadMessagePeriodicalExecuter!=null){unreadMessagePeriodicalExecuter.stop();unreadMessagePeriodicalExecuter=null}})}}function loadTg(){if(typeof mtimeStufs!=="undefined"){siteType=typeof siteType==="undefined"?"mtime":siteType;var F=null,H=null;for(var E=0,G=mtimeStufs.length;E<G;E++){F=mtimeStufs[E];if(F.type.length===0){continue}if((siteType==="msn"&&F.type!=="msn")||(siteType!=="msn"&&F.type==="msn")){continue}H=$(F.id);if(H&&F.content.trim().length>0){H.update(F.content);if(typeof tracker!=="undefined"&&typeof tracker.trackAdView!=="undefined"){tracker.trackAdView(H,F.id);tracker.observeAdClick(H,F.id)}}}}}setTimeout(loadTg,1000);Event.observe(window,"unload",function(){Ready.stop()});function $innerHTML(H,F){var E=document.createElement("div"),G=document.createDocumentFragment();E.innerHTML=H;(function(){if(E.firstChild){G.appendChild(E.firstChild);setTimeout(arguments.callee,0)}else{F(G)}})()}var Validator={Require:/.+/,Email:/^\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\b$/i,Url:/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/,Number:/^\d+$/,Password:/^\S{6,20}$/,NickName:/^[^\\\/\'\"\`\~\^\&\{\}\[\]\<\>\*\%\$\#\@\;\:\,\.\?\+\=\|\!]{1,10}$/,Int:/^[-\+]?\d+$/,Double:/^[-\+]?\d+(\.\d+)?$/,English:/^[A-Za-z]+$/,Chinese:/^[\u0391-\uFFE5]+$/,Tag:/[\\\/\<\>\`\~\'\"\、\!\@\#\$\%\^\&\*\{\}\?\(\)\（\）\《\》\-\:]/,DateTime:/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2})$/,testRegExp:function(C,D){return C.test(D)},validateUrl:function(B){return this.testRegExp(this.Url,B)},validateEmail:function(B){return this.testRegExp(this.Email,B)},validatePassword:function(B){return this.testRegExp(this.Password,B)},validateNickName:function(B){return this.testRegExp(this.NickName,B)},validateRequireElement:function(C){var D=$F(C);return validateRequire(D)},validateRequire:function(B){return this.testRegExp(this.Require,B.Trim())},validateDatetime:function(B){return this.testRegExp(this.DateTime,B.Trim())},filterTagToArray:function(H){var K=[];var L=H.Trim().replace(/[\s　]+/g," ").split(" ");if(L.length==0){return K}for(var J=0,G=0,I=L.length;J<I;J++){if(!this.Tag.test(L[J])){K[G++]=this.getChineseSubString(L[J],10)}}if(K.length==0){return K}if(K.length==1){return K}else{return K.uniq()}},filterMovieTagToArray:function(H){var K=[];var L=H.Trim().replace(/[\s　]+/g," ").split(" ");if(L.length==0){return K}for(var J=0,G=0,I=L.length;J<I;J++){if(!this.Tag.test(L[J])){K[G++]=L[J]}}if(K.length==0){return K}if(K.length==1){return K}else{return K.uniq()}},isChinese:function(D){var C=/[u00-uFF]/;return !C.test(D)},getChineseStringLength:function(F){var G=0;for(var E=0,H=F.length;E<H;E++){if(this.isChinese(F.charAt(E))){G=G+2}else{G=G+1}}return G},getChineseSubString:function(J,K,H){H=(typeof H=="undefined"||H==null)?"":H;var N=K*2;if(N>=this.getChineseStringLength(J)){return J}else{N-=H.length;var I=new StringBuilder();for(var L=0,K=J.length;L<K;L++){var M=J.charAt(L);I.append(M);if(this.isChinese(M)){N-=2;if(N<0){I.backspace();break}}else{N--}if(N==0){break}}return I.toString()+H}}};var Windows={windows:[],maxZIndex:100,register:function(B){this.windows.push(B);this.maxZIndex+=10},unregister:function(B){this.windows=this.windows.reject(function(A){return A==B})},closeAll:function(){if(this.count()>0){this.windows.each(function(B){B.close()})}},count:function(){return this.windows.length},getZIndex:function(){return this.maxZIndex}};var Window=Mtime.Control.Window;Window=Class.create();Window.prototype={fixTopHeight:30,zIndex:100,createIframe:false,isToggleTroubleElement:false,isFocus:true,windowElement:null,overlay:null,createOverlay:true,closed:false,dimensions:{cruft:null,container:null,viewport:{height:null,width:null,offsetTop:null,offsetLeft:null}},pagePosition:{x:0,y:0},pageDimensions:{width:null,height:null},options:{},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.uniqueId=new Date().getTime();this.setOptions(B);this.initializeWindow();this.addDOM();this.initializeWindowElement();this.initializeDOM();this.initializeEvent();this.load();this.render();Event.observe(window,"unload",this.close.bind(this))},initializeWindow:function(){},initializeWindowElement:function(){var B=this.getContainer();B.appendChild(this.windowElement);this.windowElement=$(this.windowElement)},destroyWindowElement:function(){if(this.windowElement!==null){var B=this.getContainer();B.removeChild(this.windowElement);this.windowElement=null}},addDOM:function(){},removeDOM:function(){},initializeDOM:function(){},initializeEvent:function(){},load:function(){},render:function(){},addOverlay:function(){if(typeof this.uniqueId=="undefined"){this.uniqueId=new Date().getTime()}var E="overlay"+this.uniqueId;this.overlay=$(E);if(!this.overlay){var D=this.getContainer();var F=Element.extend(document.createElement("div"));F.id=E;F.setStyle({background:"#FFFFFF",filter:"alpha(opacity=80)",opacity:0.8,zoom:1,zIndex:Windows.getZIndex(),position:"absolute",margin:"0px",padding:"0px",top:"0px",left:"0px",width:this.pageDimensions.width+"px",height:this.pageDimensions.height+"px"});D.appendChild(F);this.overlay=F}},removeOverlay:function(){if(this.overlay){var B=this.getContainer();this.overlay.setStyle({top:"0px",left:"0px",width:"0px",height:"0px"});B.removeChild(this.overlay);this.overlay=null;delete this.overlay}},getContainer:function(){var B=$("contentEnd");if(typeof B==="undefined"||B===null){B=document.getElementsByTagName("body")[0]}return B},open:function(){this.windowId=this.windowElement.id;if(this.windowId.length===0){this.windowId="window_"+new Date().getTime()}Windows.register(this);this.getScroll();this.getPageDimensions();this.browserDimensions();if(this.createOverlay){this.addOverlay()}this.showWindow();this.setupDimensions();this.prepareIE(true);this.checkIEOverlapping()},visible:function(){return this.windowElement.visible()},close:function(){if(!this.closed){this.closed=true;Windows.unregister(this);this.prepareIE(false);this.hideDimensions();this.hideWindow();if(this.createOverlay){this.removeOverlay()}if(this.iefix){Element.remove(this.iefix)}this.dispose();this.destroyWindowElement()}},getScroll:function(){if(typeof (window.pageYOffset)=="number"){this.pagePosition.x=window.pageXOffset;this.pagePosition.y=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){this.pagePosition.x=document.body.scrollLeft;this.pagePosition.y=document.body.scrollTop}else{if(document.documentElement){this.pagePosition.x=document.documentElement.scrollLeft;this.pagePosition.y=document.documentElement.scrollTop}}}},getPageDimensions:function(){var G,E;if(window.innerHeight&&window.scrollMaxY){G=document.body.scrollWidth;E=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){G=document.body.scrollWidth;E=document.body.scrollHeight}else{G=document.body.offsetWidth;E=document.body.offsetHeight}}var H,F;if(self.innerHeight){H=self.innerWidth;F=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){H=document.documentElement.clientWidth;F=document.documentElement.clientHeight}else{if(document.body){H=document.body.clientWidth;F=document.body.clientHeight}}}if(E<F){this.pageDimensions.height=F}else{this.pageDimensions.height=E}if(G<H){this.pageDimensions.width=H}else{this.pageDimensions.width=G}},browserDimensions:function(){if(Prototype.Browser.IE){this.dimensions.viewport.height=document.documentElement.clientHeight;this.dimensions.viewport.width=document.documentElement.clientWidth}else{this.dimensions.viewport.height=window.innerHeight;this.dimensions.viewport.width=document.width||document.body.offsetWidth}},setupDimensions:function(){var G=this.dimensions.viewport.height/2+this.pagePosition.y;var J=this.dimensions.viewport.width/2+this.pagePosition.x;var L=this.windowElement.getDimensions();var K=L.width,H=L.height;var I=(G-parseFloat(H)/2);if(I<=0){I=this.fixTopHeight}this.windowElement.setStyle({position:"absolute",top:I+"px",left:(J-parseFloat(K)/2)+"px",zIndex:this.overlay?parseInt(this.overlay.getStyle("zIndex"),10)+1:Windows.getZIndex()})},hideDimensions:function(){this.windowElement.setStyle({position:"absolute",top:"0px",left:"0px",zIndex:0})},prepareIE:function(K){if(Prototype.Browser.IE){var L,I,J;if(K){L="100%"}else{L="auto"}var G=document.getElementsByTagName("body")[0];var H=document.getElementsByTagName("html")[0];H.style.height=G.style.height=L}},toggleTroubleElements:function(I){if(Prototype.Browser.IE){var O=document.getElementsByTagName("select");for(var P=0;P<O.length;P++){var J=O[P];if(J.style.visibility!=I&&!Element.descendantOf(J,this.windowElement)){J.style.visibility=I}}var L=document.getElementsByTagName("object");for(P=0;P!=L.length;P++){var K=L[P];if(K.style.visibility!=I&&!Element.descendantOf(K,this.windowElement)){K.style.visibility=I}}var M=document.getElementsByTagName("embed");for(P=0;P!=M.length;P++){var N=M[P];if(N.style.visibility!=I&&!Element.descendantOf(N,this.windowElement)){N.style.visibility=I}}}},checkIEOverlapping:function(){if(this.createIframe){if(!this.iefix&&IE){new Insertion.After(this.windowElement,'<iframe id="'+this.windowId+'_iefix" style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" src="javascript:false;" frameborder="0" scrolling="no"></iframe>');this.iefix=$(this.windowId+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),1)}}},fixIEOverlapping:function(){if(this.createIframe){if(this.windowElement){Position.clone(this.windowElement,this.iefix);if(this.iefix.getStyle("width")==="0px"){var D=this.windowElement.getDimensions();var C=D.height+30;this.iefix.setStyle({width:D.width+"px",height:C+"px"})}this.iefix.style.zIndex=parseInt(this.windowElement.style.zIndex,10)-1;this.iefix.show()}}},setScroll:function(C,D){window.scrollTo(C,D)},setLocation:function(D,C){this.windowElement.setStyle({top:D+"px",left:C+"px"})},showWindow:function(){this.onWindowResizeHandler=this.onWindowResize.bind(this);Event.observe(window,"resize",this.onWindowResizeHandler);this.onDocumentKeydownHandler=this.onDocumentKeydown.bindAsEventListener(this);Event.observe(document,"keydown",this.onDocumentKeydownHandler);if(this.createOverlay){this.overlay.show()}if(this.createOverlay||this.isToggleTroubleElement){this.toggleTroubleElements("hidden")}this.showWindowElement();if(this.isFocus){$defer(function(){if(this.windowElement&&this.windowElement.visible()){this.windowElement.focus()}},this)}if(this.iefix){this.iefix.show()}},hideWindow:function(){Event.stopObserving(window,"resize",this.onWindowResizeHandler);Event.stopObserving(document,"keydown",this.onDocumentKeydownHandler);if(this.createOverlay){this.overlay.hide()}if(this.createOverlay||this.isToggleTroubleElement){this.toggleTroubleElements("visible")}this.hideWindowElement();if(this.iefix){this.iefix.hide()}},showWindowElement:function(){this.windowElement.show()},hideWindowElement:function(){this.windowElement.hide()},getEl:function(P){if(this.windowElement&&this.windowElement!==null){var I=this.windowElement.descendants();if(I&&I.length>0){var K=null;var L=[],N=typeof P=="string";for(var O=0,M=I.length;O<M;O++){K=I[O];if(K.id.length===0){continue}if(N){if(K.id==P){return K}}else{var J=P.indexOf(K.id);if(J>=0){L.push(K)}}}if(L.length>0){return L}}}return null},dispose:function(){},onWindowResize:function(){if(this.closed){return }this.getScroll();this.getPageDimensions();this.browserDimensions();this.setupDimensions()},onDocumentKeydown:function(){}};var Textbox=Mtime.Control.Textbox;Textbox=Class.create();Object.extend(Textbox.prototype,{options:{text:null,value:"",watermarkText:"请输入",focusClassName:"c_000",blurClassName:"c_a5",onKeypressCallback:null,onKeyupCallback:null,onKeydownCallback:null,onClickCallback:null,onFocusCallback:null,onBlurCallback:null,readonly:false},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.load()},initializeField:function(){this.box=null},initializeDOM:function(){this.text=$(this.text)},destroyDOM:function(){this.text.value="";this.text=null},initializeEvent:function(){this.onFocusTextHandler=this.onFocusText.bindAsEventListener(this);this.text.observe("focus",this.onFocusTextHandler);this.onBlurTextHandler=this.onBlurText.bindAsEventListener(this);this.text.observe("blur",this.onBlurTextHandler);if(this.onKeydownCallback!==null){this.onKeydownTextHandler=this.onKeydownText.bindAsEventListener(this);this.text.observe("keydown",this.onKeydownTextHandler)}if(this.onKeypressCallback!==null){this.onKeypressTextHandler=this.onKeypressText.bindAsEventListener(this);this.text.observe("keypress",this.onKeypressTextHandler)}if(this.onKeyupCallback!==null){this.onKeyupTextHandler=this.onKeyupText.bindAsEventListener(this);this.text.observe("keyup",this.onKeyupTextHandler)}if(this.onClickCallback!==null){this.onClickTextHandler=this.onClickText.bindAsEventListener(this);this.text.observe("click",this.onClickTextHandler)}Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){this.text.stopObserving("focus",this.onFocusTextHandler);this.text.stopObserving("blur",this.onBlurTextHandler);if(this.onKeydownCallback!==null){this.text.stopObserving("keydown",this.onKeydownTextHandler)}if(this.onKeypressCallback!==null){this.text.stopObserving("keypress",this.onKeypressTextHandler)}if(this.onKeyupCallback!==null){this.text.stopObserving("keyup",this.onKeyupTextHandler)}if(this.onClickCallback!==null){this.text.stopObserving("click",this.onClickTextHandler)}},load:function(){if(this.value.length>0){this.setValue(this.value)}this.setWatermarkText()},setWatermarkText:function(){if(this.text.value.length===0){this.text.value=this.watermarkText;this.setBlurTextClass()}else{if(this.text.value==this.watermarkText){this.setBlurTextClass()}else{this.setFocusTextClass()}}},onFocusText:function(B){if(this.text.value==this.watermarkText){this.text.value=""}this.setFocusTextClass();if(this.onFocusCallback!==null){this.onFocusCallback(this.getValue(),B)}},setFocusTextClass:function(){if(this.focusClassName.length!==0){if(!this.text.hasClassName(this.focusClassName)){this.text.addClassName(this.focusClassName)}}if(this.blurClassName.length!==0){if(this.text.hasClassName(this.blurClassName)){this.text.removeClassName(this.blurClassName)}}},onBlurText:function(B){if(this.text.value.length===0){this.text.value=this.watermarkText}this.setBlurTextClass();if(this.onBlurCallback!==null){this.onBlurCallback(this.getValue(),B)}},setBlurTextClass:function(){if(this.text.value==this.watermarkText){if(this.focusClassName.length!==0){if(this.text.hasClassName(this.focusClassName)){this.text.removeClassName(this.focusClassName)}}if(this.blurClassName.length!==0){if(!this.text.hasClassName(this.blurClassName)){this.text.addClassName(this.blurClassName)}}}},onKeydownText:function(B){this.onKeydownCallback(B)},onKeyupText:function(B){this.onKeyupCallback(B)},onKeypressText:function(B){this.onKeypressCallback(B)},onClickText:function(B){this.onClickCallback(B)},getValue:function(){var B=this.text.value;if(B==this.watermarkText){B=""}return B.trim()},setValue:function(B){this.text.value=B},trim:function(){var B=this.text.value.trim();if(B.length>0){this.setValue(B)}},clear:function(){this.setValue("");this.setWatermarkText()},isClosed:false,close:function(){if(!this.isClosed){this.isClosed=true;this.destroyEvent();this.destroyDOM()}}});var MenuBase=Class.create();MenuBase.prototype={SlideTypePrev:0,SlideTypeNext:1,options:{menuRegion:null,contentRegion:null,initializeMenuIndex:0,menuTagName:"",overTimeout:1},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.initializeMenu();this.load();this.render()},initializeField:function(){this.outMenuTimer=null;this.overMenuTimer=null},initializeDOM:function(){this.initializeMenuDOM();if(this.contentRegion){this.contentRegion=$(this.contentRegion);this.contents=this.contentRegion.immediateDescendants()}},initializeMenuDOM:function(){this.menuRegion=$(this.menuRegion);this.menus=this.menuRegion.immediateDescendants()},destroyDOM:function(){this.menus.clear();this.menus=null;if(typeof this.contents!="undefined"){this.contents.clear();this.contents=null}},initializeEvent:function(){this.onOverMenuHandler=this.onOverMenu.bindAsEventListener(this);this.menuRegion.observe("mouseover",this.onOverMenuHandler);this.onOutMenuHandler=this.onOutMenu.bindAsEventListener(this);this.menuRegion.observe("mouseout",this.onOutMenuHandler);this.onClickMenuHandler=this.onClickMenu.bindAsEventListener(this);this.menuRegion.observe("click",this.onClickMenuHandler);Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){this.menuRegion.stopObserving("mouseover",this.onOverMenuHandler);this.menuRegion.stopObserving("mouseout",this.onOutMenuHandler);this.menuRegion.stopObserving("click",this.onClickMenuHandler)},initializeMenu:function(){},destroyMenu:function(){},load:function(){if(this.menuTagName.length===0&&this.menus&&this.menus.length>0){this.menuTagName=this.menus[0].tagName.toLowerCase()}},render:function(){if(this.menus!==null&&this.menus.length>0&&this.initializeMenuIndex>=0&&this.initializeMenuIndex<this.menus.length){this.setMenuOn(this.menus[this.initializeMenuIndex])}},onOverMenu:function(D){this.handleOverMenuTimer();var F=Event.findElement(D,this.menuTagName);if(F!==null){this.handleOutMenuTimer(F);var E=FunctionExt.defer(function(A){this.setMenuOver(A)},this.overTimeout,this,[F]);this.overMenuTimer={menu:F,timeout:E}}},handleOverMenuTimer:function(){if(this.overMenuTimer!==null&&this.overMenuTimer.timeout!==null){clearTimeout(this.overMenuTimer.timeout);this.overMenuTimer=null}},handleOutMenuTimer:function(B){if(this.outMenuTimer!==null&&this.outMenuTimer.menu!==null&&this.outMenuTimer.menu==B){clearTimeout(this.outMenuTimer.timeout);this.outMenuTimer=null}},onOutMenu:function(D){this.handleOverMenuTimer();var F=Event.findElement(D,this.menuTagName);if(F!==null){this.handleOutMenuTimer(F);var E=FunctionExt.defer(function(A){this.setMenuOut(A)},1,this,[F]);this.outMenuTimer={menu:F,timeout:E}}},onClickMenu:function(E){var G=Event.findElement(E,this.menuTagName);if(G!==null){var H=this.indexOf(G);if(H>=0){var F=Event.element(E);if(this.onClickMenuCallback){this.onClickMenuCallback(G,H,F)}}}},setMenuOn:function(D){var C=this.indexOf(D);if(C>=0){if(this.onMenuActiveCallback){this.onMenuActiveCallback(D,C)}}},setMenuOff:function(D){var C=this.menus.indexOf(D);if(C>=0){if(this.onMenuInactiveCallback){this.onMenuInactiveCallback(D,C)}}},setMenuOver:function(D){var C=this.menus.indexOf(D);if(C>=0){if(this.onMenuOverCallback){this.onMenuOverCallback(D,C)}}},setMenuOut:function(D){var C=this.menus.indexOf(D);if(C>=0){if(this.onMenuOutCallback){this.onMenuOutCallback(D,C)}}},indexOf:function(H){if(H&&H!==null){var I=this.menus,G=null;for(var F=0,J=I.length;F<J;F++){G=I[F];if(G==H){return F}}}return -1},closed:false,close:function(){if(!this.closed){this.closed=true;this.destroyMenu();this.destroyEvent();this.destroyDOM()}}};var Observer=Class.create();Observer.prototype={options:{sourceElement:null,targetElement:null,timeout:1},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.initializeMenu();this.load();this.render()},initializeField:function(){this.outSourceTimer={};this.overSourceTimer={};this.outTargetTimer={};this.overTargetTimer={}},initializeDOM:function(){this.sourceElement=$(this.sourceElement);this.targetElement=$(this.targetElement)},destroyDOM:function(){this.sourceElement=null;this.targetElement=null},initializeEvent:function(){this.onOverSourceHandler=this.onOverSource.bindAsEventListener(this);this.sourceElement.observe("mouseover",this.onOverSourceHandler);this.onOutSourceHandler=this.onOutSource.bindAsEventListener(this);this.sourceElement.observe("mouseout",this.onOutSourceHandler);this.onClickSourceHandler=this.onClickSource.bindAsEventListener(this);this.sourceElement.observe("click",this.onClickSourceHandler);if(this.targetElement){this.initializeTargetEvent()}Event.observe(window,"unload",this.close.bind(this))},initializeTargetEvent:function(){this.onOverTargetHandler=this.onOverTarget.bindAsEventListener(this);this.targetElement.observe("mouseover",this.onOverTargetHandler);this.onOutTargetHandler=this.onOutTarget.bindAsEventListener(this);this.targetElement.observe("mouseout",this.onOutTargetHandler)},destroyEvent:function(){this.sourceElement.stopObserving("mouseover",this.onOverSourceHandler);this.sourceElement.stopObserving("mouseout",this.onOutSourceHandler);this.sourceElement.stopObserving("click",this.onClickSourceHandler);if(this.targetElement){this.destroyTargetEvent()}},destroyTargetEvent:function(){this.targetElement.stopObserving("mouseover",this.onOverTargetHandler);this.targetElement.stopObserving("mouseout",this.onOutTargetHandler)},initializeMenu:function(){},destroyMenu:function(){},load:function(){},render:function(){},handleOverSourceTimer:function(){if(this.overSourceTimer!==null){clearTimeout(this.overSourceTimer.timeout);this.overSourceTimer=null}this.handleOutTargetTimer()},handleOutSourceTimer:function(){if(this.outSourceTimer!==null){clearTimeout(this.outSourceTimer.timeout);this.outSourceTimer=null}if(this.outTargetTimer!==null){clearTimeout(this.outTargetTimer.timeout);this.outTargetTimer=null}},handleOverTargetTimer:function(){if(this.overTargetTimer!==null){clearTimeout(this.overTargetTimer.timeout);this.overTargetTimer=null}this.handleOutSourceTimer()},handleOutTargetTimer:function(){if(this.outTargetTimer!==null){clearTimeout(this.outTargetTimer.timeout);this.outTargetTimer=null}if(this.outSourceTimer!==null){clearTimeout(this.outSourceTimer.timeout);this.outSourceTimer=null}},onOverSource:function(D){this.handleOverSourceTimer();this.handleOutSourceTimer();var F=Event.element(D);if(F!==null){var E=FunctionExt.defer(function(A){if(this.onOverSourceCallback){this.onOverSourceCallback(A)}},this.timeout,this,[F]);this.overSourceTimer={menu:F,timeout:E}}},onOutSource:function(D){this.handleOverSourceTimer();this.handleOutSourceTimer();var F=Event.element(D);if(F!==null){var E=FunctionExt.defer(function(A){if(this.onOutSourceCallback){this.onOutSourceCallback(A)}},this.timeout,this,[F]);this.outSourceTimer={menu:F,timeout:E}}},onClickSource:function(C){var D=Event.element(C);if(D!==null){if(this.onClickSourceCallback){this.onClickSourceCallback(D)}}},onOverTarget:function(D){this.handleOverTargetTimer();this.handleOutTargetTimer();var F=Event.element(D);if(F!==null){var E=FunctionExt.defer(function(A){if(this.onOverTargetCallback){this.onOverTargetCallback(A)}},this.timeout,this,[F]);this.overTargetTimer={menu:F,timeout:E}}},onOutTarget:function(D){this.handleOverTargetTimer();this.handleOutTargetTimer();var F=Event.element(D);if(F!==null){var E=FunctionExt.defer(function(A){if(this.onOutTargetCallback){this.onOutTargetCallback(A)}},this.timeout,this,[F]);this.outTargetTimer={menu:F,timeout:E}}},closed:false,close:function(){if(!this.closed){this.closed=true;this.destroyMenu();this.destroyEvent();this.destroyDOM()}}};var TabPanel=Class.create();Object.extend(Object.extend(TabPanel.prototype,MenuBase.prototype),{initializeMenu:function(){this.overTimeout=300;this.menuOn=null},destroyMenu:function(){this.menuOn=null},onMenuActiveCallback:function(D,C){if(this.menuOn!=D){this.on(D,C)}},onMenuOverCallback:function(D,C){this.onClickMenuCallback(D,C)},onClickMenuCallback:function(D,C){if(this.menuOn!=D){this.on(D,C)}},beforeOn:function(D,C){if(this.menuOn&&this.menuOn!=null){this.off(this.menuOn,this.menuOn.index)}this.menuOn=D;this.menuOn.index=C},on:function(D,C){this.beforeOn(D,C);D.addClassName("on");this.showMenuContent(C)},onShowMenuComplete:function(){this.isActive=false},off:function(D,C){if(D.className!=""){D.removeClassName("on");this.hideMenuContent(C)}},showMenuContent:function(D){var C=this.contents[D];if(!$visible(C)){$show(C);if(this.onShowContentCallback){this.onShowContentCallback(D)}}},hideMenuContent:function(D){var C=this.contents[D];if($visible(C)){$hide(C)}}});var AccordionPanel=Class.create();Object.extend(Object.extend(AccordionPanel.prototype,MenuBase.prototype),{initializeMenu:function(){this.menuOn=null;var I=this.menus,H=null,J=[],G=null;for(var L=0,K=this.menus.length;L<K;L++){H=I[L];G=H.down("div");J.push(G)}this.subMenus=J;this.overTimeout=2;this.isActive=false},destroyMenu:function(){this.menuOn=null},onMenuActiveCallback:function(D,C){if(this.menuOn!=D){this.on(D,C)}},onMenuOverCallback:function(D,C){if(this.menuOn!=D){this.on(D,C)}},beforeOn:function(D,C){if(this.menuOn&&this.menuOn!=null){this.off(this.menuOn,this.menuOn.index)}this.menuOn=D;this.menuOn.index=C},on:function(D,C){this.beforeOn(D,C);D.addClassName("on");this.showMenuContent(C)},onShowMenuComplete:function(){this.isActive=false},off:function(D,C){if(D.className!=""){D.removeClassName("on");this.hideMenuContent(C)}},showMenuContent:function(D){var C=this.subMenus[D];if(!$visible(C)){$show(C)}},hideMenuContent:function(D){var C=this.subMenus[D];if($visible(C)){$hide(C)}}});var NavigationSubMenus={index:{hasSubMenu:0,Title:"\u9996\u9875",Url:"/"},home:{hasSubMenu:1,className:"child",Title:"我的时光",Url:siteMcUrl,"我的时光":{Title:"我的时光",Url:siteMcUrl,className:"mytime"},"我的电影":{Title:"我的电影",Url:siteMcUrl+"/movie/wish/"},"我的好友":{Title:"我的好友",Url:siteMcUrl+"/friend/feed/"},"我的群组":{Title:"我的群组",Url:siteMcUrl+"/group/"},"我的博客":{Title:"我的博客",Url:"/member/signin/",className:"myblog"},"日志":{Title:"\u65E5\u5FD7",Url:"/member/signin/?redirectUrl=MyBlog"},"相册":{Title:"\u76F8\u518C",Url:"/member/signin/?redirectUrl=MyPhoto"},"个人资料":{Title:"\u4E2A\u4EBA\u8D44\u6599",Url:"/member/signin/?redirectUrl=MyProfile"}},movie:{hasSubMenu:1,Title:"\u7535\u5F71",Url:"/movie/","电影频道":{Title:"电影频道",Url:"/movie/"},"新闻":{Title:"\u65B0\u95FB",Url:"/movie/news/"},"新片":{Title:"\u65B0\u7247",Url:"/movie/new/"},"热映":{Title:"\u70ED\u6620",Url:"/movie/nowplaying/"},"排行榜":{Title:"排行榜",Url:"/movie/top_ten/"},"影评":{Title:"影评",Url:"/comment/"},"专题":{Title:"专题",Url:"/movie/special.html"},"电影查询":{Title:"\u7535\u5F71\u67E5\u8BE2",Url:"/movie/section/"}},tv:{hasSubMenu:1,Title:"电视",Url:"/tv/","电视频道":{Title:"电视频道",Url:"/tv/"},"新闻":{Title:"新闻",Url:"/tv/news/"},"热播":{Title:"热播",Url:"/tv/hot/"},"排行榜":{Title:"排行榜",Url:"/tv/top/"},"电视剧查询":{Title:"电视剧查询",Url:"/tv/section/"}},person:{hasSubMenu:1,Title:"\u4EBA\u7269",Url:"/people/","人物频道":{Title:"人物频道",Url:"/people/"},"新闻":{Title:"\u65B0\u95FB",Url:"/people/news/"},"八卦":{Title:"\u516B\u5366",Url:"/people/gossip/"},"人物访谈":{Title:"\u4EBA\u7269\u8BBF\u8C08",Url:"/people/interview/"},"排行榜":{Title:"\u6392\u884C\u699C",Url:"/people/top_ten/"}},video:{hasSubMenu:0,Title:"\u89C6\u9891",Url:"/video/"},picture:{hasSubMenu:0,Title:"\u56FE\u7247",Url:"/picture/"},blog:{hasSubMenu:1,Title:"\u535A\u5BA2",Url:"/blog/","博客频道":{Title:"博客频道",Url:"/blog/"},"电影电视":{Title:"电影电视",Url:"/blog/movietalk.html"},"明星时尚":{Title:"明星时尚",Url:"/blog/buzz.html"},"文化生活":{Title:"文化生活",Url:"/blog/lifestyle.html"},"相册":{Title:"\u76F8\u518C",Url:"/photo/"},"会员":{Title:"\u4F1A\u5458",Url:"/blog/member.html"},"热门日志":{Title:"热门日志",Url:"/blog/blog_hot/"}},group:{hasSubMenu:1,Title:"\u7FA4\u7EC4",Url:"/group/","群组频道":{Title:"群组频道",Url:"/group/"},"我的群组":{Title:"\u6211\u7684\u7FA4\u7EC4",Url:"/member/signin/?redirectUrl=MyGroup"},"我的同城":{Title:"\u6211\u7684\u540C\u57CE",Url:"/member/signin/?redirectUrl=/city/"},"活动":{Title:"\u6D3B\u52A8",Url:"/group/event/"},"热门话题":{Title:"\u70ED\u95E8\u8BDD\u9898",Url:"/group/topic_hot/"},"群组分类":{Title:"\u7FA4\u7EC4\u5206\u7C7B",Url:"/group/class/"},"群组人气榜":{Title:"群组人气榜",Url:"/group/top/"}},quiz:{hasSubMenu:1,Title:"\u6E38\u620F",Url:"/fun/","游戏频道":{Title:"游戏频道",Url:"/fun/"},"电影猜猜猜":{Title:"电影猜猜猜",Url:"/fun/quiz/"},"图片评分":{Title:"\u56FE\u7247\u8BC4\u5206",Url:"/fun/photo/"},"眼疾手快":{Title:"眼疾手快",Url:"http://my.mtime.com/app/memory/"},"卡片大富翁":{Title:"卡片大富翁",Url:"http://my.mtime.com/app/card/"}},showtime:{hasSubMenu:0,Title:"\u7535\u5F71\u9662",Url:"/showtime/"}};var NavigationBar=Class.create();Object.extend(Object.extend(NavigationBar.prototype,MenuBase.prototype),{initializeMenu:function(){this.menuOn=null;this.subMenuElements=[];this.subMenus=NavigationSubMenus;for(var C=0,D=this.menus.length;C<D;C++){this.saveOriginStyle(this.menus[C])}},render:function(){if(this.menus!==null&&this.menus.length>0&&this.initializeMenuIndex>=0){var G=this.menus,F=null;for(var E=0,H=G.length;E<H;E++){F=G[E];if(F.token==this.initializeMenuIndex){this.setMenuOn(F);break}}}},destroyMenu:function(){this.menuOn=null;this.subMenuElements.clear();this.subMenuElements=null},onMenuActiveCallback:function(F,E){if(this.menuOn&&this.menuOn!=null){this.off(this.menuOn,E)}this.menuOn=F;this.on(F,E);if(this.subNavigaionType>0){var G=$("s_nav_sec");if(G){var H=G.getElementsByTagName("li");if(H&&H.length>0){H[this.subNavigaionType].className="on"}}}},onMenuInactiveCallback:function(D,C){this.off(D,C)},onMenuOverCallback:function(D,C){if(this.menuOn!=D){D.className=D._className+"_hover";if(!this.visibleMenu(D._className)){this.showSubMenu(D,D._className)}}},onMenuOutCallback:function(D,C){if(this.menuOn!=D){this.off(D,C);this.hideSubMenu(D._className)}},on:function(D,C){D.className=D._className+"_on"},off:function(D,C){D.className=D._className},onClickMenuCallback:function(E,D,F){},isMenuHover:function(B){return B.className==(B._className+"_hover")},visibleMenu:function(C){var D=this.subMenuElements[C];if(D&&D!=null&&D.visible()){return true}return false},hideSubMenu:function(C){var D=this.subMenuElements[C];if(D&&D!=null){D.hide()}},showSubMenu:function(E,D){var F=this.subMenuElements[D];if(!F){F=this.createSubMenu(D);this.subMenuElements[D]=F;if(F==null){return }E.appendChild(F);F.dimensions=F.getDimensions();F.hide()}else{if(F==null){return }}new Fx.Slide(F,{scaleY:true,duration:0.2,dimensions:F.dimensions})},createSubMenu:function(O){var P=this.getSubMenu(O);if(P!=null){var I=new StringBuilder();var L=P.className?P.className:"";I.append(String.Format('<div class="i_n_l {0}" style="overflow:hidden;">',L));for(var K in P){var J=P[K];if(J.Title&&J.Url){var N=J.Url.startsWith("http")?J.Url:siteUrl+J.Url;I.append("<h5>");I.append(String.Format('<a href="{0}">',N));if(J.className){I.append(String.format('<em class="{0}"></em>',J.className))}I.append(J.Title);I.append("</a>");I.append("</h5>")}}I.append("</div>");var M=Element.extend(Builder.build(I.toString()));return M}return null},saveOriginStyle:function(B){if(typeof B._className==="undefined"){B._className=B.className;B.token=parseInt(B.readAttribute("token"),10)}},indexOfByClass:function(G){var I=this.menus,H=null;for(var F=0,J=I.length;F<J;F++){H=I[F];if(H.className==G){return F}}return -1},getSubMenu:function(D){var C=this.subMenus[D];if(typeof C!=="undefined"&&C.hasSubMenu){return C}return null}});var DropDownList=Mtime.Control.DropDownList;DropDownList=Class.create();Object.extend(DropDownList.prototype,{options:{selectRegion:null,selectDefaultOption:null,selectButton:null,listRegion:null,itemTemplate:'<a href="#" onclick="return false;" value="#{id}">#{text}</a>',selectDatas:null,idFieldName:"",titleFieldName:"",width:-1,height:-1,showCount:8,onChangeCallback:null},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.load();this.render()},initializeField:function(){this.itemTemplate=new Template(this.itemTemplate);this.reset()},reset:function(){this.selectIndex=-1;this.selectedValue=null;this.scrollTop=-1;this.usedDataIds=[];this.active=false;this.listIndex=0},initializeDOM:function(){this.selectRegion=$(this.selectRegion);this.selectDefaultOption=$(this.selectDefaultOption);this.selectDefaultOption._text=this.selectDefaultOption.innerHTML;this.selectButton=$(this.selectButton);this.listRegion=$(this.listRegion)},destroyDOM:function(){this.listRegion=null;this.selectRegion=null;this.selectDefaultOption=null;this.selectButton=null},initializeEvent:function(){this.onClickDefaultOptionHandler=this.onClickDefaultOption.bindAsEventListener(this);this.selectDefaultOption.observe("click",this.onClickDefaultOptionHandler);this.onClickSelectButtonHandler=this.onClickSelectButton.bindAsEventListener(this);this.selectButton.observe("click",this.onClickSelectButtonHandler);this.onClickListRegionHandler=this.onClickListRegion.bindAsEventListener(this);this.listRegion.observe("click",this.onClickListRegionHandler);this.onScrollListRegionHandler=this.onScrollListRegion.bindAsEventListener(this);this.listRegion.observe("scroll",this.onScrollListRegionHandler);this.onClickHandler=this.onClick.bindAsEventListener(this);Event.observe(document.body,"click",this.onClickHandler);Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){this.selectDefaultOption.stopObserving("click",this.onClickDefaultOptionHandler);this.selectButton.stopObserving("click",this.onClickSelectButtonHandler);this.listRegion.stopObserving("click",this.onClickListRegionHandler);this.listRegion.stopObserving("scroll",this.onScrollListRegionHandler);Event.stopObserving(document.body,"click",this.onClickHandler)},load:function(){if(this.selectDatas==null||this.selectDatas.length==0){return }this.setSelectedValue(this.selectDatas[0])},show:function(){if(!this.selectRegion.visible()){this.selectRegion.show()}},hide:function(){if(this.selectRegion.visible()){this.selectRegion.hide()}},onClickDefaultOption:function(){this.showSelectList()},onClickSelectButton:function(){this.showSelectList()},onClickListRegion:function(E){var G=Event.findElement(E,"a");if(G&&G.readAttribute){var F=G.readAttribute("value");var H=this.getOption(F);this.setValue(H)}},onScrollListRegion:function(C){var D=this.getScrollTop();if(D>=this.scrollTop){if(!this.active){this.active=true;this.scrollTop=D;this.render();this.active=false}}},render:function(){this.listRegion.innerHTML+=this.getMoreLists()},setValue:function(B){this.setSelectedValue(B);this.hideSelectList()},setValueById:function(B){this.setValue(this.getOption(B))},setData:function(B){this.reset();this.listRegion.innerHTML="";this.selectDefaultOption.innerHTML=this.selectDefaultOption._text;this.selectDatas=B;this.render()},getMoreLists:function(){if(this.selectDatas==null||this.selectDatas.length==0){return""}var M=this.showCount,R=this.selectDatas,T=null,L=[],Q=new StringBuilder(),O=0,P=this.itemTemplate;for(var K=this.listIndex,S=R.length;K<S&&O<M;K++){T=R[K];var N=T[this.idFieldName];if(!this.usedDataIds.include(N)){this.usedDataIds.push(N);Q.append(this.createListItem(T));O++;this.listIndex=K}}this.listIndex++;return Q.toString()},createListItem:function(B){return this.itemTemplate.evaluate(B)},onClick:function(C){var D=Event.element(C);if(!this.contain(D)){this.hideSelectList()}},showSelectList:function(){if(!this.listRegion.visible()){this.listRegion.show();this.scrollTop=this.getScrollTop()}},hideSelectList:function(){if(this.listRegion.visible()){this.listRegion.hide()}},setSelectedValue:function(B){if(B!=null){if(this.selectedValue==null||this.selectedValue[this.idFieldName]!=B[this.idFieldName]){this.selectDefaultOption.innerHTML=B[this.titleFieldName];this.selectedValue=B;if(this.onChangeCallback&&this.onChangeCallback!=null){this.onChangeCallback(B)}}}},contain:function(B){return B.descendantOf(this.selectRegion)},getValue:function(){return this.selectedValue},getOption:function(E){var F=null;var D=this.idFieldName;this.selectDatas.each(function(A){if(A[D]==E){F=A;throw $break}});return F},getScrollTop:function(){return Position.realOffset(this.listRegion)[1]},isClosed:false,close:function(){if(!this.isClosed){this.isClosed=true;if(this.selectDatas!=null){this.selectDatas.clear()}this.hideSelectList();this.destroyEvent();this.destroyDOM()}}});var AutoCompleteBase=Mtime.Control.AutoCompleteBase;AutoCompleteBase=Class.create();Object.extend(AutoCompleteBase.prototype,{options:{text:null,textWatermarkText:"",listRegion:null,itemTemplate:"",searchDatas:null,defaultSearchDatas:null,idFieldName:"id",titleFieldName:"title",choiceCount:8,frequency:0.1,minChars:1,isMatch:null,isShowMoreResult:true,isAlwayShowList:true,isEnable:true,onChangeInputCallback:null,onChangeCallback:null,isAutoMatchSuggest:false,onEnterCallback:null},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},baseInitialize:function(B){this.setOptions(B);this.baseInitializeField();this.initializeField();this.baseInitializeDOM();this.initializeDOM();this.baseInitializeEvent();this.initializeEvent();this.initializeControl();this.load()},baseInitializeField:function(){this.itemTemplate=new Template(this.itemTemplate);this.selectedValue=null;this.scrollTop=-1;this.active=false;this.searchIndex=0;this.hasFocus=false;this.changed=false;this.index=-1;this.entryCount=0;this.observer=null;this.keyword=""},initializeField:function(){},baseInitializeDOM:function(){this.text=$(this.text);this.text.setAttribute("autocomplete","off");this.listRegion=$(this.listRegion)},initializeDOM:function(){},baseDestroyDOM:function(){this.listRegion=null;this.text=null},destroyDOM:function(){},baseInitializeEvent:function(){this.onScrollListRegionHandler=this.onScrollListRegion.bindAsEventListener(this);this.listRegion.observe("scroll",this.onScrollListRegionHandler);this.onClickListRegionHandler=this.onClickListRegion.bindAsEventListener(this);this.listRegion.observe("click",this.onClickListRegionHandler);this.onClickHandler=this.onClick.bindAsEventListener(this);Event.observe(document.body,"click",this.onClickHandler);Event.observe(window,"unload",this.close.bind(this))},initializeEvent:function(){},baseDestroyEvent:function(){this.listRegion.stopObserving("scroll",this.onScrollListRegionHandler);this.listRegion.stopObserving("click",this.onClickListRegionHandler);Event.stopObserving(document.body,"click",this.onClickHandler)},destroyEvent:function(){},initializeControl:function(){this.textbox=new Textbox({text:this.text,value:this.text.value,watermarkText:this.textWatermarkText,focusClassName:"c_000",blurClassName:"c_a5",onFocusCallback:this.onFocusText.bind(this),onBlurCallback:this.onBlurText.bind(this),onKeydownCallback:this.onKeydownText.bind(this),onKeyupCallback:this.onKeydownText.bind(this),onClickCallback:this.onClickText.bind(this)})},destroyControl:function(){this.textbox.close()},load:function(){},onBlurText:function(D,C){this.active=false;this.hasFocus=false;if(D!==""&&!this.listRegion.visible()){this.search()}setTimeout(this.hide.bind(this),250)},onFocusText:function(B){this.hasFocus=true;this.active=true},onKeydownText:function(B){if(this.handled){this.handled=false;return }this.handled=true;switch(B.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.onEnterText();Event.stop(B);return ;case Event.KEY_ESC:this.hide();Event.stop(B);return ;case Event.KEY_LEFT:case Event.KEY_RIGHT:return ;case Event.KEY_UP:this.markPrevious();Event.stop(B);return ;case Event.KEY_DOWN:this.markNext();Event.stop(B);return ;default:this.addObserver();this.onChangeInput();break}},onEnterText:function(){this.search();if(this.onEnterCallback){this.onEnterCallback(this.getValue())}},onClickText:function(){this.render()},onClick:function(C){var D=Event.element(C);if(D!=this.text&&!this.contain(D)){this.hide()}},onClickListRegion:function(C){var D=Event.findElement(C,"a");if(D){this.removeObserver();this.selectedEntry(D);if(this.onEnterCallback){this.onEnterCallback(this.getValue())}}},onScrollListRegion:function(C){var D=this.getScrollTop();if(D>=this.scrollTop){if(!this.active){this.active=true;this.scrollTop=D;this.render();this.active=false}}},reset:function(){this.selectedValue=null;this.index=-1;this.searchIndex=0;this.entryCount=0},render:function(){if(this.isEnable){if(this.changed){this.reset()}var D=this.getSearchKeyword();if(D.length==0){this.removeObserver();this.renderDefaultList()}else{var C=this.getMoreLists();if(this.isAlwayShowList||this.entryCount>0){this.renderTip(D,this.entryCount);this.renderList(this.changed,C);this.showSelectList()}else{this.hideSelectList()}}}},renderDefaultList:function(){if(this.defaultSearchDatas){var J=this.choiceCount,I=this.defaultSearchDatas,L=null,M=[],P=new StringBuilder(),O=0;for(var N=0,K=I.length;N<K&&O<J;N++){L=I[N];P.append(this.createListItem(L));O++}this.entryCount=O;this.renderTip("",0);this.renderList(true,P.toString());this.showSelectList()}else{this.hideSelectList()}},renderTip:function(C,D){},renderList:function(D,C){if(!D){this.listRegion.innerHTML+=C}else{this.listRegion.innerHTML=C}},getMoreLists:function(){var Y=this.getSearchKeyword(),R=Y.length,S=this.choiceCount,W=this.searchDatas,b=null,a=[],V=new StringBuilder(),T=0,X=this.idFieldName,P=this.titleFieldName;for(var O=this.searchIndex,Z=W.length;O<Z&&T<S;O++){b=W[O];var U=b[P],Q=b[X];if(R==0){V.append(this.createListItem(b));T++}else{if(this.match(Y,b)){V.append(this.createListItem(b));T++}}}this.entryCount+=T;return V.toString()},onChangeInput:function(){this.changed=true;if(this.onChangeInputCallback!=null){if(this.onChangeInputTimer){clearTimeout(this.onChangeInputTimer)}this.onChangeInputTimer=setTimeout(function(){this.onChangeInputCallback()}.bind(this),10)}},addObserver:function(){this.removeObserver();this.observer=setInterval(this.onObserverEvent.bind(this),this.frequency*1000)},removeObserver:function(){if(this.observer){clearInterval(this.observer)}},onObserverEvent:function(){var B=this.getSearchKeyword();if(B.length>=this.minChars){if(B!=this.keyword){this.keyword=B;this.render()}}else{this.keyword="";this.active=false;this.hideSelectList()}},markPrevious:function(){this.setEntryOff(this.index);if(this.index>0){this.index--}else{this.index=this.entryCount-1}this.setEntryOn(this.index)},markNext:function(){this.setEntryOff(this.index);if(this.index<this.entryCount-1){this.index++}else{this.index=0}this.setEntryOn(this.index)},setEntryOn:function(C){var D=this.getEntry(this.index);if(D&&D!=null){D.className="on"}},setEntryOff:function(C){var D=this.getEntry(this.index);if(D&&D!=null){D.className=""}},getCurrentEntry:function(){return this.getEntry(this.index)},getEntry:function(B){return this.listRegion.childNodes[B+1]},selectEntry:function(){this.active=false;var B=this.getCurrentEntry();if(B){this.removeObserver();this.selectedEntry(B.down("a"))}},selectedEntry:function(F){if(F&&F.readAttribute){var E=F.readAttribute("value");if(E&&E.length>0){var D=this.getOption(E);this.setValue(D)}}},search:function(){if(this.index===-1){if(this.isAutoMatchSuggest){this.render();this.index=0}}this.selectEntry()},setValue:function(B){this.setSelectedValue(B);this.hideSelectList()},match:function(D,F){var E=F[this.titleFieldName].toLowerCase().indexOf(D);if(E==0){return true}return false},createListItem:function(B){return this.itemTemplate.evaluate(B)},show:function(){this.showSelectList()},showSelectList:function(){if(!this.listRegion.visible()){this.listRegion.show();this.scrollTop=this.getScrollTop()}},hideSelectList:function(){if(this.listRegion.visible()){this.listRegion.hide()}},hide:function(){this.hideSelectList()},setSelectedValue:function(B){if(B!=null){if(this.selectedValue===null||this.selectedValue[this.idFieldName]!=B[this.idFieldName]){this.textbox.setValue(B[this.titleFieldName]);this.selectedValue=B;if(this.onChangeCallback&&this.onChangeCallback!=null){this.onChangeCallback(B)}}}},getValue:function(){return this.selectedValue},getOption:function(E){var F=null;var D=this.idFieldName;this.searchDatas.each(function(A){if(A[D]==E){F=A;throw $break}});return F},getSearchKeyword:function(){return this.textbox.getValue()},getScrollTop:function(){return Position.realOffset(this.listRegion)[1]},contain:function(B){return B.descendantOf(this.listRegion)},setEnable:function(B){this.isEnable=B},isClosed:false,close:function(){if(!this.isClosed){this.isClosed=true;if(this.observer){clearTimeout(this.observer)}if(this.searchDatas!=null){this.searchDatas=null}this.destroyControl();this.hideSelectList();this.baseDestroyEvent();this.destroyEvent();this.baseDestroyDOM();this.destroyDOM()}}});var KeywordAutoComplete=Class.create();Object.extend(Object.extend(KeywordAutoComplete.prototype,AutoCompleteBase.prototype),{initialize:function(B){this.type=typeof B.type==="undefined"?"all":B.type;this.baseInitialize(B)},initializeField:function(){this.isAlwayShowList=false;this.isShowMoreResult=false},initializeDOM:function(){},destroyDOM:function(){},initializeEvent:function(){},destroyEvent:function(){},getEntry:function(C){var D=this.listRegion.childNodes.length;if(D>C&&C>=0){return $(this.listRegion.childNodes[C])}return null},selectEntry:function(){this.active=false;var B=this.getCurrentEntry();this.selectedEntry(B)},getOption:function(E){var F=null;var D=this.idFieldName;this.searchDatas[E.charAt(0).toLowerCase()].each(function(A){if(A[D]==E){F=A;throw $break}});return F},getMoreLists:function(){var a=this.getSearchKeyword(),S=a.length,T=this.choiceCount,Y=this.searchDatas,d=null,c=[],X=new StringBuilder(),U=0,Z=this.idFieldName,Q=this.titleFieldName;var V=S===0?Y[0]:Y[a.charAt(0).toLowerCase()];if(V){for(var P=this.searchIndex,b=V.length;P<b&&U<T;P++){d=V[P];var W=d[Q],R=d[Z];if(this.match(a,d)){if(d.count>0){d.display=""}else{d.display='style="display:none;"'}X.append(this.createListItem(d));U++}this.searchIndex=P}this.entryCount+=U}return X.toString()},match:function(D,F){if(this.type!=="all"){if(this.type==="movie"){if(F.type!==1){return false}}if(this.type==="person"){if(F.type!==2){return false}}}var E=F[this.titleFieldName].toLowerCase().indexOf(D.toLowerCase());if(E==0){return true}return false},renderTip:function(C,D){},renderList:function(D,C){this.listRegion.innerHTML=C},setType:function(B){this.type=B},equal:function(C,D){if(this.type!=="all"){if(this.type==="movie"){if(D.type!==1){return false}}if(this.type==="person"){if(D.type!==2){return false}}}if(D[this.titleFieldName]==C){return true}else{return false}},isIntern:function(H){var L=this.searchDatas;var K=this.idFieldName;if(H.length===0){return true}else{var G=L[H.charAt(0).toLowerCase()];if(G){for(var J=0,I=G.length;J<I;J++){if(this.equal(H,G[J])){return true}}}return false}}});var Search=Class.create();Object.extend(Search.prototype,{options:{textbox:"",textboxSuggestRegion:"",searchButton:"",selectTypeRegion:"",selectTypeDefaultOption:"",selectTypeButton:"",selectTypeListRegion:"",selectTypeDatas:null,itemTemplate:'<a href="#" onclick="return false;" value="#{id}">#{text}</a>',watermark:"请输入关键字",actionUrl:"/search/",isMini:false},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.initializeControl()},initializeField:function(){this.type=""},initializeDOM:function(){this.textbox=$(this.textbox);this.searchButton=$(this.searchButton);this.selectTypeRegion=$(this.selectTypeRegion);if(this.isMini){this.currentTypeElement=$("all")}},destroyDOM:function(){this.textbox=null;this.searchButton=null;this.selectTypeRegion=null;if(this.isMini){this.currentTypeElement=null}},initializeEvent:function(){this.onClickSearchButtonHandler=this.onClickSearchButton.bindAsEventListener(this);this.searchButton.observe("click",this.onClickSearchButtonHandler);if(this.selectTypeRegion){if(this.isMini){this.onClickSelectTypeRegionHandler=this.onClickSelectTypeRegion.bindAsEventListener(this);this.selectTypeRegion.observe("click",this.onClickSelectTypeRegionHandler)}}Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){this.searchButton.stopObserving("click",this.onClickSearchButtonHandler);if(this.selectTypeRegion){if(this.isMini){this.selectTypeRegion.stopObserving("click",this.onClickSelectTypeRegionHandler)}}},initializeControl:function(){if(this.selectTypeRegion){if(!this.isMini){this.typeDropDownList=new DropDownList({selectRegion:this.selectTypeRegion,selectDefaultOption:this.selectTypeDefaultOption,selectButton:this.selectTypeButton,listRegion:this.selectTypeListRegion,itemTemplate:'<a href="#" onclick="return false;" value="#{id}">#{text}</a>',selectDatas:this.selectTypeDatas,idFieldName:"id",titleFieldName:"text",showCount:6,onChangeCallback:this.onChangeTypeCallback.bind(this)})}}$get(siteUrl+"/Utility/Data/SearchKeywordData.m",function(){this.searchDatas=searchKeywordData;this.keywordAutoComplete=new KeywordAutoComplete({text:this.textbox,textWatermarkText:this.watermark,listRegion:this.textboxSuggestRegion,itemTemplate:'<a href="#" value="#{word}"><em #{display}>被查询 #{count} 次</em>#{word}</a>',idFieldName:"word",titleFieldName:"word",searchDatas:this.searchDatas,choiceCount:8,onChangeInputCallback:null,onChangeCallback:null,onEnterCallback:this.onEnter.bind(this)})}.bind(this))},destroyControl:function(){if(this.keywordAutoComplete){this.keywordAutoComplete.close()}if(this.typeDropDownList){this.typeDropDownList.close()}},load:function(){},onClickSearchButton:function(){var B=this.getKeyword();this.search(B)},onClickSelectTypeRegion:function(C){var D=Event.findElement(C,"li");if(D&&D.id){this.type=D.id;if(this.currentTypeElement){this.currentTypeElement.className=""}D.className="current";this.currentTypeElement=D;if(this.keywordAutoComplete){if(this.type=="all"||this.type=="movie"||this.type=="person"){this.keywordAutoComplete.setType(this.type);this.keywordAutoComplete.setEnable(true)}else{this.keywordAutoComplete.setEnable(false)}}}},onChangeTypeCallback:function(B){this.type=B.id;if(this.keywordAutoComplete){if(this.type=="all"||this.type=="movie"||this.type=="person"){this.keywordAutoComplete.setType(this.type);this.keywordAutoComplete.setEnable(true)}else{this.keywordAutoComplete.setEnable(false)}}},onEnter:function(D){var C="";if(!D){C=this.getKeyword()}else{C=D.word}this.search(C)},search:function(C){if((this.type=="all"||this.type=="movie"||this.type=="person")&&!this.keywordAutoComplete.isIntern(C)){setCookie("searchPrompt",C)}if(C.length>0){var D=siteUrl+this.actionUrl+(this.type==="all"?"":this.type)+"?"+encodeURIComponent(C).replace(/'/g,"%27");$redirect(D)}},getKeyword:function(){if(this.keywordAutoComplete){keyword=this.keywordAutoComplete.getSearchKeyword()}else{keyword=this.textbox.value}return keyword},isClosed:false,close:function(){if(!this.isClosed){this.isClosed=true;this.destroyControl();this.destroyEvent();this.destroyDOM()}}});var BaseWindow08=Class.create();Object.extend(Object.extend(BaseWindow08.prototype,Window.prototype),{options:{windowClassName:"",windowStyle:"",windowContentStyle:"",onClickCloseCallback:null,readyCallback:null,closeCallback:null},initializeWindow:function(){var B=this.uniqueId;this.id="window08_"+B;this.closeButtonId="window08_closeButton_"+B;this.titleBarId="window08_titleBar_"+B;this.initializeWindowCallback()},initializeWindowCallback:function(){},addDOM:function(){this.windowClassName=this.windowClassName||"";this.windowStyle=this.windowStyle||"";this.windowContentStyle=this.windowContentStyle||"";this.windowElement=Builder.node("div",{className:this.windowClassName,style:this.windowStyle},[Builder.node("div",{className:"share_tip "+this.windowClassName,style:this.windowStyle},[Builder.node("div",{className:"share_tiper",style:this.windowContentStyle},[Builder.node("div",{id:this.titleBarId,style:"cursor: move"},[Builder.node("div",{id:this.closeButtonId,className:"btn_close"},[Builder.node("a",{title:"关闭",href:"#"})]),Builder.node("div",{className:"ele_colorline"}),this.addTitleDOM()]),this.addContentDOM()])])])},addTitleDOM:function(){},addContentDOM:function(){},initializeDOM:function(){this.closeButton=$(this.closeButtonId);this.titleBar=$(this.titleBarId);this.initializeDOMCallback()},initializeDOMCallback:function(){},destroyDOM:function(){this.closeButton=null;this.titleBar=null;this.destroyDOMCallback()},destroyDOMCallback:function(){},initializeEvent:function(){this.onClickCloseButtonHandler=this.onClickCloseButton.bind(this);this.closeButton.observe("click",this.onClickCloseButtonHandler);this.onMousedownTitleBarHandler=this.onMousedownTitleBar.bindAsEventListener(this);this.titleBar.observe("mousedown",this.onMousedownTitleBarHandler);this.onMouseupTitleBarHandler=this.onMouseupTitleBar.bindAsEventListener(this);Event.observe(document,"mouseup",this.onMouseupTitleBarHandler);this.onMousemoveTitleBarHandler=this.onMousemoveTitleBar.bindAsEventListener(this);Event.observe(document,"mousemove",this.onMousemoveTitleBarHandler);this.initializeEventCallback()},initializeEventCallback:function(){},destroyEvent:function(){this.closeButton.stopObserving("click",this.onClickCloseButtonHandler);this.titleBar.stopObserving("mousedown",this.onMousedownTitleBarHandler);Event.stopObserving(document,"mouseup",this.onMouseupTitleBarHandler);Event.stopObserving(document,"mousemove",this.onMousemoveTitleBarHandler);this.destroyEventCallback()},destroyEventCallback:function(){},load:function(){if(this.readyCallback&&this.readyCallback!==null){this.readyCallback(this)}this.titleBar.ondrag=function(){return false};this.titleBar.onselectstart=function(){return false}},onClickCloseButton:function(){if(this.onClickCloseCallback&&this.onClickCloseCallback!==null){this.onClickCloseCallback(this)}this.close()},onMouseupTitleBar:function(){if(!this.isDragging){return }this.isDragging=false},onMousedownTitleBar:function(F){var G=parseInt(this.windowElement.getStyle("left"),10);var H=parseInt(this.windowElement.getStyle("top"),10);var I=Event.pointerX(F);var J=Event.pointerY(F);this.offsetX=I-G;this.offsetY=J-H;this.isDragging=true},onMousemoveTitleBar:function(D){if(!this.isDragging){return }var E=Event.pointerX(D)-this.offsetX;var F=Event.pointerY(D)-this.offsetY;this.setLocation(F,E)},dispose:function(){if(this.closeCallback&&this.closeCallback!==null){this.closeCallback(this)}this.disposeCallback();this.destroyEvent();this.destroyDOM()},disposeCallback:function(){}});var Dialog=Class.create();Object.extend(Object.extend(Dialog.prototype,BaseWindow08.prototype),{options:{title:"",content:"",containerClassName:"",containerStyle:"",isDirectOpen:true,buttonRegionClass:"",buttons:null,closeTimeout:-1},initializeWindowCallback:function(){this.buttonNodes=[];this.buttonHandlers=[];this.keyCodeButtons=[];var B=this.uniqueId;this.buttonRegionId="dialogButtonRegion_"+B},addContentDOM:function(){this.containerClassName="mt15 "+this.containerClassName;return Builder.node("div",{className:this.containerClassName,style:this.containerStyle},[typeof this.content=="string"?Builder.build(this.content):this.content,Builder.node("p",{id:this.buttonRegionId,className:this.buttonRegionClass})])},addTitleDOM:function(){this.title=this.title||"";var B=null;if(typeof this.title==="string"){if(this.title.length>0){B=Builder.build(this.title);if(B===null){B=this.title}}else{B=Builder._text("")}}else{B=this.title}return Builder.node("div",{className:"share_tit"},[B])},initializeDOMCallback:function(){this.buttonRegion=$(this.buttonRegionId);if(this.buttons&&this.buttons!==null){for(var C=0,D=this.buttons.length;C<D;C++){this.addButton(this.buttons[C])}}},destroyDOMCallback:function(){this.buttonRegion=null;this.removeButtons()},initializeEventCallback:function(){},destroyEventCallback:function(){},render:function(){if(this.isDirectOpen){this.open();if(this.closeTimeout>0){this.timerId=setTimeout(this.autoClose.bind(this),this.closeTimeout*1000)}}},autoClose:function(){if(this.timerId){clearTimeout(this.timerId)}this.close()},disposeCallback:function(){},addButton:function(I){var G=I.onmouseover||"";var J=I.onmouseout||"";var F=Element.extend(Builder.node("input",{type:"button",value:I.title,className:I.buttonStyle,onmouseover:G,onmouseout:J},[]));var H=function(){I.callback(this,F)}.bind(this);F.observe("click",H);this.buttonRegion.appendChild(F);this.buttonNodes.push(F);this.buttonHandlers.push(H);if(I.keyCode){this.keyCodeButtons.push({keyCode:I.keyCode,button:F,handler:H})}},removeButtons:function(){if(this.buttonNodes&&this.buttonHandlers&&this.buttonNodes.length==this.buttonHandlers.length){for(var C=0,D=this.buttonNodes.length;C<D;C++){this.buttonNodes[C].stopObserving("click",this.buttonHandlers[C])}}if(this.keyCodeButtons.length>0){this.keyCodeButtons.clear()}},getButtonByKey:function(G){if(this.keyCodeButtons.length>0){var H=this.keyCodeButtons,J=null;for(var F=0,I=H.length;F<I;F++){J=H[F];if(J.keyCode==G){return J}}}return null},onDocumentKeydown:function(C){var D=this.getButtonByKey(C.keyCode);if(D!==null){D.handler();Event.stop(C)}if(C.keyCode==Event.KEY_ESC){this.onClickCloseButton()}},setupDimensions:function(){var G=this.dimensions.viewport.height/2+this.pagePosition.y;var J=this.dimensions.viewport.width/2+this.pagePosition.x;var L=this.windowElement.down(1).getDimensions();var K=L.width,H=L.height;var I=(G-parseFloat(H)/2);if(I<=0){I=this.fixTopHeight}this.windowElement.setStyle({position:"absolute",top:I+"px",left:(J-parseFloat(K)/2)+"px",zIndex:this.overlay?parseInt(this.overlay.getStyle("zIndex"))+1:Windows.getZIndex()})}});function $alert(E,H,F,G){new Dialog({windowClassName:"w295",content:'<div class="tc bold">'+E+"</div>",buttonRegionClass:"tc pb12 pt15",buttons:[{title:"确定",keyCode:Event.KEY_RETURN,buttonStyle:"btn_square_hover mr15",callback:function(A){if(H){H(A)}A.close()}.bind(this)}],onClickCloseCallback:F||Prototype.emptyFunction,closeTimeout:G||-1})}function $tip(C,D){$alert(C,null,null,D)}function $confirm(H,G,E,F){new Dialog({windowClassName:"w295",content:'<div class="tc bold">'+H+"</div>",buttonRegionClass:"tc pb12 pt15",buttons:[{title:"确定",keyCode:Event.KEY_RETURN,buttonStyle:"btn_square_hover mr15",callback:function(A){if(G){G(A)}A.close()}.bind(this)},{title:"取消",buttonStyle:"btn_square",callback:function(A){if(E){E(A)}A.close()}.bind(this)}],onClickCloseCallback:F||Prototype.emptyFunction})}var DialogBoxs={dialogs:[],unregister:function(B){this.dialogs=this.dialogs.reject(function(A){return A==B})},register:function(B){if(!this.dialogs.include(B)){this.dialogs.push(B)}},isRegistered:function(B){return this.dialogs.include(B)}};var DialogBox=Class.create();Object.extend(Object.extend(DialogBox.prototype,Window.prototype),{options:{title:"",content:"",width:"",element:null,isInOverflowContainer:false,buttons:null,readyCallback:null,closeCallback:null,isToggleTroubleElement:false,isAutoClose:true,positionType:0},initialize:function(C){this.setOptions(C);if(DialogBoxs.isRegistered(this.element)){return }DialogBoxs.register(this.element);var D=new Date().getTime();this.id="dialogBox_"+D;this.titleId="dialogBoxTitle_"+D;this.contentId="dialogBoxContent_"+D;this.buttonRegionId="dialogBoxButtonRegion_"+D;this.createOverlay=false;this.buttonNodes=[];this.buttonHandlers=[];this.getPosition();this.initializeDOM();this.initializeEvent();this.open();if(this.readyCallback!==null){this.readyCallback(this)}},addDOM:function(){var D="";switch(this.positionType){case 0:D="directiontl";break;case 1:D="directiontr";break;case 2:D="directionbl";break;case 3:D="directionbr";break;default:D="directiontl";break}var C="";if(this.width&&this.width.length!==0){C="width:"+this.width}this.windowElement=Builder.node("div",{id:this.id,className:"eject_outer",style:("display:none;"+C)},[Builder.node("div",{className:"eject"},[Builder.node("p",{className:D}),this.content!==""?(typeof this.content==="string"?Builder.build(this.content):this.content):"",Builder.node("p",{id:this.buttonRegionId,className:"mt15"},[])])]);this.initializeWindowElement()},initializeWindowElement:function(){var B=this.getContainer();B.appendChild(this.windowElement);this.windowElement=$(this.windowElement)},destroyWindowElement:function(){if(this.windowElement!==null){var B=this.getContainer();B.removeChild(this.windowElement);this.windowElement=null}},getPosition:function(){if(this.element){var S=this.element;Position.prepare();var V=Position.cumulativeOffset(S);var P=S.getDimensions();var U=V[0],L=V[1];if(this.isInOverflowContainer){var T=Position.realOffset(S);var M=T[0],O=T[1];U=U-M+Position.deltaX;L=L-O+Position.deltaY}this.elementWidth=P.width;this.elementHeight=P.height;this.getScroll();this.getPageDimensions();this.browserDimensions();var R=this.dimensions.viewport.width/2+this.pagePosition.x;var N=this.dimensions.viewport.height/2+this.pagePosition.y;var Q=null;if(U<=R&&L<=N){this.positionType=0}else{if(U>=R&&L<=N){this.positionType=1}else{if(U<=R&&L>=N){this.positionType=2}else{if(U>=R&&L>=N){this.positionType=3}}}}this.elementX=U;this.elementY=L}},setupDimensions:function(){var T=0,Q=0;var O=this.windowElement.getDimensions();var M=O.width;var N=O.height;var K=this.elementX+this.elementWidth/2;var L=this.elementY;var R=K;var S=L+this.elementHeight;switch(this.positionType){case 0:T=R-47;Q=S+17;break;case 1:T=R-(M-47);Q=S+17;break;case 2:T=K-47;Q=L-17-N;break;case 3:T=K-(M-47);Q=L-17-N;break;default:T=R-47;Q=S+17;break}var P=0;if(this.overlay){P=parseInt(this.overlay.getStyle("zIndex"),10)+1}else{P=Windows.getZIndex()+1}this.windowElement.setStyle({position:"absolute",top:Q+"px",left:T+"px",zIndex:P})},removeDOM:function(){this.title=null;this.buttonRegion=null;this.removeButtons();this.destroyWindowElement()},initializeDOM:function(){this.addDOM();this.windowElement=$(this.windowElement);this.title=$(this.titleId);this.buttonRegion=$(this.buttonRegionId);if(this.buttons){for(var C=0,D=this.buttons.length;C<D;C++){this.addButton(this.buttons[C])}}},addButton:function(I){var G=I.onmouseover||"";var J=I.onmouseout||"";var F=Element.extend(Builder.node("input",{type:"button",value:I.title,className:I.buttonStyle,onmouseover:G,onmouseout:J},[]));var H=function(){I.callback(this,F)}.bind(this);F.observe("click",H);this.buttonRegion.appendChild(F);this.buttonNodes.push(F);this.buttonHandlers.push(H)},removeButtons:function(){if(this.buttonNodes&&this.buttonHandlers&&this.buttonNodes.length==this.buttonHandlers.length){for(var C=0,D=this.buttonNodes.length;C<D;C++){this.buttonNodes[C].stopObserving("click",this.buttonHandlers[C])}}},initializeEvent:function(){if(this.isAutoClose){this.onClickHandler=this.onClick.bindAsEventListener(this);Event.observe(document.body,"click",this.onClickHandler)}},destroyEvent:function(){Event.stopObserving(document.body,"click",this.onClickHandler);if(this.closeCallback!==null){this.closeCallback(this)}},onClick:function(H){var E=Event.pointerX(H);var F=Event.pointerY(H);var G=Event.element(H);if(G!=this.element&&!G.descendantOf(this.element)&&!G.descendantOf(this.windowElement)&&!Position.within(this.windowElement,E,F)){this.close()}},dispose:function(){DialogBoxs.unregister(this.element);this.destroyEvent();this.removeDOM();this.buttonNodes.clear();this.buttonNodes=null;this.buttonHandlers.clear();this.buttonHandlers=null}});var BoxBase=Class.create();Object.extend(BoxBase.prototype,{options:{boxRegion:null,closeButton:null,timeout:0,onClickCloseCallback:null,offsetX:0,offsetY:0},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.timeoutId=null;this.setOptions(B);this.initializeDOM();this.initializeEvent();this.initializeBox();this.timeout=this.timeout*1000},initializeDOM:function(){this.boxRegion=$(this.boxRegion);this.closeButton=$(this.closeButton)},destroyDOM:function(){this.boxRegion=null;this.closeButton=null},initializeBox:function(){},destroyBox:function(){},initializeEvent:function(){if(this.closeButton){this.onClickCloseButtonHandler=this.onClickCloseButton.bindAsEventListener(this);this.closeButton.observe("click",this.onClickCloseButtonHandler)}Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){if(this.closeButton){this.closeButton.stopObserving("click",this.onClickCloseButtonHandler)}},onClickCloseButton:function(){if(this.onClickCloseCallback){this.onClickCloseCallback(this)}this.hide()},show:function(){if(!this.boxRegion.visible()){this.boxRegion.show()}this._handleTimeout()},hide:function(){if(this.boxRegion.visible()){this.boxRegion.hide()}},_handleTimeout:function(){if(this.boxRegion.visible()&&this.timeout>0){clearTimeout(this.timeoutId);this.timeoutId=setTimeout(this.hide.bind(this),this.timeout)}},closed:false,close:function(){if(!this.closed){this.closed=true;if(this.timeoutId!==null){clearTimeout(this.timeoutId)}this.hide();this.destroyBox();this.destroyEvent();this.destroyDOM()}}});var HintBox=Class.create();Object.extend(Object.extend(HintBox.prototype,BoxBase.prototype),{initializeBox:function(){this.hint=$(this.hint)},destroyBox:function(){this.hint=null},set:function(B){this.hint.innerHTML=B;this.show();this.boxRegion.scrollTo()}});var FloatHintBox=Class.create();Object.extend(Object.extend(FloatHintBox.prototype,BoxBase.prototype),{getContainer:function(){var B=$("contentEnd");if(typeof B==="undefined"||B===null){B=document.getElementsByTagName("body")[0]}return B},initializeBox:function(){Windows.register(this);this.element=$(this.element);this.boxRegion=Element.extend(Builder.node("div",{className:"bubble",style:"display:none;"},[Builder.node("div",{className:"bubble_inner"},[Builder.node("p",{className:"bubble_g"}),Builder.node("p",{className:"c_a5"},[this.message])])]));this.hint=Element.extend(this.boxRegion.getElementsByTagName("p")[1]);var I=Position.cumulativeOffset(this.element);var J=this.element.getDimensions();var K=I[0],L=I[1];var G=this.offsetX||0;var H=this.offsetY||0;this.boxRegion.setStyle({position:"absolute",left:(K+J.width+20)+G+"px",top:L+H+"px",zIndex:Windows.getZIndex()});this.getContainer().appendChild(this.boxRegion)},destroyBox:function(){Windows.unregister(this);this.element=null;this.getContainer().removeChild(this.boxRegion)},set:function(C,D){this.hint.innerHTML=D;this.hint.className=C;if(D.length===0){this.hide()}else{this.show()}}});var Tooltips={tooltips:[],unregister:function(B){this.tooltips=this.tooltips.reject(function(A){return A==B})},register:function(B){if(!this.tooltips.include(B)){this.tooltips.push(B)}},isRegistered:function(B){return this.tooltips.include(B)}};Window.TooltipWindow=Class.create();Object.extend(Object.extend(Window.TooltipWindow.prototype,Window.prototype),{isOpen:false,isObserveMouse:true,observeCloseEvent:false,options:{element:null,isInOverflowContainer:false},initialize:function(C){this.setOptions(C);if(!Tooltips.isRegistered(this.element)){Tooltips.register(this.element);var D=new Date().getTime();this.id="tooltipWindow_"+D;this.isFocus=false;this.createOverlay=false;this.isObserveMouse=this.element.tagName.toLowerCase()!=="input";this.initializeDOM();this.initializeControl();this.initializeEvent()}},addDOM:function(){},removeDOM:function(){this.wrapElement.removeChild(this.windowElement);var B=this.getContainer();B.removeChild(this.wrapElement);this.wrapElement=null;this.windowElement=null;this.element=null},initializeDOM:function(){this.addDOM();this.windowElement=$(this.windowElement);this.element=$(this.element);this.wrapElement=Element.extend(Builder.node("div",{},[""]));this.wrapElement.appendChild(this.windowElement);var B=this.getContainer();B.appendChild(this.wrapElement);this.wrapElement.setStyle({zoom:1})},initializeEvent:function(){Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){},initializeControl:function(){this.observer=new Observer({sourceElement:this.element,onOverSourceCallback:this.show.bind(this),onOutSourceCallback:this.hide.bind(this),onOverTargetCallback:this.show.bind(this),onOutTargetCallback:this.hide.bind(this)})},destroyControl:function(){this.observer.close()},setupDimensions:function(){var a=0,o=0,m=this.element,b=this.zIndex;Position.prepare();var Z=Position.cumulativeOffset(m);var l=Z[0],n=Z[1];if(this.isInOverflowContainer){var V=Position.realOffset(m);var j=V[0],k=V[1];l=l-j+Position.deltaX;n=n-k+Position.deltaY}var p=m.getDimensions();var X=p.width;var c=p.height;var f=this.windowElement.getDimensions();var U=f.width;var h=f.height;var d=l+X/2;var g=n;var W=d;var Y=g+c;a=d-30;o=g-17-h;if(this.overlay){b=parseInt(this.overlay.getStyle("zIndex"))+1}else{b++}this.windowElement.setStyle({position:"absolute",top:o+"px",left:a+"px",zIndex:b});this.elementX=l;this.elementY=n;this.elementWidth=X;this.elementHeight=c;this.windowX=o;this.windowY=a;this.windowWidth=U;this.windowHeight=h},show:function(){if(!this.isOpen){this.isOpen=true;this.open();this.observer.targetElement=this.windowElement;this.observer.initializeTargetEvent()}else{this.setupDimensions();this.showWindow()}},hide:function(){this.hideWindow()},dispose:function(){Tooltips.unregister(this.element);this.hide();this.destroyControl();this.destroyEvent();this.removeDOM()}});var Tracker=Class.create();Object.extend(Tracker.prototype,{PAGE_TRACK_URL:"http://log.mtime.cn/_t.gif",PAGE_CLICK_URL:"http://log1.mtime.cn/_t.gif",AD_TRACK_URL:"http://log2.mtime.cn/_t.gif",AD_CLICK_URL:"http://log2.mtime.cn/_t.gif",options:{siteId:0,title:"",observeRegionStyle:"__r_c_",observeAdStyle:"__a_c_",args:null},setOptions:function(B){Object.extend(Object.extend(this,this.options),B)},initialize:function(B){this.setOptions(B);this.initializeField();this.initializeDOM();this.initializeEvent();this.load()},initializeField:function(){this.observeAds=[];this.onClickAdHandlers=[]},initializeDOM:function(){},destroyDOM:function(){},initializeEvent:function(){if(this.observeRegionStyle.length>0){var I=Element.extend(document.body).readAttribute("pn");if(I&&I!==null&&I.length>0){var M=[],P=null;var N=document.getElementsByClassName(this.observeRegionStyle),O=null,J=null;for(var L=0,K=N.length;L<K;L++){O=Element.extend(N[L]);J=O.readAttribute("pan");if(J&&J!==null&&J.length>0){P=this.onClickPageArea.bindAsEventListener(this,I,J);M.push(P);Event.observe(O,"mousedown",P)}}this.observeRegions=N;this.onClickPageAreaHandlers=M}}Event.observe(window,"unload",this.close.bind(this))},destroyEvent:function(){if(this.observeRegions&&this.observeRegions.length>0){var G=this.observeRegions;var L=this.onClickPageAreaHandlers;for(var K=0,J=G.length;K<J;K++){Event.stopObserving(G[K],"mousedown",L[K])}}if(this.observeAds&&this.observeAds.length>0){var H=this.observeAds;var I=this.onClickAdHandlers;for(var K=0,J=H.length;K<J;K++){Event.stopObserving(H[K],"mousedown",I[K])}}},load:function(){},onClickPageArea:function(F,D,E){if(!F._handle&&D&&D!==null&&D.length>0&&E&&E!==null&&E.length>0){F._handle=true;this.trackClick(D,E)}},onClickAd:function(C,D){this.trackAdClick(D)},trackPageView:function(){var B=new StringBuilder();B.append(this.PAGE_TRACK_URL);this.getBaseParam(B);if(this.args!==null){B.append(String.format("&args={0}",encodeURIComponent(this.args)))}this.log(B.toString())},trackClick:function(D,F){var E=new StringBuilder();E.append(this.PAGE_CLICK_URL);this.getBaseParam(E);E.append(String.format("&pn={0}",D));E.append(String.format("&pan={0}",F));this.log(E.toString())},trackAdView:function(D,E){if(typeof E==="string"){var F=new StringBuilder();F.append(this.AD_TRACK_URL);this.getBaseParam(F);F.append(String.format("&t={0}",0));F.append(String.format("&an={0}",E));this.log(F.toString())}},observeAdClick:function(F,E){var D=this.onClickAd.bindAsEventListener(this,E);Event.observe(F,"mousedown",D);this.observeAds.push(F);this.onClickAdHandlers.push(D)},trackAdClick:function(D){if(typeof D==="string"){var C=new StringBuilder();C.append(this.AD_CLICK_URL);this.getBaseParam(C);C.append(String.format("&t={0}",1));C.append(String.format("&an={0}",D));this.log(C.toString())}},getBaseParam:function(E){var D=this.getBrowser();E.append(String.format("?url={0}",encodeURIComponent(document.location.href)));E.append(String.format("&u={0}",this.getUserCode()));E.append(String.format("&uId={0}",this.getUserId()));E.append(String.format("&w={0}",screen.width));E.append(String.format("&h={0}",screen.height));E.append(String.format("&r={0}",encodeURIComponent(this.getReferrer())));E.append(String.format("&b={0}",D.type));E.append(String.format("&bVer={0}",D.ver));var F=this.getUserIdentity();E.append(String.format("&u2={0}",F.id));E.append(String.format("&isNew={0}",F.isNewbie))},getReferrer:function(){var D="";try{D=top.document.referrer}catch(E){if(parent){try{D=parent.document.referrer}catch(F){D=""}}}if(D===""){D=document.referrer}return D},getBrowser:function(){var F=Mtime.browser,E=0,D=0;if(F.ie>0){E=1;D=F.ie}else{if(F.gecko>0){E=2;D=F.gecko}else{if(F.opera>0){E=3;D=F.opera}else{if(F.webkit>0){E=4;D=F.webkit}}}}return{type:E,ver:D}},getUserCode:function(){var E=getCookie("_userCode_");if(E===null||E.length===0){var F=new Date(),D=[];D.push(F.getFullYear());D.push(F.getMonth()+1);D.push(F.getDate());D.push(F.getHours());D.push(F.getMinutes());D.push(F.getSeconds());D.push(parseInt(Math.random()*10000,10));E=D.join("");setCookie("_userCode_",E)}return E},getUserIdentity:function(){var F=getCookie("_userIdentity_"),G=false;if(F===null||F.length===0){G=true;var H=new Date(),E=[];E.push(H.getFullYear());E.push(H.getMonth()+1);E.push(H.getDate());E.push(H.getHours());E.push(H.getMinutes());E.push(H.getSeconds());E.push(parseInt(Math.random()*10000,10));F=E.join("");setCookie("_userIdentity_",F)}return{id:F,isNewbie:G}},getUserId:function(){var I=getCookie("MtimeCookie");if(I!==null||I.length!==0){var G=I.split("&"),H="UserId=",K;if(G.length>0){for(var L=0,J=G.length;L<J;L++){K=G[L];if(K.startsWith(H)){return K.substring(H.length)}}}}return""},log:function(F){var D=new Date(),E=new Image(1,1);E.onLoad=function(){};E.src=F+"&r="+Math.random()},setCookie:function(G,H){var J=new Date();var I=new Date(J.toDateString());var F=new Date();F.setTime(I.getTime()+3600*1000*1);document.cookie=G+"="+escape(H)+";path=/;expires="+F.toUTCString()+";domain="+mtimeCookieDomain+";"},isClosed:false,close:function(){if(!this.isClosed){this.isClosed=true;this.destroyEvent();this.destroyDOM()}}});