function debug(A){if(typeof (console)!="undefined"){console.log(A)}else{alert(A)}}var Iteration={BREAK:{},CONTINUE:{}};Object.extend=function(A,C){for(var B in C){A[B]=C[B]}return A};Object.inherit=function(C,D){function B(){}B.prototype=C;var A=new B();return Object.extend(A,D)};Object.isEmpty=function(B){for(var A in B){return false}return true};Object.each=function(D,B){for(var A in D){try{B.call(D[A],A,D)}catch(C){if(C===Iteration.BREAK){break}if(C===Iteration.CONTINUE){continue}throw C}}return D};Object.apply=function(E,C){var A=Object.extend({},(E));for(var B in E){try{A[B]=C.call(E[B],B,E)}catch(D){if(D===Iteration.BREAK){break}if(D===Iteration.CONTINUE){continue}throw D}}return A};Object.invoke=function(E){var B=arguments[1];var D=[].concat($a(arguments));D.splice(0,2);for(var A in E){try{B.apply(E[A],D)}catch(C){if(C===Iteration.BREAK){break}if(C===Iteration.CONTINUE){continue}throw C}}return E};Object.toQuery=function(B){var A="";for(var C in B){A+=C+"="+encodeURIComponent(B[C].toString())+"&"}return(A=="")?A:A.substr(0,A.length-1)};Object.serialize=function(D){var B="";for(var E in D){var C=D[E];if(C instanceof C.constructor&&C.constructor===Object){B+=E+"={"+Object.serialize(C)+"}&"}else{if(C instanceof C.constructor&&C.constructor===Array){B+=E+"={"+C.serialize()+"}&"}else{var A=(typeof C==="function")?encodeURIComponent(C.toString()).replace(/%0A/g,""):encodeURIComponent(C.toString());B+=E+"="+A+"&"}}}return(B=="")?B:B.substr(0,B.length-1)};Array.prototype=Object.extend(Array.prototype,{isEmpty:function(){return this.length==0},serialize:function(){var D="";for(var C=0,A=this.length;C0){switch(this[F]){case"{":D++;break;case"}":D--;break}H+=this[F]}else{J.push(H);H=""}F++}if(H!==""){J.push(H)}var A={};for(var C=0,E=J.length;C';delete D.name}var C=document.createElement(B);for(var A in D){if(A==="class"){C.className=D[A]}else{C.setAttribute(A,D[A])}}return $(C)}Element.prototype={__IS_EXTENDED:true,__ANIMATION_MSPF:20,__ANIMATION_INTERVAL:null,__ADDED_LISTENER:{},__OBSERVING_PROPERTIES:{},__SELF:function(){return this},remove:function(){this.purge().parentNode.removeChild(this);return this},removeChildren:function(A){if(A){this.$$("> "+A).invoke(Element.prototype.remove)}else{while(this.hasChildNodes()){$(this.lastChild).remove()}}return this},sortChildren:function(D,A){if(A){var B=this.$$("> "+A)}else{var B=$a(this.childNodes).find(function(){return this.nodeType===1})}B.sort(D);var C=this;B.each(function(){C.appendChild(this)});return this},replace:function(A){$(A).purge().parentNode.replaceChild(this,A);return this},purge:function(){if(this.__AnimationTimer){clearTimeout(this.__AnimationTimer)}for(var A in this){if(typeof this[A]==="function"){this[A]=null}}return this},addChild:function(){for(var B=0,A=arguments.length;B"){return H.call(this,L)}if(!$(this).matchSelector(N)){return }if(L===""){return[this]}var O=(L.indexOf(">")===0)?this.childNodes:this.getElementsByTagName("*");for(var M=0;M=|<|>|=).*)?\])?/);if(matched[1]&&matched[1].toUpperCase()!=this.tagName){return false}if(matched[3]&&matched[3]!=this.getAttribute("id")){return false}if(matched[4]){var classNameArray=matched[4].match(/[^.]+/g);for(var i=0,len=classNameArray.length;i=A){var Q=Object.apply(N,function(R){return I(R)});L.setCSS(Q);if(P.onAnime){P.onAnime.call(L,(G-J)/G)}J-=A}else{L.setCSS(N);L.stopAnimeCSS();if(P.onComplete){P.onComplete.call(L)}}}new function(){L.__ANIMATION_INTERVAL=setInterval(K,A)};return L},stopAnimeCSS:function(){if(this.__ANIMATION_INTERVAL){clearInterval(this.__ANIMATION_INTERVAL);this.__ANIMATION_INTERVAL=null}return this},applyEffect:function(B,A){B.call(this,A);return this}};function $(A){var B=(typeof (A)=="string")?((document.getElementById)?document.getElementById(A):document.all[A]):A;if(!B){return null}if(B.__IS_EXTENDED&&B.__SELF&&B.__SELF()==B){return B}return Object.extend(B,Element.prototype)}document.getElementsBySelector=function(A){return $(document.documentElement).getElementsBySelector(A)};function $$(A){return document.getElementsBySelector(A)};