var Prototype={Version:"1.6.0.2",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,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div").__proto__&&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}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var I=null,G=$A(arguments);if(Object.isFunction(G[0])){I=G.shift()}function J(){this.initialize.apply(this,arguments)}Object.extend(J,Class.Methods);J.superclass=I;J.subclasses=[];if(I){var F=function(){};F.prototype=I.prototype;
J.prototype=new F;I.subclasses.push(J)}for(var H=0;H<G.length;H++){J.addMethods(G[H])}if(!J.prototype.initialize){J.prototype.initialize=Prototype.emptyFunction}J.prototype.constructor=J;return J}};Class.Methods={addMethods:function(P){var I=this.superclass&&this.superclass.prototype;var J=Object.keys(P);if(!Object.keys({toString:true}).length){J.push("toString","valueOf")}for(var O=0,N=J.length;O<N;O++){var K=J[O],M=P[K];if(I&&Object.isFunction(M)&&M.argumentNames().first()=="$super"){var L=M,M=Object.extend((function(A){return function(){return I[A].apply(this,arguments)}})(K).wrap(L),{valueOf:function(){return L},toString:function(){return L.toString()}})}this.prototype[K]=M}return this}};var Abstract={};Object.extend=function(F,D){for(var E in D){F[E]=D[E]}return F};Object.extend(Object,{inspect:function(C){try{if(Object.isUndefined(C)){return"undefined"}if(C===null){return"null"}return C.inspect?C.inspect():String(C)}catch(D){if(D instanceof RangeError){return"..."}throw D}},toJSON:function(J){var F=typeof J;
switch(F){case"undefined":case"function":case"unknown":return ;case"boolean":return J.toString()}if(J===null){return"null"}if(J.toJSON){return J.toJSON()}if(Object.isElement(J)){return }var G=[];for(var H in J){var I=Object.toJSON(J[H]);if(!Object.isUndefined(I)){G.push(H.toJSON()+": "+I)}}return"{"+G.join(", ")+"}"},toQueryString:function(B){return $H(B).toQueryString()},toHTML:function(B){return B&&B.toHTML?B.toHTML():String.interpret(B)},keys:function(F){var D=[];for(var E in F){D.push(E)}return D},values:function(F){var D=[];for(var E in F){D.push(F[E])}return D},clone:function(B){return Object.extend({},B)},isElement:function(B){return B&&B.nodeType==1},isArray:function(B){return B!=null&&typeof B=="object"&&"splice" in B&&"join" in B},isHash:function(B){return B instanceof Hash},isFunction:function(B){return typeof B=="function"},isString:function(B){return typeof B=="string"},isNumber:function(B){return typeof B=="number"},isUndefined:function(B){return typeof B=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var B=this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip");
return B.length==1&&!B[0]?[]:B},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var D=this,E=$A(arguments),F=E.shift();return function(){return D.apply(F,E.concat($A(arguments)))}},bindAsEventListener:function(){var D=this,E=$A(arguments),F=E.shift();return function(A){return D.apply(F,[A||window.event].concat(E))}},curry:function(){if(!arguments.length){return this}var C=this,D=$A(arguments);return function(){return C.apply(this,D.concat($A(arguments)))}},delay:function(){var D=this,F=$A(arguments),E=F.shift()*1000;return window.setTimeout(function(){return D.apply(D,F)},E)},wrap:function(D){var C=this;return function(){return D.apply(this,[C.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var B=this;return this._methodized=function(){return B.apply(null,[this].concat($A(arguments)))}}});Function.prototype.defer=Function.prototype.delay.curry(0.01);Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'
};var Try={these:function(){var J;for(var I=0,H=arguments.length;I<H;I++){var F=arguments[I];try{J=F();break}catch(G){}}return J}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(B){return String(B).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({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)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return }clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}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(J,F){var G="",H=this,I;F=arguments.callee.prepareReplacement(F);
while(H.length>0){if(I=H.match(J)){G+=H.slice(0,I.index);G+=String.interpret(F(I));H=H.slice(I.index+I[0].length)}else{G+=H,H=""}}return G},sub:function(D,E,F){E=this.gsub.prepareReplacement(E);F=Object.isUndefined(F)?1:F;return this.gsub(D,function(A){if(--F<0){return A[0]}return E(A)})},scan:function(D,C){this.gsub(D,C);return String(this)},truncate:function(D,C){D=D||30;C=Object.isUndefined(C)?"...":C;return this.length>D?this.slice(0,D-C.length)+C:String(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 C=new RegExp(Prototype.ScriptFragment,"img");var D=new RegExp(Prototype.ScriptFragment,"im");return(this.match(C)||[]).map(function(A){return(A.match(D)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(a){return eval(a)})},escapeHTML:function(){var B=arguments.callee;B.text.data=this;
return B.div.innerHTML},unescapeHTML:function(){var B=new Element("div");B.innerHTML=this.stripTags();return B.childNodes[0]?(B.childNodes.length>1?$A(B.childNodes).inject("",function(A,D){return A+D.nodeValue}):B.childNodes[0].nodeValue):""},toQueryParams:function(D){var C=this.strip().match(/([^?#]*)(#.*)?$/);if(!C){return{}}return C[1].split(D||"&").inject({},function(G,H){if((H=H.split("="))[0]){var A=decodeURIComponent(H.shift());var B=H.length>1?H.join("="):H[0];if(B!=undefined){B=decodeURIComponent(B)}if(A in G){if(!Object.isArray(G[A])){G[A]=[G[A]]}G[A].push(B)}else{G[A]=B}}return G})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(B){return B<1?"":new Array(B+1).join(this)},camelize:function(){var G=this.split("-"),H=G.length;if(H==1){return G[0]}var E=this.charAt(0)=="-"?G[0].charAt(0).toUpperCase()+G[0].substring(1):G[0];for(var F=1;F<H;F++){E+=G[F].charAt(0).toUpperCase()+G[F].substring(1)
}return E},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(A){var B=String.specialChar[A[0]];return B?B:"\\u00"+A[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;if(B.blank()){return false}B=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(B)},evalJSON:function(a){var b=this.unfilterJSON();try{if(!a||b.isJSON()){return eval("("+b+")")}}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)},interpolate:function(D,C){return new Template(this,C).evaluate(D)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(C){if(Object.isFunction(C)){return C}var D=new Template(C);return function(A){return D.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({initialize:function(D,C){this.template=D.toString();
this.pattern=C||Template.Pattern},evaluate:function(B){if(Object.isFunction(B.toTemplateReplacements)){B=B.toTemplateReplacements()}return this.template.gsub(this.pattern,function(K){if(B==null){return""}var L=K[1]||"";if(L=="\\"){return K[2]}var A=B,I=K[3];var H=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;K=H.exec(I);if(K==null){return L}while(K!=null){var J=K[1].startsWith("[")?K[2].gsub("\\\\]","]"):K[1];A=A[J];if(null==A||""==K[3]){break}I=I.substring("["==K[3]?K[1].length:K[0].length);K=H.exec(I)}return L+String.interpret(A)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(E,F){var G=0;E=E.bind(F);try{this._each(function(A){E(A,G++)})}catch(H){if(H!=$break){throw H}}return this},eachSlice:function(L,G,H){G=G?G.bind(H):Prototype.K;var J=-L,K=[],I=this.toArray();while((J+=L)<I.length){K.push(I.slice(J,J+L))}return K.collect(G,H)},all:function(E,F){E=E?E.bind(F):Prototype.K;var D=true;this.each(function(A,B){D=D&&!!E(A,B);if(!D){throw $break}});return D},any:function(E,F){E=E?E.bind(F):Prototype.K;
var D=false;this.each(function(A,B){if(D=!!E(A,B)){throw $break}});return D},collect:function(E,F){E=E?E.bind(F):Prototype.K;var D=[];this.each(function(A,B){D.push(E(A,B))});return D},detect:function(E,F){E=E.bind(F);var D;this.each(function(A,B){if(E(A,B)){D=A;throw $break}});return D},findAll:function(E,F){E=E.bind(F);var D=[];this.each(function(A,B){if(E(A,B)){D.push(A)}});return D},grep:function(F,G,H){G=G?G.bind(H):Prototype.K;var E=[];if(Object.isString(F)){F=new RegExp(F)}this.each(function(A,B){if(F.match(A)){E.push(G(A,B))}});return E},include:function(C){if(Object.isFunction(this.indexOf)){if(this.indexOf(C)!=-1){return true}}var D=false;this.each(function(A){if(A==C){D=true;throw $break}});return D},inGroupsOf:function(C,D){D=Object.isUndefined(D)?null:D;return this.eachSlice(C,function(A){while(A.length<C){A.push(D)}return A})},inject:function(E,F,D){F=F.bind(D);this.each(function(A,B){E=F(E,A,B)});return E},invoke:function(C){var D=$A(arguments).slice(1);return this.map(function(A){return A[C].apply(A,D)
})},max:function(E,F){E=E?E.bind(F):Prototype.K;var D;this.each(function(A,B){A=E(A,B);if(D==null||A>=D){D=A}});return D},min:function(E,F){E=E?E.bind(F):Prototype.K;var D;this.each(function(A,B){A=E(A,B);if(D==null||A<D){D=A}});return D},partition:function(F,G){F=F?F.bind(G):Prototype.K;var H=[],E=[];this.each(function(A,B){(F(A,B)?H:E).push(A)});return[H,E]},pluck:function(C){var D=[];this.each(function(A){D.push(A[C])});return D},reject:function(E,F){E=E.bind(F);var D=[];this.each(function(A,B){if(!E(A,B)){D.push(A)}});return D},sortBy:function(D,C){D=D.bind(C);return this.map(function(A,B){return{value:A,criteria:D(A,B)}}).sort(function(A,B){var G=A.criteria,H=B.criteria;return G<H?-1:G>H?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var E=Prototype.K,D=$A(arguments);if(Object.isFunction(D.last())){E=D.pop()}var F=[this].concat(D).map($A);return this.map(function(A,B){return E(F.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,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(F){if(!F){return[]}if(F.toArray){return F.toArray()}var D=F.length||0,E=new Array(D);while(D--){E[D]=F[D]}return E}if(Prototype.Browser.WebKit){$A=function(F){if(!F){return[]}if(!(Object.isFunction(F)&&F=="[object NodeList]")&&F.toArray){return F.toArray()}var D=F.length||0,E=new Array(D);while(D--){E[D]=F[D]}return E}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(D){for(var F=0,E=this.length;F<E;F++){D(this[F])}},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(Object.isArray(C)?C.flatten():[C])
})},without:function(){var B=$A(arguments);return this.select(function(A){return !B.include(A)})},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(E,F,A){if(0==A||(B?E.last()!=F:!E.include(F))){E.push(F)}return E})},intersect:function(B){return this.uniq().findAll(function(A){return B.detect(function(D){return A===D})})},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(A){var D=Object.toJSON(A);if(!Object.isUndefined(D)){B.push(D)}});return"["+B.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(F,E){E||(E=0);var D=this.length;if(E<0){E=D+E}for(;E<D;E++){if(this[E]===F){return E}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(D,F){F=isNaN(F)?this.length:(F<0?this.length+F:F)+1;
var E=this.slice(0,F).reverse().indexOf(D);return(E<0)?E:F-E-1}}Array.prototype.toArray=Array.prototype.clone;function $w(B){if(!Object.isString(B)){return[]}B=B.strip();return B?B.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var F=[];for(var I=0,H=this.length;I<H;I++){F.push(this[I])}for(var I=0,H=arguments.length;I<H;I++){if(Object.isArray(arguments[I])){for(var J=0,G=arguments[I].length;J<G;J++){F.push(arguments[I][J])}}else{F.push(arguments[I])}}return 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(F,D){var E=this.toString(D||10);return"0".times(F-E.length)+E},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(B){Number.prototype[B]=Math[B].methodize()});function $H(B){return new Hash(B)}var Hash=Class.create(Enumerable,(function(){function B(A,D){if(Object.isUndefined(D)){return A
}return A+"="+encodeURIComponent(String.interpret(D))}return{initialize:function(A){this._object=Object.isHash(A)?A.toObject():Object.clone(A)},_each:function(G){for(var H in this._object){var A=this._object[H],F=[H,A];F.key=H;F.value=A;G(F)}},set:function(A,D){return this._object[A]=D},get:function(A){return this._object[A]},unset:function(A){var D=this._object[A];delete this._object[A];return D},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(D){var A=this.detect(function(C){return C.value===D});return A&&A.key},merge:function(A){return this.clone().update(A)},update:function(A){return new Hash(A).inject(this,function(E,F){E.set(F.key,F.value);return E})},toQueryString:function(){return this.map(function(E){var F=encodeURIComponent(E.key),A=E.value;if(A&&typeof A=="object"){if(Object.isArray(A)){return A.map(B.curry(F)).join("&")}}return B(F,A)}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(A){return A.map(Object.inspect).join(": ")
}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(F,D,E){this.start=F;this.end=D;this.exclusive=E},_each:function(D){var C=this.start;while(this.include(C)){D(C);C=C.succ()}},include:function(B){if(B<this.start){return false}if(this.exclusive){return B<this.end}return B<=this.end}});var $R=function(F,D,E){return new ObjectRange(F,D,E)};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(E,F,G,H){this.each(function(B){if(Object.isFunction(B[E])){try{B[E].apply(B,[F,G,H])
}catch(A){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(B){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,B||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,C,D){$super(D);this.transport=Ajax.getTransport();this.request(C)},request:function(H){this.url=H;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=Object.toQueryString(E)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+E}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){E+="&_="}}}try{var F=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(F)}Ajax.Responders.dispatch("onCreate",this,F);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}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(G){this.dispatchException(G)}},onStateChange:function(){var B=this.transport.readyState;if(B>1&&!((B==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var F={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){F["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){F.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var G=this.options.requestHeaders;if(Object.isFunction(G.push)){for(var J=0,I=G.length;J<I;J+=2){F[G[J]]=G[J+1]}}else{$H(G).each(function(A){F[A.key]=A.value})}}for(var H in F){this.transport.setRequestHeader(H,F[H])}},success:function(){var B=this.getStatus();return !B||(B>=200&&B<300)},getStatus:function(){try{return this.transport.status||0}catch(B){return 0}},respondToReadyState:function(J){var F=Ajax.Request.Events[J],I=new Ajax.Response(this);if(F=="Complete"){try{this._complete=true;(this.options["on"+I.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(I,I.headerJSON)}catch(H){this.dispatchException(H)}var G=I.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&G&&G.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()
}}try{(this.options["on"+F]||Prototype.emptyFunction)(I,I.headerJSON);Ajax.Responders.dispatch("on"+F,this,I,I.headerJSON)}catch(H){this.dispatchException(H)}if(F=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var B=this.url.match(/^\s*https?:\/\/[^\/]*/);return !B||(B[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(C){try{return this.transport.getResponseHeader(C)||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)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(G){this.request=G;var H=this.transport=G.transport,E=this.readyState=H.readyState;
if((E>2&&!Prototype.Browser.IE)||E==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(H.responseText);this.headerJSON=this._getHeaderJSON()}if(E==4){var F=H.responseXML;this.responseXML=Object.isUndefined(F)?null:F;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(B){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(B){return null}},getResponseHeader:function(B){return this.transport.getResponseHeader(B)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var C=this.getHeader("X-JSON");if(!C){return null}C=decodeURIComponent(escape(C));try{return C.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(D){this.request.dispatchException(D)}},_getResponseJSON:function(){var C=this.request.options;
if(!C.evalJSON||(C.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(C.sanitizeJSON||!this.request.isSameOrigin())}catch(D){this.request.dispatchException(D)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,F,G,H){this.container={success:(F.success||F),failure:(F.failure||(F.success?null:F))};H=Object.clone(H);var E=H.onComplete;H.onComplete=(function(A,B){this.updateContent(A.responseText);if(Object.isFunction(E)){E(A,B)}}).bind(this);$super(G,H)},updateContent:function(H){var E=this.container[this.success()?"success":"failure"],G=this.options;if(!G.evalScripts){H=H.stripScripts()}if(E=$(E)){if(G.insertion){if(Object.isString(G.insertion)){var F={};F[G.insertion]=H;E.insert(F)}else{G.insertion(E,H)}}else{E.update(H)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,D,E,F){$super(F);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);this.updater={};this.container=D;this.url=E;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(B){if(this.options.decay){this.decay=(B.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=B.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(E){if(arguments.length>1){for(var H=0,F=[],G=arguments.length;H<G;H++){F.push($(arguments[H]))}return F}if(Object.isString(E)){E=document.getElementById(E)}return Element.extend(E)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(L,G){var H=[];var I=document.evaluate(L,$(G)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var K=0,J=I.snapshotLength;K<J;K++){H.push(Element.extend(I.snapshotItem(K)))}return H}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var B=this.Element;this.Element=function(E,F){F=F||{};E=E.toLowerCase();var A=Element.cache;if(Prototype.Browser.IE&&F.name){E="<"+E+' name="'+F.name+'">';delete F.name;return Element.writeAttribute(document.createElement(E),F)}if(!A[E]){A[E]=Element.extend(document.createElement(E))}return Element.writeAttribute(A[E].cloneNode(false),F)};Object.extend(this.Element,B||{})}).call(window);Element.cache={};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){D=$(D);if(C&&C.toElement){C=C.toElement()}if(Object.isElement(C)){return D.update().insert(C)}C=Object.toHTML(C);D.innerHTML=C.stripScripts();C.evalScripts.bind(C).defer();return D},replace:function(F,D){F=$(F);if(D&&D.toElement){D=D.toElement()}else{if(!Object.isElement(D)){D=Object.toHTML(D);var E=F.ownerDocument.createRange();E.selectNode(F);D.evalScripts.bind(D).defer();D=E.createContextualFragment(D.stripScripts())}}F.parentNode.replaceChild(D,F);return F},insert:function(N,H){N=$(N);if(Object.isString(H)||Object.isNumber(H)||Object.isElement(H)||(H&&(H.toElement||H.toHTML))){H={bottom:H}}var I,L,M,J;for(var K in H){I=H[K];K=K.toLowerCase();L=Element._insertionTranslations[K];if(I&&I.toElement){I=I.toElement()}if(Object.isElement(I)){L(N,I);continue}I=Object.toHTML(I);M=((K=="before"||K=="after")?N.parentNode:N).tagName.toUpperCase();J=Element._getContentFromAnonymousElement(M,I.stripScripts());if(K=="top"||K=="after"){J.reverse()
}J.each(L.curry(N));I.evalScripts.bind(I).defer()}return N},wrap:function(F,D,E){F=$(F);if(Object.isElement(D)){$(D).writeAttribute(E||{})}else{if(Object.isString(D)){D=new Element(D,E)}else{D=new Element("div",D)}}if(F.parentNode){F.parentNode.replaceChild(D,F)}D.appendChild(F);return D},inspect:function(D){D=$(D);var C="<"+D.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(G){var H=G.first(),B=G.last();var A=(D[H]||"").toString();if(A){C+=" "+B+"="+A.inspect(true)}});return C+">"},recursivelyCollect:function(F,D){F=$(F);var E=[];while(F=F[D]){if(F.nodeType==1){E.push(Element.extend(F))}}return E},ancestors:function(B){return $(B).recursivelyCollect("parentNode")},descendants:function(B){return $(B).select("*")},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(Object.isString(C)){C=new Selector(C)}return C.match($(D))},up:function(H,E,F){H=$(H);if(arguments.length==1){return $(H.parentNode)}var G=H.ancestors();return Object.isNumber(E)?G[E]:Selector.findElement(G,E,F)},down:function(F,D,E){F=$(F);if(arguments.length==1){return F.firstDescendant()}return Object.isNumber(D)?F.descendants()[D]:F.select(D)[E||0]},previous:function(H,E,F){H=$(H);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(H))}var G=H.previousSiblings();return Object.isNumber(E)?G[E]:Selector.findElement(G,E,F)},next:function(H,E,F){H=$(H);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(H))}var G=H.nextSiblings();return Object.isNumber(E)?G[E]:Selector.findElement(G,E,F)},select:function(){var C=$A(arguments),D=$(C.shift());return Selector.findChildElements(D,C)},adjacent:function(){var C=$A(arguments),D=$(C.shift());
return Selector.findChildElements(D.parentNode,C).without(D)},identify:function(F){F=$(F);var D=F.readAttribute("id"),E=arguments.callee;if(D){return D}do{D="anonymous_element_"+E.counter++}while($(D));F.writeAttribute("id",D);return D},readAttribute:function(F,D){F=$(F);if(Prototype.Browser.IE){var E=Element._attributeTranslations.read;if(E.values[D]){return E.values[D](F,D)}if(E.names[D]){D=E.names[D]}if(D.include(":")){return(!F.attributes||!F.attributes[D])?null:F.attributes[D].value}}return F.getAttribute(D)},writeAttribute:function(L,G,H){L=$(L);var I={},K=Element._attributeTranslations.write;if(typeof G=="object"){I=G}else{I[G]=Object.isUndefined(H)?true:H}for(var J in I){G=K.names[J]||J;H=I[J];if(K.values[J]){G=K.values[J](L,H)}if(H===false||H===null){L.removeAttribute(G)}else{if(H===true){L.setAttribute(G,G)}else{L.setAttribute(G,H)}}}return L},getHeight:function(B){return $(B).getDimensions().height},getWidth:function(B){return $(B).getDimensions().width},classNames:function(B){return new Element.ClassNames(B)
},hasClassName:function(F,D){if(!(F=$(F))){return }var E=F.className;return(E.length>0&&(E==D||new RegExp("(^|\\s)"+D+"(\\s|$)").test(E)))},addClassName:function(D,C){if(!(D=$(D))){return }if(!D.hasClassName(C)){D.className+=(D.className?" ":"")+C}return D},removeClassName:function(D,C){if(!(D=$(D))){return }D.className=D.className.replace(new RegExp("(^|\\s+)"+C+"(\\s+|$)")," ").strip();return D},toggleClassName:function(D,C){if(!(D=$(D))){return }return D[D.hasClassName(C)?"removeClassName":"addClassName"](C)},cleanWhitespace:function(F){F=$(F);var D=F.firstChild;while(D){var E=D.nextSibling;if(D.nodeType==3&&!/\S/.test(D.nodeValue)){F.removeChild(D)}D=E}return F},empty:function(B){return $(B).innerHTML.blank()},descendantOf:function(L,H){L=$(L),H=$(H);var I=H;if(L.compareDocumentPosition){return(L.compareDocumentPosition(H)&8)===8}if(L.sourceIndex&&!Prototype.Browser.Opera){var J=L.sourceIndex,K=H.sourceIndex,G=H.nextSibling;if(!G){do{H=H.parentNode}while(!(G=H.nextSibling)&&H.parentNode)}if(G&&G.sourceIndex){return(J>K&&J<G.sourceIndex)
}}while(L=L.parentNode){if(L==I){return true}}return false},scrollTo:function(D){D=$(D);var C=D.cumulativeOffset();window.scrollTo(C[0],C[1]);return D},getStyle:function(H,E){H=$(H);E=E=="float"?"cssFloat":E.camelize();var F=H.style[E];if(!F){var G=document.defaultView.getComputedStyle(H,null);F=G?G[E]:null}if(E=="opacity"){return F?parseFloat(F):1}return F=="auto"?null:F},getOpacity:function(B){return $(B).getStyle("opacity")},setStyle:function(J,F){J=$(J);var G=J.style,I;if(Object.isString(F)){J.style.cssText+=";"+F;return F.include("opacity")?J.setOpacity(F.match(/opacity:\s*(\d?\.?\d*)/)[1]):J}for(var H in F){if(H=="opacity"){J.setOpacity(F[H])}else{G[(H=="float"||H=="cssFloat")?(Object.isUndefined(G.styleFloat)?"cssFloat":"styleFloat"):H]=F[H]}}return J},setOpacity:function(D,C){D=$(D);D.style.opacity=(C==1||C==="")?"":(C<0.00001)?0:C;return D},getDimensions:function(P){P=$(P);var I=$(P).getStyle("display");if(I!="none"&&I!=null){return{width:P.offsetWidth,height:P.offsetHeight}}var J=P.style;var K=J.visibility;
var L=J.position;var M=J.display;J.visibility="hidden";J.position="absolute";J.display="block";var N=P.clientWidth;var O=P.clientHeight;J.display=M;J.position=L;J.visibility=K;return{width:N,height:O}},makePositioned:function(D){D=$(D);var C=Element.getStyle(D,"position");if(C=="static"||!C){D._madePositioned=true;D.style.position="relative";if(window.opera){D.style.top=0;D.style.left=0}}return D},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=Element.getStyle(B,"overflow")||"auto";if(B._overflow!=="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},cumulativeOffset:function(F){var D=0,E=0;do{D+=F.offsetTop||0;E+=F.offsetLeft||0;F=F.offsetParent}while(F);return Element._returnOffset(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!=="static"){break}}}while(H);return Element._returnOffset(F,E)},absolutize:function(L){L=$(L);if(L.getStyle("position")=="absolute"){return }var G=L.positionedOffset();var H=G[1];var I=G[0];var J=L.clientWidth;var K=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=J+"px";L.style.height=K+"px";return L},relativize:function(F){F=$(F);if(F.getStyle("position")=="relative"){return }F.style.position="relative";var D=parseFloat(F.style.top||0)-(F._originalTop||0);var E=parseFloat(F.style.left||0)-(F._originalLeft||0);F.style.top=D+"px";F.style.left=E+"px";F.style.height=F._originalHeight;F.style.width=F._originalWidth;return F},cumulativeScrollOffset:function(F){var D=0,E=0;do{D+=F.scrollTop||0;
E+=F.scrollLeft||0;F=F.parentNode}while(F);return Element._returnOffset(E,D)},getOffsetParent: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)},viewportOffset:function(H){var E=0,G=0;var F=H;do{E+=F.offsetTop||0;G+=F.offsetLeft||0;if(F.offsetParent==document.body&&Element.getStyle(F,"position")=="absolute"){break}}while(F=F.offsetParent);F=H;do{if(!Prototype.Browser.Opera||F.tagName=="BODY"){E-=F.scrollTop||0;G-=F.scrollLeft||0}}while(F=F.parentNode);return Element._returnOffset(G,E)},clonePosition:function(L,G){var H=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});G=$(G);var J=G.viewportOffset();L=$(L);var I=[0,0];var K=null;if(Element.getStyle(L,"position")=="absolute"){K=L.getOffsetParent();I=K.viewportOffset()}if(K==document.body){I[0]-=document.body.offsetLeft;I[1]-=document.body.offsetTop
}if(H.setLeft){L.style.left=(J[0]-I[0]+H.offsetLeft)+"px"}if(H.setTop){L.style.top=(J[1]-I[1]+H.offsetTop)+"px"}if(H.setWidth){L.style.width=G.offsetWidth+"px"}if(H.setHeight){L.style.height=G.offsetHeight+"px"}return L}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(G,H,I){switch(I){case"left":case"top":case"right":case"bottom":if(G(H,"position")==="static"){return null}case"height":case"width":if(!Element.visible(H)){return null}var J=parseInt(G(H,I),10);if(J!==H["offset"+I.capitalize()]){return J+"px"}var F;if(I==="height"){F=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{F=["border-left-width","padding-left","padding-right","border-right-width"]}return F.inject(J,function(B,C){var A=G(H,C);
return A===null?B:B-parseInt(A,10)})+"px";default:return G(H,I)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(F,D,E){if(E==="title"){return D.title}return F(D,E)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(H,E){E=$(E);var F=E.getStyle("position");if(F!=="static"){return H(E)}E.setStyle({position:"relative"});var G=H(E);E.setStyle({position:F});return G});$w("positionedOffset viewportOffset").each(function(B){Element.Methods[B]=Element.Methods[B].wrap(function(I,J){J=$(J);var A=J.getStyle("position");if(A!=="static"){return I(J)}var G=J.getOffsetParent();if(G&&G.getStyle("position")==="fixed"){G.setStyle({zoom:1})}J.setStyle({position:"relative"});var H=I(J);J.setStyle({position:A});return H})});Element.Methods.getStyle=function(F,D){F=$(F);D=(D=="float"||D=="cssFloat")?"styleFloat":D.camelize();var E=F.style[D];if(!E&&F.currentStyle){E=F.currentStyle[D]}if(D=="opacity"){if(E=(F.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(E[1]){return parseFloat(E[1])/100
}}return 1}if(E=="auto"){if((D=="width"||D=="height")&&(F.getStyle("display")!="none")){return F["offset"+D.capitalize()]+"px"}return null}return E};Element.Methods.setOpacity=function(G,H){function J(A){return A.replace(/alpha\([^\)]*\)/gi,"")}G=$(G);var I=G.currentStyle;if((I&&!I.hasLayout)||(!I&&G.style.zoom=="normal")){G.style.zoom=1}var K=G.getStyle("filter"),L=G.style;if(H==1||H===""){(K=J(K))?L.filter=K:L.removeAttribute("filter");return G}else{if(H<0.00001){H=0}}L.filter=J(K)+"alpha(opacity="+(H*100)+")";return G};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(D,C){return D.getAttribute(C,2)},_getAttrNode:function(F,D){var E=F.getAttributeNode(D);return E?E.value:""},_getEv:function(D,C){C=D.getAttribute(C);return C?C.toString().slice(23,-2):null},_flag:function(D,C){return $(D).hasAttribute(C)?C:null},style:function(B){return B.style.cssText.toLowerCase()},title:function(B){return B.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(D,C){D.checked=!!C
},style:function(D,C){D.style.cssText=C?C:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc").each(function(B){Element._attributeTranslations.write.names[B.toLowerCase()]=B;Element._attributeTranslations.has[B.toLowerCase()]=B});(function(B){Object.extend(B,{href:B._getAttr,src:B._getAttr,type:B._getAttr,action:B._getAttrNode,disabled:B._flag,checked:B._flag,readonly:B._flag,multiple:B._flag,onload:B._getEv,onunload:B._getEv,onclick:B._getEv,ondblclick:B._getEv,onmousedown:B._getEv,onmouseup:B._getEv,onmouseover:B._getEv,onmousemove:B._getEv,onmouseout:B._getEv,onfocus:B._getEv,onblur:B._getEv,onkeypress:B._getEv,onkeydown:B._getEv,onkeyup:B._getEv,onsubmit:B._getEv,onreset:B._getEv,onselect:B._getEv,onchange:B._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(D,C){D=$(D);D.style.opacity=(C==1)?0.999999:(C==="")?"":(C<0.00001)?0:C;
return D}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(H,E){H=$(H);H.style.opacity=(E==1||E==="")?"":(E<0.00001)?0:E;if(E==1){if(H.tagName=="IMG"&&H.width){H.width++;H.width--}else{try{var F=document.createTextNode(" ");H.appendChild(F);H.removeChild(F)}catch(G){}}}return H};Element.Methods.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 Element._returnOffset(E,D)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(D,E){D=$(D);if(E&&E.toElement){E=E.toElement()}if(Object.isElement(E)){return D.update().insert(E)}E=Object.toHTML(E);var F=D.tagName.toUpperCase();if(F in Element._insertionTranslations.tags){$A(D.childNodes).each(function(A){D.removeChild(A)});Element._getContentFromAnonymousElement(F,E.stripScripts()).each(function(A){D.appendChild(A)})}else{D.innerHTML=E.stripScripts()}E.evalScripts.bind(E).defer();
return D}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(G,H){G=$(G);if(H&&H.toElement){H=H.toElement()}if(Object.isElement(H)){G.parentNode.replaceChild(H,G);return G}H=Object.toHTML(H);var I=G.parentNode,L=I.tagName.toUpperCase();if(Element._insertionTranslations.tags[L]){var J=G.next();var K=Element._getContentFromAnonymousElement(L,H.stripScripts());I.removeChild(G);if(J){K.each(function(A){I.insertBefore(A,J)})}else{K.each(function(A){I.appendChild(A)})}}else{G.outerHTML=H.stripScripts()}H.evalScripts.bind(H).defer();return G}}Element._returnOffset=function(F,E){var D=[F,E];D.left=F;D.top=E;return D};Element._getContentFromAnonymousElement=function(H,E){var F=new Element("div"),G=Element._insertionTranslations.tags[H];if(G){F.innerHTML=G[0]+E+G[1];G[2].times(function(){F=F.firstChild})}else{F.innerHTML=E}return $A(F.childNodes)};Element._insertionTranslations={before:function(D,C){D.parentNode.insertBefore(C,D)},top:function(D,C){D.insertBefore(C,D.firstChild)},bottom:function(D,C){D.appendChild(C)
},after:function(D,C){D.parentNode.insertBefore(C,D.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(F,D){D=Element._attributeTranslations.has[D]||D;var E=$(F).getAttributeNode(D);return E&&E.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.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var E={},D=Element.Methods.ByTag;var F=Object.extend(function(I){if(!I||I._extendedByPrototype||I.nodeType!=1||I==window){return I
}var J=Object.clone(E),C=I.tagName,A,B;if(D[C]){Object.extend(J,D[C])}for(A in J){B=J[A];if(Object.isFunction(B)&&!(A in I)){I[A]=B.methodize()}}I._extendedByPrototype=Prototype.emptyFunction;return I},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(E,Element.Methods);Object.extend(E,Element.Methods.Simulated)}}});F.refresh();return F})();Element.hasAttribute=function(D,C){if(D.hasAttribute){return D.hasAttribute(C)}return Element.Methods.Simulated.hasAttribute(D,C)};Element.addMethods=function(P){var N=Prototype.BrowserFeatures,L=Element.Methods.ByTag;if(!P){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 Q=P;P=arguments[1]}if(!Q){Object.extend(Element.Methods,P||{})}else{if(Object.isArray(Q)){Q.each(O)}else{O(Q)}}function O(A){A=A.toUpperCase();
if(!Element.Methods.ByTag[A]){Element.Methods.ByTag[A]={}}Object.extend(Element.Methods.ByTag[A],P)}function M(B,C,D){D=D||false;for(var E in B){var A=B[E];if(!Object.isFunction(A)){continue}if(!D||!(E in C)){C[E]=A.methodize()}}}function R(B){var C;var A={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(A[B]){C="HTML"+A[B]+"Element"}if(window[C]){return window[C]}C="HTML"+B+"Element";if(window[C]){return window[C]}C="HTML"+B.capitalize()+"Element";if(window[C]){return window[C]}window[C]={};window[C].prototype=document.createElement(B).__proto__;return window[C]}if(N.ElementExtensions){M(Element.Methods,HTMLElement.prototype);
M(Element.Methods.Simulated,HTMLElement.prototype,true)}if(N.SpecificElementExtensions){for(var F in Element.Methods.ByTag){var K=R(F);if(Object.isUndefined(K)){continue}M(L[F],K.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var B={};var D=Prototype.Browser;$w("width height").each(function(A){var C=A.capitalize();B[A]=(D.WebKit&&!document.evaluate)?self["inner"+C]:(D.Opera)?document.body["client"+C]:document.documentElement["client"+C]});return B},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(B){this.expression=B.strip();this.compileMatcher()},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false
}var B=this.expression;if(Prototype.Browser.WebKit&&(B.include("-of-type")||B.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(this.expression)){return false}return true},compileMatcher:function(){if(this.shouldUseXPath()){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(Object.isFunction(c[i])?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(Object.isFunction(L[K])?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(Q){this.tokens=[];var T=this.expression,P=Selector.patterns,M=Selector.assertions;var R,N,X;while(T&&R!==T&&(/\S/).test(T)){R=T;for(var V in P){N=P[V];if(X=T.match(N)){if(M[V]){this.tokens.push([V,Object.clone(X)]);T=T.replace(X[0],"")}else{return this.findElements(document).include(Q)}}}}var S=true,O,U;for(var V=0,W;W=this.tokens[V];V++){O=W[0],U=W[1];if(!Selector.assertions[O](Q,U)){S=false;break}}return S},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:function(B){B[1]=B[1].toLowerCase();return new Template("[@#{1}]").evaluate(B)},attr:function(B){B[1]=B[1].toLowerCase();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(Object.isFunction(D)){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,L,N;
var O=[];while(J&&L!=J&&(/\S/).test(J)){L=J;for(var M in K){if(P=J.match(K[M])){N=Object.isFunction(I[M])?I[M](P):new Template(I[M]).evaluate(P);O.push("("+N.substring(1,N.length-1)+")");J=J.replace(P[0],"");break}}}return"[not("+O.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(I,M){var K,J=M[6],N;if(J=="even"){J="2n+0"}if(J=="odd"){J="2n+1"}if(K=J.match(/^(\d+)$/)){return"["+I+"= "+K[1]+"]"
}if(K=J.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(K[1]=="-"){K[1]=-1}var L=K[1]?Number(K[1]):1;var H=K[2]?Number(K[2]):0;N="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(N).evaluate({fragment:I,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); c = false;',attr:function(B){B[3]=(B[5]||B[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); 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]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(D,C){return C[1].toUpperCase()==D.tagName.toUpperCase()
},className:function(D,C){return Element.hasClassName(D,C[1])},id:function(D,C){return D.id===C[1]},attrPresence:function(D,C){return Element.hasAttribute(D,C[1])},attr:function(F,D){var E=Element.readAttribute(F,D[1]);return E&&Selector.operators[D[2]](E,D[5]||D[6])}},handlers:{concat:function(H,E){for(var G=0,F;F=E[G];G++){H.push(F)}return H},mark:function(H){var E=Prototype.emptyFunction;for(var G=0,F;F=H[G];G++){F._countedByPrototype=E}return H},unmark:function(D){for(var F=0,E;E=D[F];F++){E._countedByPrototype=undefined}return D},index:function(N,H,I){N._countedByPrototype=Prototype.emptyFunction;if(H){for(var J=N.childNodes,L=J.length-1,M=1;L>=0;L--){var K=J[L];if(K.nodeType==1&&(!I||K._countedByPrototype)){K.nodeIndex=M++}}}else{for(var L=0,M=1,J=N.childNodes;K=J[L];L++){if(K.nodeType==1&&(!I||K._countedByPrototype)){K.nodeIndex=M++}}}},unique:function(I){if(I.length==0){return I}var F=[],G;for(var H=0,J=I.length;H<J;H++){if(!(G=I[H])._countedByPrototype){G._countedByPrototype=Prototype.emptyFunction;F.push(Element.extend(G))
}}return Selector.handlers.unmark(F)},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(H){var K=Selector.handlers;for(var L=0,M=[],J;J=H[L];L++){for(var N=0,I;I=J.childNodes[N];N++){if(I.nodeType==1&&I.tagName!="!"){M.push(I)}}}return M},adjacent:function(J){for(var H=0,I=[],G;G=J[H];H++){var F=this.nextElementSibling(G);if(F){I.push(F)}}return I},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(N,O,P,Q){var R=P.toUpperCase();var J=[],K=Selector.handlers;if(N){if(Q){if(Q=="descendant"){for(var L=0,M;M=N[L];L++){K.concat(J,M.getElementsByTagName(P))}return J}else{N=this[Q](N)}if(P=="*"){return N}}for(var L=0,M;M=N[L];L++){if(M.tagName.toUpperCase()===R){J.push(M)
}}return J}else{return O.getElementsByTagName(P)}},id:function(P,I,J,K){var L=$(J),N=Selector.handlers;if(!L){return[]}if(!P&&I==document){return[L]}if(P){if(K){if(K=="child"){for(var O=0,M;M=P[O];O++){if(L.parentNode==M){return[L]}}}else{if(K=="descendant"){for(var O=0,M;M=P[O];O++){if(Element.descendantOf(L,M)){return[L]}}}else{if(K=="adjacent"){for(var O=0,M;M=P[O];O++){if(Selector.handlers.previousElementSibling(L)==M){return[L]}}}else{P=N[K](P)}}}}for(var O=0,M;M=P[O];O++){if(M==L){return[L]}}return[]}return(L&&Element.descendantOf(L,I))?[L]:[]},className:function(H,E,F,G){if(H&&G){H=this[G](H)}return Selector.handlers.byClassName(H,E,F)},byClassName:function(O,I,J){if(!O){O=Selector.handlers.descendant([I])}var K=" "+J+" ";for(var M=0,N=[],L,P;L=O[M];M++){P=L.className;if(P.length==0){continue}if(P==J||(" "+P+" ").include(K)){N.push(L)}}return N},attrPresence:function(N,H,I,J){if(!N){N=H.getElementsByTagName("*")}if(N&&J){N=this[J](N)}var K=[];for(var M=0,L;L=N[M];M++){if(Element.hasAttribute(L,I)){K.push(L)
}}return K},attr:function(P,Q,R,S,T,U){if(!P){P=Q.getElementsByTagName("*")}if(P&&U){P=this[U](P)}var V=Selector.operators[T],M=[];for(var N=0,O;O=P[N];N++){var L=Element.readAttribute(O,R);if(L===null){continue}if(V(L,S)){M.push(O)}}return M},pseudo:function(J,F,G,H,I){if(J&&I){J=this[I](J)}if(!J){J=H.getElementsByTagName("*")}return Selector.pseudos[F](J,G,H)}},pseudos:{"first-child":function(L,G,H){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,G,H){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,H,I){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,D,E){return Selector.pseudos.nth(F,D,E)},"nth-last-child":function(F,D,E){return Selector.pseudos.nth(F,D,E,true)},"nth-of-type":function(F,D,E){return Selector.pseudos.nth(F,D,E,false,true)},"nth-last-of-type":function(F,D,E){return Selector.pseudos.nth(F,D,E,true,true)
},"first-of-type":function(F,D,E){return Selector.pseudos.nth(F,"1",E,false,true)},"last-of-type":function(F,D,E){return Selector.pseudos.nth(F,"1",E,true,true)},"only-of-type":function(H,E,F){var G=Selector.pseudos;return G["last-of-type"](G["first-of-type"](H,E,F),E,F)},getIndices:function(F,D,E){if(F==0){return D>0?[D]:[]}return $R(1,E).inject([],function(A,B){if(0==(B-D)%F&&(B-D)/F>=0){A.push(B)}return A})},nth:function(W,X,Y,Z,a){if(W.length==0){return[]}if(X=="even"){X="2n+0"}if(X=="odd"){X="2n+1"}var b=Selector.handlers,c=[],T=[],R;b.mark(W);for(var d=0,S;S=W[d];d++){if(!S.parentNode._countedByPrototype){b.index(S.parentNode,Z,a);T.push(S.parentNode)}}if(X.match(/^\d+$/)){X=Number(X);for(var d=0,S;S=W[d];d++){if(S.nodeIndex==X){c.push(S)}}}else{if(R=X.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(R[1]=="-"){R[1]=-1}var U=R[1]?Number(R[1]):1;var V=R[2]?Number(R[2]):0;var f=Selector.pseudos.getIndices(U,V,W.length);for(var d=0,S,Q=f.length;S=W[d];d++){for(var e=0;e<Q;e++){if(S.nodeIndex==f[e]){c.push(S)}}}}}b.unmark(W);
b.unmark(T);return c},empty:function(L,G,H){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(P,Q,R){var T=Selector.handlers,O,M;var S=new Selector(Q).findElements(R);T.mark(S);for(var K=0,L=[],N;N=P[K];K++){if(!N._countedByPrototype){L.push(N)}}T.unmark(S);return L},enabled:function(L,G,H){for(var J=0,K=[],I;I=L[J];J++){if(!I.disabled){K.push(I)}}return K},disabled:function(L,G,H){for(var J=0,K=[],I;I=L[J];J++){if(I.disabled){K.push(I)}}return K},checked:function(L,G,H){for(var J=0,K=[],I;I=L[J];J++){if(I.checked){K.push(I)}}return K}},operators:{"=":function(C,D){return C==D},"!=":function(C,D){return C!=D},"^=":function(C,D){return C.startsWith(D)},"$=":function(C,D){return C.endsWith(D)},"*=":function(C,D){return C.include(D)},"~=":function(C,D){return(" "+C+" ").include(" "+D+" ")},"|=":function(C,D){return("-"+C.toUpperCase()+"-").include("-"+D.toUpperCase()+"-")}},split:function(D){var C=[];D.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(A){C.push(A[1].strip())
});return C},matchElements:function(N,H){var I=$$(H),J=Selector.handlers;J.mark(I);for(var K=0,L=[],M;M=N[K];K++){if(M._countedByPrototype){L.push(M)}}J.unmark(I);return L},findElement:function(F,D,E){if(Object.isNumber(D)){E=D;D=false}return Selector.matchElements(F,D||"*")[E||0]},findChildElements:function(L,N){N=Selector.split(N.join(","));var I=[],J=Selector.handlers;for(var K=0,M=N.length,H;K<M;K++){H=new Selector(N[K].strip());J.concat(I,H.findElements(L))}return(M>1)?J.unique(I):I}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(H,E){for(var G=0,F;F=E[G];G++){if(F.tagName!=="!"){H.push(F)}}return H},unmark:function(D){for(var F=0,E;E=D[F];F++){E.removeAttribute("_countedByPrototype")}return D}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(B){$(B).reset();return B},serializeElements:function(I,J){if(typeof J!="object"){J={hash:!!J}}else{if(Object.isUndefined(J.hash)){J.hash=true}}var K,L,H=false,M=J.submit;var N=I.inject({},function(A,B){if(!B.disabled&&B.name){K=B.name;
L=$(B).getValue();if(L!=null&&(B.type!="submit"||(!H&&M!==false&&(!M||K==M)&&(H=true)))){if(K in A){if(!Object.isArray(A[K])){A[K]=[A[K]]}A[K].push(L)}else{A[K]=L}}}return A});return J.hash?N:Object.toQueryString(N)}};Form.Methods={serialize:function(D,C){return Form.serializeElements(Form.getElements(D),C)},getElements:function(B){return $A($(B).getElementsByTagName("*")).inject([],function(A,D){if(Form.Element.Serializers[D.tagName.toLowerCase()]){A.push(Element.extend(D))}return A})},getInputs:function(P,I,J){P=$(P);var L=P.getElementsByTagName("input");if(!I&&!J){return $A(L).map(Element.extend)}for(var O=0,K=[],N=L.length;O<N;O++){var M=L[O];if((I&&M.type!=I)||(J&&M.name!=J)){continue}K.push(Element.extend(M))}return K},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(D){var E=$(D).getElements().findAll(function(A){return"hidden"!=A.type&&!A.disabled});var F=E.findAll(function(A){return A.hasAttribute("tabIndex")&&A.tabIndex>=0
}).sortBy(function(A){return A.tabIndex}).first();return F?F:E.find(function(A){return["input","select","textarea"].include(A.tagName.toLowerCase())})},focusFirstElement:function(B){B=$(B);B.findFirstElement().activate();return B},request:function(H,E){H=$(H),E=Object.clone(E||{});var F=E.parameters,G=H.readAttribute("action")||"";if(G.blank()){G=window.location.href}E.parameters=H.serialize(true);if(F){if(Object.isString(F)){F=F.toQueryParams()}Object.extend(E.parameters,F)}if(H.hasAttribute("method")&&!E.method){E.method=H.method}return new Ajax.Request(G,E)}};Form.Element={focus:function(B){$(B).focus();return B},select:function(B){$(B).select();return B}};Form.Element.Methods={serialize:function(F){F=$(F);if(!F.disabled&&F.name){var D=F.getValue();if(D!=undefined){var E={};E[F.name]=D;return Object.toQueryString(E)}}return""},getValue:function(D){D=$(D);var C=D.tagName.toLowerCase();return Form.Element.Serializers[C](D)},setValue:function(F,D){F=$(F);var E=F.tagName.toLowerCase();Form.Element.Serializers[E](F,D);
return F},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(D,C){switch(D.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(D,C);default:return Form.Element.Serializers.textarea(D,C)}},inputSelector:function(D,C){if(Object.isUndefined(C)){return D.checked?D.value:null}else{D.checked=!!C}},textarea:function(D,C){if(Object.isUndefined(C)){return D.value}else{D.value=C}},select:function(N,H){if(Object.isUndefined(H)){return this[N.type=="select-one"?"selectOne":"selectMany"](N)}else{var I,K,J=!Object.isArray(H);for(var M=0,L=N.length;M<L;M++){I=N.options[M];
K=this.optionValue(I);if(J){if(K==H){I.selected=true;return }}else{I.selected=H.include(K)}}}},selectOne:function(D){var C=D.selectedIndex;return C>=0?this.optionValue(D.options[C]):null},selectMany:function(J){var F,H=J.length;if(!H){return null}for(var I=0,F=[];I<H;I++){var G=J.options[I];if(G.selected){F.push(this.optionValue(G))}}return F},optionValue:function(B){return Element.extend(B).hasAttribute("value")?B.value:B.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,D,E,F){$super(F,E);this.element=$(D);this.lastValue=this.getValue()},execute:function(){var B=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(B)?this.lastValue!=B:String(this.lastValue)!=String(B)){this.callback(this.element,B);this.lastValue=B}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(D,C){this.element=$(D);
this.callback=C;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,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(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}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,KEY_INSERT:45,cache:{},relatedTarget:function(D){var C;
switch(D.type){case"mouseover":C=D.fromElement;break;case"mouseout":C=D.toElement;break;default:return null}return Element.extend(C)}});Event.Methods=(function(){var D;if(Prototype.Browser.IE){var C={0:1,1:4,2:2};D=function(A,B){return A.button==C[B]}}else{if(Prototype.Browser.WebKit){D=function(A,B){switch(B){case 0:return A.which==1&&!A.metaKey;case 1:return A.which==1&&A.metaKey;default:return false}}}else{D=function(A,B){return A.which?(A.which===B+1):(A.button===B)}}}return{isLeftClick:function(A){return D(A,0)},isMiddleClick:function(A){return D(A,1)},isRightClick:function(A){return D(A,2)},element:function(A){var B=Event.extend(A).target;return Element.extend(B.nodeType==Node.TEXT_NODE?B.parentNode:B)},findElement:function(G,H){var A=Event.element(G);if(!H){return A}var B=[A].concat(A.ancestors());return Selector.findElement(B,H,0)},pointer:function(A){return{x:A.pageX||(A.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),y:A.pageY||(A.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}
},pointerX:function(A){return Event.pointer(A).x},pointerY:function(A){return Event.pointer(A).y},stop:function(A){Event.extend(A);A.preventDefault();A.stopPropagation();A.stopped=true}}})();Event.extend=(function(){var B=Object.keys(Event.Methods).inject({},function(D,A){D[A]=Event.Methods[A].methodize();return D});if(Prototype.Browser.IE){Object.extend(B,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(A){if(!A){return false}if(A._extendedByPrototype){return A}A._extendedByPrototype=Prototype.emptyFunction;var D=Event.pointer(A);Object.extend(A,{target:A.srcElement,relatedTarget:Event.relatedTarget(A),pageX:D.x,pageY:D.y});return Object.extend(A,B)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(Event.prototype,B);return Prototype.K}})();Object.extend(Event,(function(){var R=Event.cache;function L(A){if(A._prototypeEventID){return A._prototypeEventID[0]
}arguments.callee.id=arguments.callee.id||1;return A._prototypeEventID=[++arguments.callee.id]}function P(A){if(A&&A.include(":")){return"dataavailable"}return A}function M(A){return R[A]=R[A]||{}}function Q(B,C){var A=M(B);return A[C]=A[C]||[]}function O(C,E,F){var A=L(C);var D=Q(A,E);if(D.pluck("handler").include(F)){return false}var B=function(G){if(!Event||!Event.extend||(G.eventName&&G.eventName!=E)){return false}Event.extend(G);F.call(C,G)};B.handler=F;D.push(B);return B}function N(C,A,B){var D=Q(C,A);return D.find(function(E){return E.handler==B})}function K(B,C,A){var D=M(B);if(!D[C]){return false}D[C]=D[C].without(N(B,C,A))}function J(){for(var A in R){for(var B in R[A]){R[A][B]=null}}}if(window.attachEvent){window.attachEvent("onunload",J)}return{observe:function(B,C,D){B=$(B);var E=P(C);var A=O(B,C,D);if(!A){return B}if(B.addEventListener){B.addEventListener(E,A,false)}else{B.attachEvent("on"+E,A)}return B},stopObserving:function(C,D,E){C=$(C);var F=L(C),B=P(D);if(!E&&D){Q(F,D).each(function(G){C.stopObserving(D,G.handler)
});return C}else{if(!D){Object.keys(M(F)).each(function(G){C.stopObserving(G)});return C}}var A=N(F,D,E);if(!A){return C}if(C.removeEventListener){C.removeEventListener(B,A,false)}else{C.detachEvent("on"+B,A)}K(F,D,E);return C},fire:function(B,C,D){B=$(B);if(B==document&&document.createEvent&&!B.dispatchEvent){B=document.documentElement}var A;if(document.createEvent){A=document.createEvent("HTMLEvents");A.initEvent("dataavailable",true,true)}else{A=document.createEventObject();A.eventType="ondataavailable"}A.eventName=C;A.memo=D||{};if(document.createEvent){B.dispatchEvent(A)}else{B.fireEvent(A.eventType,A)}return Event.extend(A)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var C;function D(){if(document.loaded){return }if(C){window.clearInterval(C)
}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){C=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){D()}},0);Event.observe(window,"load",D)}else{document.addEventListener("DOMContentLoaded",D,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;D()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(D,C){return Element.insert(D,{before:C})},Top:function(D,C){return Element.insert(D,{top:C})},Bottom:function(D,C){return Element.insert(D,{bottom:C})},After:function(D,C){return Element.insert(D,{after:C})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');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},within:function(F,D,E){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(F,D,E)}this.xcomp=D;this.ycomp=E;this.offset=Element.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(G,H,F){var E=Element.cumulativeScrollOffset(G);this.xcomp=H+E[0]-this.deltaX;this.ycomp=F+E[1]-this.deltaY;this.offset=Element.cumulativeOffset(G);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+G.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+G.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}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(B){Position.prepare();
return Element.absolutize(B)},relativize:function(B){Position.prepare();return Element.relativize(B)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(F,D,E){E=E||{};return Element.clonePosition(D,F,E)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(D){function C(A){return A.blank()?null:"[contains(concat(' ', @class, ' '), ' "+A+" ')]"}D.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(B,F){F=F.toString().strip();var A=/\s/.test(F)?$w(F).map(C).join(""):C(F);return A?document._getElementsByXPath(".//*"+A,B):[]}:function(P,A){A=A.toString().strip();var L=[],M=(/\s/.test(A)?$w(A):null);if(!M&&!A){return L}var N=$(P).getElementsByTagName("*");A=" "+A+" ";for(var O=0,B,K;B=N[O];O++){if(B.className&&(K=" "+B.className+" ")&&(K.include(A)||(M&&M.all(function(E){return !E.toString().blank()&&K.include(" "+E+" ")})))){L.push(Element.extend(B))}}return L};return function(A,B){return $(B||document.body).getElementsByClassName(A)
}}(Element.Methods)}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);Element.addMethods();var Scriptaculous={Version:"1.8.1",require:function(B){document.write('<script type="text/javascript" src="'+B+'"><\/script>')},REQUIRED_PROTOTYPE:"1.6.0",load:function(){function C(B){var A=B.split(".");return parseInt(A[0])*100000+parseInt(A[1])*1000+parseInt(A[2])}if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(C(Prototype.Version)<C(Scriptaculous.REQUIRED_PROTOTYPE))){throw ("script.aculo.us requires the Prototype JavaScript framework >= "+Scriptaculous.REQUIRED_PROTOTYPE)
}var D=/(proto|scripta)culous[a-z0-9._-]*\.js(\?.*)?$/;$A(document.getElementsByTagName("script")).findAll(function(A){return(A.src&&A.src.match(D))}).each(function(B){var F=B.src.replace(D,"");var A=(B.src.match(/\?.*load=([a-z,]*)/)||["",""])[1];A.split(",").without("").each(function(E){Scriptaculous.require(F+E+".js")})})}};String.prototype.parseColor=function(){var A="#";if(this.slice(0,4)=="rgb("){var C=this.slice(4,this.length-1).split(",");var B=0;do{A+=parseInt(C[B]).toColorPart()}while(++B<3)}else{if(this.slice(0,1)=="#"){if(this.length==4){for(var B=1;B<4;B++){A+=(this.charAt(B)+this.charAt(B)).toLowerCase()}}if(this.length==7){A=this.toLowerCase()}}}return(A.length==7?A:(arguments[0]||this))};Element.collectTextNodes=function(A){return $A($(A).childNodes).collect(function(B){return(B.nodeType==3?B.nodeValue:(B.hasChildNodes()?Element.collectTextNodes(B):""))}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(B,A){return $A($(B).childNodes).collect(function(C){return(C.nodeType==3?C.nodeValue:((C.hasChildNodes()&&!Element.hasClassName(C,A))?Element.collectTextNodesIgnoreClass(C,A):""))
}).flatten().join("")};Element.setContentZoom=function(A,B){A=$(A);A.setStyle({fontSize:(B/100)+"em"});if(Prototype.Browser.WebKit){window.scrollBy(0,0)}return A};Element.getInlineOpacity=function(A){return $(A).style.opacity||""};Element.forceRerendering=function(C){try{C=$(C);var B=document.createTextNode(" ");C.appendChild(B);C.removeChild(B)}catch(A){}};var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(A){return(-Math.cos(A*Math.PI)/2)+0.5},reverse:function(A){return 1-A},flicker:function(A){var A=((-Math.cos(A*Math.PI)/4)+0.75)+Math.random()/4;return A>1?1:A},wobble:function(A){return(-Math.cos(A*Math.PI*(9*A))/2)+0.5},pulse:function(A,B){B=B||5;return(((A%(1/B))*B).round()==0?((A*B*2)-(A*B*2).floor()):1-((A*B*2)-(A*B*2).floor()))},spring:function(A){return 1-(Math.cos(A*4.5*Math.PI)*Math.exp(-A*6))},none:function(A){return 0},full:function(A){return 1
}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(A){var B="position:relative";if(Prototype.Browser.IE){B+=";zoom:1"}A=$(A);$A(A.childNodes).each(function(C){if(C.nodeType==3){C.nodeValue.toArray().each(function(D){A.insertBefore(new Element("span",{style:B}).update(D==" "?String.fromCharCode(160):D),C)});Element.remove(C)}})},multiple:function(D,C){var B;if(((typeof D=="object")||Object.isFunction(D))&&(D.length)){B=D}else{B=$(D).childNodes}var A=Object.extend({speed:0.1,delay:0},arguments[2]||{});var E=A.delay;$A(B).each(function(F,G){new C(F,Object.extend(A,{delay:G*A.speed+E}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(A,C){A=$(A);C=(C||"appear").toLowerCase();var B=Object.extend({queue:{position:"end",scope:(A.id||"global"),limit:1}},arguments[2]||{});Effect[A.visible()?Effect.PAIRS[C][1]:Effect.PAIRS[C][0]](A,B)}};Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];
this.interval=null},_each:function(A){this.effects._each(A)},add:function(A){var C=new Date().getTime();var B=Object.isString(A.options.queue)?A.options.queue:A.options.queue.position;switch(B){case"front":this.effects.findAll(function(D){return D.state=="idle"}).each(function(D){D.startOn+=A.finishOn;D.finishOn+=A.finishOn});break;case"with-last":C=this.effects.pluck("startOn").max()||C;break;case"end":C=this.effects.pluck("finishOn").max()||C;break}A.startOn+=C;A.finishOn+=C;if(!A.options.queue.limit||(this.effects.length<A.options.queue.limit)){this.effects.push(A)}if(!this.interval){this.interval=setInterval(this.loop.bind(this),15)}},remove:function(A){this.effects=this.effects.reject(function(B){return B==A});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var A=new Date().getTime();for(var B=0,C=this.effects.length;B<C;B++){this.effects[B]&&this.effects[B].loop(A)}}});Effect.Queues={instances:$H(),get:function(A){if(!Object.isString(A)){return A}return this.instances.get(A)||this.instances.set(A,new Effect.ScopedQueue())
}};Effect.Queue=Effect.Queues.get("global");Effect.Base=Class.create({position:null,start:function(c){function codeForEvent(a,b){return((a[b+"Internal"]?"this.options."+b+"Internal(this);":"")+(a[b]?"this.options."+b+"(this);":""))}if(c&&c.transition===false){c.transition=Effect.Transitions.linear}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),c||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;eval('this.render = function(pos){ if (this.state=="idle"){this.state="running";'+codeForEvent(this.options,"beforeSetup")+(this.setup?"this.setup();":"")+codeForEvent(this.options,"afterSetup")+'};if (this.state=="running"){pos=this.options.transition(pos)*'+this.fromToDelta+"+"+this.options.from+";this.position=pos;"+codeForEvent(this.options,"beforeUpdate")+(this.update?"this.update(pos);":"")+codeForEvent(this.options,"afterUpdate")+"}}");
this.event("beforeStart");if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).add(this)}},loop:function(A){if(A>=this.startOn){if(A>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish()}this.event("afterFinish");return }var C=(A-this.startOn)/this.totalTime,B=(C*this.totalFrames).round();if(B>this.currentFrame){this.render(C);this.currentFrame=B}}},cancel:function(){if(!this.options.sync){Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this)}this.state="finished"},event:function(A){if(this.options[A+"Internal"]){this.options[A+"Internal"](this)}if(this.options[A]){this.options[A](this)}},inspect:function(){var A=$H();for(property in this){if(!Object.isFunction(this[property])){A.set(property,this[property])}}return"#<Effect:"+A.inspect()+",options:"+$H(this.options).inspect()+">"}});Effect.Parallel=Class.create(Effect.Base,{initialize:function(A){this.effects=A||[];
this.start(arguments[1])},update:function(A){this.effects.invoke("render",A)},finish:function(A){this.effects.each(function(B){B.render(1);B.cancel();B.event("beforeFinish");if(B.finish){B.finish(A)}B.event("afterFinish")})}});Effect.Tween=Class.create(Effect.Base,{initialize:function(F,E,C){F=Object.isString(F)?$(F):F;var B=$A(arguments),D=B.last(),A=B.length==5?B[3]:null;this.method=Object.isFunction(D)?D.bind(F):Object.isFunction(F[D])?F[D].bind(F):function(G){F[D]=G};this.start(Object.extend({from:E,to:C},A||{}))},update:function(A){this.method(A)}});Effect.Event=Class.create(Effect.Base,{initialize:function(){this.start(Object.extend({duration:0},arguments[0]||{}))},update:Prototype.emptyFunction});Effect.Opacity=Class.create(Effect.Base,{initialize:function(A){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}var B=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});
this.start(B)},update:function(A){this.element.setOpacity(A)}});Effect.Move=Class.create(Effect.Base,{initialize:function(A){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}var B=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(B)},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(A){this.element.setStyle({left:(this.options.x*A+this.originalLeft).round()+"px",top:(this.options.y*A+this.originalTop).round()+"px"})}});Effect.MoveBy=function(A,C,B){return new Effect.Move(A,Object.extend({x:B,y:C},arguments[3]||{}))};Effect.Scale=Class.create(Effect.Base,{initialize:function(A,C){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}var B=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:C},arguments[2]||{});
this.start(B)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(B){this.originalStyle[B]=this.element.style[B]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var A=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(B){if(A.indexOf(B)>0){this.fontSize=parseFloat(A);this.fontSizeType=B}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box"){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(A){var B=(this.options.scaleFrom/100)+(this.factor*A);if(this.options.scaleContent&&this.fontSize){this.element.setStyle({fontSize:this.fontSize*B+this.fontSizeType})
}this.setDimensions(this.dims[0]*B,this.dims[1]*B)},finish:function(A){if(this.restoreAfterFinish){this.element.setStyle(this.originalStyle)}},setDimensions:function(A,E){var C={};if(this.options.scaleX){C.width=E.round()+"px"}if(this.options.scaleY){C.height=A.round()+"px"}if(this.options.scaleFromCenter){var D=(A-this.dims[0])/2;var B=(E-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){C.top=this.originalTop-D+"px"}if(this.options.scaleX){C.left=this.originalLeft-B+"px"}}else{if(this.options.scaleY){C.top=-D+"px"}if(this.options.scaleX){C.left=-B+"px"}}}this.element.setStyle(C)}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(A){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}var B=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(B)},setup:function(){if(this.element.getStyle("display")=="none"){this.cancel();return }this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");
this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor){this.options.endcolor=this.element.getStyle("background-color").parseColor("#ffffff")}if(!this.options.restorecolor){this.options.restorecolor=this.element.getStyle("background-color")}this._base=$R(0,2).map(function(A){return parseInt(this.options.startcolor.slice(A*2+1,A*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(A){return parseInt(this.options.endcolor.slice(A*2+1,A*2+3),16)-this._base[A]}.bind(this))},update:function(A){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(C,D,B){return C+((this._base[B]+(this._delta[B]*A)).round().toColorPart())}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(C){var B=arguments[1]||{},A=document.viewport.getScrollOffsets(),D=$(C).cumulativeOffset(),E=document.viewport.getScrollOffsets[0]-document.viewport.getHeight();if(B.offset){D[1]+=B.offset}return new Effect.Tween(null,A.top,D[1]>E?E:D[1],B,function(F){scrollTo(A.left,F.round())
})};Effect.Fade=function(C){C=$(C);var B=C.getInlineOpacity();var A=Object.extend({from:C.getOpacity()||1,to:0,afterFinishInternal:function(D){if(D.options.to!=0){return }D.element.hide().setStyle({opacity:B})}},arguments[1]||{});return new Effect.Opacity(C,A)};Effect.Appear=function(B){B=$(B);var A=Object.extend({from:(B.getStyle("display")=="none"?0:B.getOpacity()||0),to:1,afterFinishInternal:function(C){C.element.forceRerendering()},beforeSetup:function(C){C.element.setOpacity(C.options.from).show()}},arguments[1]||{});return new Effect.Opacity(B,A)};Effect.Puff=function(B){B=$(B);var A={opacity:B.getInlineOpacity(),position:B.getStyle("position"),top:B.style.top,left:B.style.left,width:B.style.width,height:B.style.height};return new Effect.Parallel([new Effect.Scale(B,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(C){Position.absolutize(C.effects[0].element)},afterFinishInternal:function(C){C.effects[0].element.hide().setStyle(A)
}},arguments[1]||{}))};Effect.BlindUp=function(A){A=$(A);A.makeClipping();return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindDown=function(B){B=$(B);var A=B.getDimensions();return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(C){C.element.undoClipping()}},arguments[1]||{}))};Effect.SwitchOff=function(A){A=$(A);var B=A.getInlineOpacity();return new Effect.Appear(A,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(C){new Effect.Scale(C.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(D){D.element.makePositioned().makeClipping()
},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned().setStyle({opacity:B})}})}},arguments[1]||{}))};Effect.DropOut=function(B){B=$(B);var A={top:B.getStyle("top"),left:B.getStyle("left"),opacity:B.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(B,{x:0,y:100,sync:true}),new Effect.Opacity(B,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(C){C.effects[0].element.makePositioned()},afterFinishInternal:function(C){C.effects[0].element.hide().undoPositioned().setStyle(A)}},arguments[1]||{}))};Effect.Shake=function(D){D=$(D);var C=Object.extend({distance:20,duration:0.5},arguments[1]||{});var B=parseFloat(C.distance);var A=parseFloat(C.duration)/10;var E={top:D.getStyle("top"),left:D.getStyle("left")};return new Effect.Move(D,{x:B,y:0,duration:A,afterFinishInternal:function(F){new Effect.Move(F.element,{x:-B*2,y:0,duration:A*2,afterFinishInternal:function(G){new Effect.Move(G.element,{x:B*2,y:0,duration:A*2,afterFinishInternal:function(H){new Effect.Move(H.element,{x:-B*2,y:0,duration:A*2,afterFinishInternal:function(I){new Effect.Move(I.element,{x:B*2,y:0,duration:A*2,afterFinishInternal:function(J){new Effect.Move(J.element,{x:-B,y:0,duration:A,afterFinishInternal:function(K){K.element.undoPositioned().setStyle(E)
}})}})}})}})}})}})};Effect.SlideDown=function(C){C=$(C).cleanWhitespace();var B=C.down().getStyle("bottom");var A=C.getDimensions();return new Effect.Scale(C,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:B})}},arguments[1]||{}))};Effect.SlideUp=function(C){C=$(C).cleanWhitespace();var B=C.down().getStyle("bottom");var A=C.getDimensions();return new Effect.Scale(C,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(D){D.element.makePositioned();
D.element.down().makePositioned();if(window.opera){D.element.setStyle({top:""})}D.element.makeClipping().show()},afterUpdateInternal:function(D){D.element.down().setStyle({bottom:(D.dims[0]-D.element.clientHeight)+"px"})},afterFinishInternal:function(D){D.element.hide().undoClipping().undoPositioned();D.element.down().undoPositioned().setStyle({bottom:B})}},arguments[1]||{}))};Effect.Squish=function(A){return new Effect.Scale(A,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(B){B.element.makeClipping()},afterFinishInternal:function(B){B.element.hide().undoClipping()}})};Effect.Grow=function(C){C=$(C);var B=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var H={top:C.style.top,left:C.style.left,height:C.style.height,width:C.style.width,opacity:C.getInlineOpacity()};var G=C.getDimensions();var F,A;var E,D;switch(B.direction){case"top-left":F=A=E=D=0;break;case"top-right":F=G.width;
A=D=0;E=-G.width;break;case"bottom-left":F=E=0;A=G.height;D=-G.height;break;case"bottom-right":F=G.width;A=G.height;E=-G.width;D=-G.height;break;case"center":F=G.width/2;A=G.height/2;E=-G.width/2;D=-G.height/2;break}return new Effect.Move(C,{x:F,y:A,duration:0.01,beforeSetup:function(I){I.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(I){new Effect.Parallel([new Effect.Opacity(I.element,{sync:true,to:1,from:0,transition:B.opacityTransition}),new Effect.Move(I.element,{x:E,y:D,sync:true,transition:B.moveTransition}),new Effect.Scale(I.element,100,{scaleMode:{originalHeight:G.height,originalWidth:G.width},sync:true,scaleFrom:window.opera?1:0,transition:B.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(J){J.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(J){J.effects[0].element.undoClipping().undoPositioned().setStyle(H)}},B))}})};Effect.Shrink=function(F){F=$(F);var E=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});
var D={top:F.style.top,left:F.style.left,height:F.style.height,width:F.style.width,opacity:F.getInlineOpacity()};var C=F.getDimensions();var B,A;switch(E.direction){case"top-left":B=A=0;break;case"top-right":B=C.width;A=0;break;case"bottom-left":B=0;A=C.height;break;case"bottom-right":B=C.width;A=C.height;break;case"center":B=C.width/2;A=C.height/2;break}return new Effect.Parallel([new Effect.Opacity(F,{sync:true,to:0,from:1,transition:E.opacityTransition}),new Effect.Scale(F,window.opera?1:0,{sync:true,transition:E.scaleTransition,restoreAfterFinish:true}),new Effect.Move(F,{x:B,y:A,sync:true,transition:E.moveTransition})],Object.extend({beforeStartInternal:function(G){G.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(G){G.effects[0].element.hide().undoClipping().undoPositioned().setStyle(D)}},E))};Effect.Pulsate=function(E){E=$(E);var D=arguments[1]||{};var C=E.getInlineOpacity();var B=D.transition||Effect.Transitions.sinoidal;var A=function(F){return B(1-Effect.Transitions.pulse(F,D.pulses))
};A.bind(B);return new Effect.Opacity(E,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(F){F.element.setStyle({opacity:C})}},D),{transition:A}))};Effect.Fold=function(A){A=$(A);var B={top:A.style.top,left:A.style.left,width:A.style.width,height:A.style.height};A.makeClipping();return new Effect.Scale(A,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(C){new Effect.Scale(A,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(D){D.element.hide().undoClipping().setStyle(B)}})}},arguments[1]||{}))};Effect.Morph=Class.create(Effect.Base,{initialize:function(B){this.element=$(B);if(!this.element){throw (Effect._elementDoesNotExistError)}var A=Object.extend({style:{}},arguments[1]||{});if(!Object.isString(A.style)){this.style=$H(A.style)}else{if(A.style.include(":")){this.style=A.style.parseStyle()}else{this.element.addClassName(A.style);this.style=$H(this.element.getStyles());this.element.removeClassName(A.style);var C=this.element.getStyles();this.style=this.style.reject(function(D){return D.value==C[D.key]
});A.afterFinishInternal=function(D){D.element.addClassName(D.options.style);D.transforms.each(function(E){D.element.style[E.style]=""})}}}this.start(A)},setup:function(){function A(B){if(!B||["rgba(0, 0, 0, 0)","transparent"].include(B)){B="#ffffff"}B=B.parseColor();return $R(0,2).map(function(C){return parseInt(B.slice(C*2+1,C*2+3),16)})}this.transforms=this.style.map(function(D){var C=D[0],F=D[1],E=null;if(F.parseColor("#zzzzzz")!="#zzzzzz"){F=F.parseColor();E="color"}else{if(C=="opacity"){F=parseFloat(F);if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1})}}else{if(Element.CSS_LENGTH.test(F)){var B=F.match(/^([\+\-]?[0-9\.]+)(.*)$/);F=parseFloat(B[1]);E=(B.length==3)?B[2]:null}}}var G=this.element.getStyle(C);return{style:C.camelize(),originalValue:E=="color"?A(G):parseFloat(G||0),targetValue:E=="color"?A(F):F,unit:E}}.bind(this)).reject(function(B){return((B.originalValue==B.targetValue)||(B.unit!="color"&&(isNaN(B.originalValue)||isNaN(B.targetValue))))})},update:function(A){var D={},B,C=this.transforms.length;
while(C--){D[(B=this.transforms[C]).style]=B.unit=="color"?"#"+(Math.round(B.originalValue[0]+(B.targetValue[0]-B.originalValue[0])*A)).toColorPart()+(Math.round(B.originalValue[1]+(B.targetValue[1]-B.originalValue[1])*A)).toColorPart()+(Math.round(B.originalValue[2]+(B.targetValue[2]-B.originalValue[2])*A)).toColorPart():(B.originalValue+(B.targetValue-B.originalValue)*A).toFixed(3)+(B.unit===null?"":B.unit)}this.element.setStyle(D,true)}});Effect.Transform=Class.create({initialize:function(A){this.tracks=[];this.options=arguments[1]||{};this.addTracks(A)},addTracks:function(A){A.each(function(B){B=$H(B);var C=B.values().first();this.tracks.push($H({ids:B.keys().first(),effect:Effect.Morph,options:{style:C}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(A){var E=A.get("ids"),C=A.get("effect"),B=A.get("options");var D=[$(E)||$$(E)].flatten();return D.map(function(F){return new C(F,Object.extend({sync:true},B))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");String.prototype.parseStyle=function(){var B,A=$H();if(Prototype.Browser.WebKit){B=new Element("div",{style:this}).style}else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';B=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(C){if(B[C]){A.set(C,B[C])}});if(Prototype.Browser.IE&&this.include("opacity")){A.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1])}return A};if(document.defaultView&&document.defaultView.getComputedStyle){Element.getStyles=function(A){var B=document.defaultView.getComputedStyle($(A),null);return Element.CSS_PROPERTIES.inject({},function(C,D){C[D]=B[D];return C})}}else{Element.getStyles=function(B){B=$(B);var A=B.currentStyle,C;C=Element.CSS_PROPERTIES.inject({},function(D,E){D[E]=A[E];return D});if(!C.opacity){C.opacity=B.getOpacity()}return C}}Effect.Methods={morph:function(A,B){A=$(A);new Effect.Morph(A,Object.extend({style:B},arguments[2]||{}));
return A},visualEffect:function(B,A,D){B=$(B);var C=A.dasherize().camelize(),E=C.charAt(0).toUpperCase()+C.substring(1);new Effect[E](B,D);return B},highlight:function(A,B){A=$(A);new Effect.Highlight(A,B);return A}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(A){Effect.Methods[A]=function(B,C){B=$(B);Effect[A.charAt(0).toUpperCase()+A.substring(1)](B,C);return B}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(A){Effect.Methods[A]=Element[A]});Element.addMethods(Effect.Methods);window.ilApiLocationHref=document.location.href;window.ilApiLocationHost=document.location.hostname;ImagelooopException=Class.create();ImagelooopException.prototype={isImagelooopException:function(){return true},isException:true,initialize:function(D){for(var C=D.firstChild;C!=null;C=C.nextSibling){if(C.nodeName=="errorCode"){this.errorCode=(C.firstChild!=null)?Math.round(C.firstChild.data):null
}else{if(C.nodeName=="errorType"){this.errorType=(C.firstChild!=null)?C.firstChild.data:null}else{if(C.nodeName=="message"){this.message=(C.firstChild!=null)?C.firstChild.data:null}else{if(C.nodeName=="info"){this.info=(C.firstChild!=null)?C.firstChild.data:null}}}}}},toString:function(){var B="ImagelooopException: "+new Date()+" error #"+this.errorCode+" ("+this.errorType+")";if(this.message){B+=": "+this.message}return B}};Imagelooop=Class.create();Imagelooop.prototype={initialize:function(B){this.apiKey=B;this.baseUrl="httprpc/";this.main=this},copy:function(B){this.main=B.main;this.apiKey=B.apiKey;this.baseUrl=B.baseUrl;if(B){this.base=B}},sortList:function(V,X,N,T){var U=new Array();if(V){var O=V.length;for(var Q=0;Q<O;Q++){U[Q]=V[Q]}for(var S=0;S<O;S++){var P=S;var W=this.metaValue(U[S],X);if(N&&W!=null&&W.toLowerCase){W=W.toLowerCase()}if(T){W+=this.metaValue(U[S],T)}for(var R=S+1;R<O;R++){var Y=this.metaValue(U[R],X);if(N&&Y!=null&&Y.toLowerCase){Y=Y.toLowerCase()}if(T){Y+=this.metaValue(U[R],T)}if(Y<W){W=Y;
P=R}}if(S!=P){var Z=U[P];U[P]=U[S];U[S]=Z}}}return U},metaValue:function(D,F){var E=D.getMetaData();if(!E[F]){return null}return E[F]},makeLooopList:function(K){var G=new Array();if(K){var L=K.length;for(var H=0;H<L;H++){var I=K[H];var J=new Imagelooop.Looop(this,I);G.push(J)}}return G},makeImageList:function(M,L){var H=new Array();if(L){var N=L.length;for(var I=0;I<N;I++){var J=L[I];var K=new Imagelooop.LooopImage(M,J);H.push(K)}}return H},getHttpSessionId:function(){return this.getSessionId()},getSessionId:function(){var C;if(this.base){C=this.base}else{C=this}if(!C.httpSessionID||C.httpSessionID==null){var D=this.rpcCall("imagelooop.getSessionId","");if(D&&D.httpSessionID){C.httpSessionID=D.httpSessionID}}return C.httpSessionID},rpcCall:function(N,W,S,R){while(true){var Q={method:"get",parameters:"apiKey="+encodeURIComponent(this.apiKey)+"&f="+encodeURIComponent(N)+"&h="+encodeURIComponent(window.ilApiLocationHost)+"&rf=json&"+W};var T=this;var M=Ajax.getTransport();try{var P=this.baseUrl;if(W.length>300){Q.method="post"
}if(Q.method=="get"){P+="?"+Q.parameters}if(!S||S==null){try{M.open(Q.method,P,false)}catch(U){throw""+U+" (for sync transport.open() using HTTP "+Q.method.toUpperCase()+" "+P+")"}}else{M.onreadystatechange=function(){switch(M.readyState){case 0:break;case 1:break;case 2:break;case 3:break;case 4:try{var A=T.buildResponse(M,P,N,W,S);try{S(A,R)}catch(C){alert(""+C+" ("+C.message+") in async handler calling "+N+": "+S)}}catch(C){try{S(C,R)}catch(B){alert(""+B+" ("+B.message+") in asnyc handler calling "+N+": "+S)}}break}};try{M.open(Q.method,P,true)}catch(U){throw""+U+" (for async transport.open())"}}if(Q.method=="post"){M.setRequestHeader("Content-type","application/x-www-form-urlencoded")}M.send(Q.method=="post"?Q.parameters:"")}catch(V){var O="call to "+N+' resulted in exception "'+V+'" to '+this.baseUrl;if(V.message){O+=" "+V.message}alert(O);throw O}if(S!=null){return }var X=this.buildResponse(M,P,N,W,S);if("retry"!=X){return X}}},createHtmlTargetHandler:function(C,D){return function(A){document.getElementById(C).innerHTML=A[D]
}},buildResponse:function(transport,url,fname,params,asyncHandler){var ret={transport:transport,isResponse:true,toString:function(){var s="imagelooopResponse:\r\n";s+="source: "+transport.responseText+"\r\n";for(prop in this){s+=prop+": "+this[prop]+"\r\n"}return s}};try{if(!transport.status){var err="transport.status is undefined "+new Date()+" - ready state "+transport.readyState;if(url){err+=" - url="+url}if(fname){err+=" - fname="+fname}if(transport.status){err+=" - response code "+transport.status+" ("+transport.statusText+")"}err+=" - url "+url;throw err}}catch(ex){return ret}switch(transport.status){case 12002:case 12031:if(asyncHandler&&asyncHandler!=null){this.rpcCall(fname,params,asyncHandler)}return"retry";case 200:break;default:var err="HTTP-RPC request failed "+new Date()+" - ready state "+transport.readyState;if(url){err+=" - url="+url}if(fname){err+=" - fname="+fname}if(transport.status){err+=" - response code "+transport.status+" ("+transport.statusText+")"}err+=" - url "+url;throw err}if(transport.getResponseHeader("Content-Type").indexOf("javascript")!=-1){var rval=null;
try{var vn="rval"+new Date().getTime();eval("window['"+vn+"']="+transport.responseText);rval=window[vn];window[vn]=null;if(rval.isException){rval.toString=function(){var msg="ImagelooopException: "+new Date()+" error #"+this.errorCode+" ("+this.errorType+")";if(this.message){msg+=": "+this.message}return msg};rval.isImagelooopException=function(){return true}}else{rval.isResponse=true}if(!rval.isException){return rval}}catch(x){alert(x+"\r\n"+transport.responseText)}if(rval!=null&&rval.isException){throw rval}}if(!transport.responseXML||transport.responseXML==null||transport.responseXML.documentElement==null){var err="transport.responseXML is undefined "+new Date()+" - ready state "+transport.readyState;if(url){err+=" - url="+url}if(fname){err+=" - fname="+fname}if(transport.status){err+=" - response code "+transport.status+" ("+transport.statusText+")"}err+=" - url "+url;throw err}var xml=transport.responseXML;var docEl=xml.documentElement;if(docEl!=null){for(var c=docEl.firstChild;c!=null;c=c.nextSibling){var cnn=c.nodeName;
if(cnn=="response"){for(var rc=c.firstChild;rc!=null;rc=rc.nextSibling){var nn=rc.nodeName;if(nn=="value"){var fc=rc.firstChild;if(fc!=null){ret[c.getAttribute("name")]=this.makeValue(fc.data)}else{ret[c.getAttribute("name")]=null}}else{if(nn=="list"){var lst=this.xmlListContent(rc);ret[c.getAttribute("name")]=lst}else{if(nn=="map"){ret[c.getAttribute("name")]=this.xmlMapContent(rc)}}}}}else{if(cnn=="error"){throw new ImagelooopException(c)}}}}return ret},xmlListContent:function(J){var G=new Array();for(var K=J.firstChild;K!=null;K=K.nextSibling){var H=K.nodeName;if(H=="value"){var L=this.makeValue(K.firstChild.data);G.push(L)}else{if(H=="map"){var I=this.xmlMapContent(K);G.push(I)}}}return G},xmlMapContent:function(I){var G={};for(var H=I.firstChild;H!=null;H=H.nextSibling){if(H.nodeName=="namedvalue"){var J=H.firstChild;if(J!=null){var F=this.makeValue(J.data);G[H.getAttribute("name")]=F}}}return G},makeValue:function(D){var C=Math.round(D);if(Number.NaN==C||C!=D){return D}else{if(D.indexOf("x")!=-1||D.indexOf("X")!=-1||D.indexOf(".")!=-1){return D
}return C}}};Imagelooop.Main=Class.create();Object.extend(Object.extend(Imagelooop.Main.prototype,Imagelooop.prototype),{clear:function(){this.httpSessionId=null},useRTcalls:true,errorTest:function(){var B=this.rpcCall("imagelooop.willNotWork","");return B.text},ping:function(){var B=this.rpcCall("imagelooop.ping","");return B.text},getSessionIdAsync:function(B){this.rpcCall("imagelooop.getSessionId","",B)},isLoggedOn:function(){try{this.getCurrentUserName();return true}catch(B){return false}},clearCurrentUser:function(){this.currentUserInfo=null},currentUser:function(){if(!this.currentUserInfo||this.currentUserInfo==null){try{this.currentUserInfo=this.rpcCall("imagelooop.getCurrentUserName","")}catch(B){this.currentUserInfo=new Object();this.currentUserInfo.failure=B}}if(this.currentUserInfo.failure!=null){throw this.currentUserInfo.failure}},getCurrentUserName:function(){this.currentUser();return this.currentUserInfo.username},getCurrentUserNameNoFail:function(){try{this.currentUser();return this.currentUserInfo.username
}catch(B){return null}},getCurrentUserId:function(){this.currentUser();return this.currentUserInfo.userId},getCurrentUserIdNoFail:function(){try{this.currentUser();return this.currentUserInfo.userId}catch(B){return null}},getCurrentUserNameAsync:function(B){this.rpcCall("imagelooop.getCurrentUserName","",B)},getUserIdByName:function(E,D){var F=this.rpcCall("imagelooop.getUserByName","username="+encodeURIComponent(E),D);if(F&&F.userId){return F.userId}else{return null}},getUserNameById:function(D,F){var E=this.rpcCall("imagelooop.getUserByid","userId="+encodeURIComponent(D),F);return E.username},getDefaultLooopPlayerConfig:function(){return this.rpcCall("imagelooop.getLooopPlayerConfig","")},login:function(E,D){var F=this.rpcCall("imagelooop.login","username="+encodeURIComponent(E)+"&password="+encodeURIComponent(D));this.clear();this.clearCurrentUser();return F.success},loginAsync:function(E,D,F){this.rpcCall("imagelooop.login","username="+encodeURIComponent(E)+"&password="+encodeURIComponent(D),F);this.clear();
this.clearCurrentUser()},logoff:function(){var B=this.rpcCall("imagelooop.logoff","");this.clear();this.clearCurrentUser()},logoffAsync:function(B){this.rpcCall("imagelooop.logoff","",B)},addContact:function(C,D){this.rpcCall("imagelooop.addContact","contactId="+encodeURIComponent(C)+"&contactNameOrEmail="+encodeURIComponent(D))},removeContact:function(C,D){this.rpcCall("imagelooop.removeContact","contactId="+encodeURIComponent(C),D)},getAvailableRenditions:function(){var D=this.rpcCall("imagelooop.getAvailableRenditions","");var C=new Array();return D.renditionKeys},getMyLooops:function(){var I=this.rpcCall("imagelooop.getMyLooops","");var J=new Array();if(I.looopIds){var F=I.looopIds.length;for(var G=0;G<F;G++){var H=I.looopIds[G];J.push(new Imagelooop.Looop(this,H))}}return J},getMyLooopsAsync:function(B){this.rpcCall("imagelooop.getMyLooops","",B)},getLooopsFromResult:function(L){var N=new Array();var H=L.length;for(var I=0;I<H;I++){var K=L[I];var J=K.looopId;var M=new Imagelooop.Looop(this,J);if(K.tags&&K.tags!=null){K.tags+="";
K.tags=K.tags.split(",")}M.metaData=K;N.push(M)}return N},getMyLooopsEx:function(){var B=this.rpcCall("imagelooop.getMyLooopsEx","");return this.getLooopsFromResult(B.looops)},getMyLooopsExAsync:function(B){this.rpcCall("imagelooop.getMyLooopsEx","",B)},getMySubscriptions:function(){var I=this.rpcCall("imagelooop.getMySubscriptions","");var J=new Array();if(I.looopIds){var F=I.looopIds.length;for(var G=0;G<F;G++){var H=I.looopIds[G];J.push(new Imagelooop.Looop(this,H))}}return J},getMySubscriptionsAsync:function(B){this.rpcCall("imagelooop.getMySubscriptions","",B)},getRandomLooops:function(M,P){var J=this;if(P==null){var L=this.rpcCall("imagelooop.getRandomLooops","count="+M);var I=L.looopIds.length;var N=new Array();for(var K=0;K<I;K++){var O=L.looopIds[K];N.push(new Imagelooop.Looop(this,O))}return N}this.rpcCall("imagelooop.getRandomLooops","count="+M,function(A){var D=A.looopIds.length;var B=new Array();for(var E=0;E<D;E++){var C=A.looopIds[E];B.push(new Imagelooop.Looop(J,C))}P(B)})},getRandomImages:function(Q,O){var R=this;
if(O==null){var T=this.rpcCall("imagelooop.getRandomImages","count="+Q);var P=T.looopImageIds.length;var N=new Array();for(var L=0;L<P;L++){var M=T.looopImageIds[L].split(",");var K=new Imagelooop.Looop(this,M[0]);var S=new Imagelooop.LooopImage(K,M[1]);N.push(S)}return N}this.rpcCall("imagelooop.getRandomImages","count="+Q,function(D){var B=D.looopImageIds.length;var E=new Array();for(var C=0;C<B;C++){var F=D.looopImageIds[C].split(",");var A=new Imagelooop.Looop(R,F[0]);var G=new Imagelooop.LooopImage(A,F[1]);E.push(G)}O(E)})},getLooop:function(B){return new Imagelooop.Looop(this,B)},setImageOrder:function(K,G,L){if(!L){L=false}var I="";for(var H=0;H<G.length;H++){I+=("&imageID="+G[H].imageId)}var J=this.rpcCall("imagelooop.setImageOrder","looopID="+K.looopId+I+"&allowDelete="+L)},createLooop:function(D,E){if(E){E=(E+"&")}else{E=""}if(D){E=((E?(E+"&"):"")+"descriptiveName="+encodeURIComponent(D))}var F=this.rpcCall("imagelooop.createLooop",E);return new Imagelooop.Looop(this,F.looopID)},createLooopAsync:function(F,D,E){if(E){E=(E+"&")
}else{E=""}if(D){E=((E?(E+"&"):"")+"descriptiveName="+encodeURIComponent(D))}this.rpcCall("imagelooop.createLooop",E,F)},uploadImagesForm:function(N,L,O,J){N.method="post";N.enctype="multipart/form-data";N.encoding="multipart/form-data";var K=window.ilApiLocationHref;var M=K.lastIndexOf("/");var P=K.substring(0,M+1);var I;if(this.baseUrl.indexOf("http://")==0||this.baseUrl.indexOf("https://")==0){I=this.baseUrl+"?apiKey="+encodeURIComponent(this.apiKey)+"&f=imagelooop.uploadFilesForm&h="+window.ilApiLocationHost}else{I=P+this.baseUrl+"?apiKey="+encodeURIComponent(this.apiKey)+"&f=imagelooop.uploadFilesForm&h="+window.ilApiLocationHost}if(J&&J!=null){I+="&cookie="+encodeURIComponent(J)}if(L){I+="&successPage="+encodeURIComponent(L)}if(O){I+="&failurePage="+encodeURIComponent(O)}N.action=I;N.submit()},uploadUserImageForm:function(I,H,J,G){I.method="post";I.enctype="multipart/form-data";var F=this.baseUrl+"?apiKey="+this.apiKey+"&looopId="+this.looopId+"&f=imagelooop.uploadFilesForm&h="+window.ilApiLocationHost;if(H&&H!=null){F+="&successPage="+encodeURIComponent(H)
}if(J&&J!=null){F+="&failurePage="+encodeURIComponent(J)}if(G&&G!=null){F+="&cookie="+encodeURIComponent(G)}I.action=F;I.action=F;I.submit()},getPlayerDefinitions:function(C){var D=this.rpcCall("imagelooop.getPlayerDefinitions",params,C);if(C!=null){return }D=this.processPlayerDefinitions(D);return D},getSkinCategories:function(F,I,J){var G="";if(F!=null){G+="playerId="+encodeURIComponent(F)}if(I!=null){G+="playerName="+encodeURIComponent(I)}var H=this.rpcCall("imagelooop.getSkinCategories",G,J);if(J!=null){return }H=this.processSkinCategories(H);return H},processPlayerDefinitions:function(G){var J=skinCategoriesResult;var F=J.players;for(var H=0;H<F.length;H++){var I=F[H];F[sk.id]=I}},processSkinCategories:function(M){var N=M;var O=N.categories;var Q=N.skins;for(var K=0;K<Q.length;K++){var R=Q[K];Q[R.id]=R}for(var K=0;K<O.length;K++){var P=O[K];O[P.id]=P;var L=P.skinIds.split(",");P.skins=new Array();for(var T=0;T<L.length;T++){P.skins.push(Q[L[T]])}}for(var K=0;K<O.length;K++){var P=O[K];var S=P.childIds.split(",");
P.children=new Array();for(var T=0;T<S.length;T++){if(S[T].length>0){P.children.push(O[S[T]])}}}return N},toString:function(){return"Imagelooop.Main"}});Imagelooop.Looop=Class.create();Object.extend(Object.extend(Imagelooop.Looop.prototype,Imagelooop.prototype),{initialize:function(C,D){this.copy(C);this.looopId=D},clear:function(){this.metaData=null;this.playerConfig=null},deleteLooop:function(C){if(this.looopId!=null){var D=this.rpcCall("imagelooop.deleteLooop","looopID="+this.looopId,C);return D}else{throw ("You cannot delete a looop, without at least setting the looopId!")}},getCreatedTimestamp:function(){return this.getMetaData().createdTimestamp},getContentCount:function(){return this.getMetaData().contentCount},getContentChangedTimestamp:function(){return this.getMetaData().contentChangedTimestamp},getModifiedTimestamp:function(){return this.getMetaData().modifiedTimestamp},getSaveTimestamp:function(){return this.getMetaData().saveTimestamp},getId:function(){return this.looopId},clearPermissionMap:function(B){if(!B||B==null){this.permissionMap=null
}else{if(this.permissionMap!=null){this.permissionMap[B]=null}}},getPermittedUsers:function(B){if(!this.permissionMap||this.permissionMap==null){this.permissionMap=new Object()}if(!this.permissionMap[B]||this.permissionMap[B]==null){this.permissionMap[B]=this.rpcCall("imagelooop.getLooopPermittedUsers","looopId="+this.looopId+"&permission="+encodeURIComponent(B)).userIds}return this.permissionMap[B]},addPermittedUser:function(F,D){var E=this.rpcCall("imagelooop.addLooopPermittedUser","looopId="+this.looopId+"&permission="+encodeURIComponent(F)+"&userId="+encodeURIComponent(D));this.clearPermissionMap(F);return E.success=="true"},removePermittedUser:function(F,D){var E=this.rpcCall("imagelooop.removeLooopPermittedUser","looopId="+this.looopId+"&permission="+encodeURIComponent(F)+"&userId="+encodeURIComponent(D));this.clearPermissionMap(F);return E.success=="true"},getMetaDataEx:function(C){if(!this.metaData||this.metaData==null){if(this.looopId!=null){var D=this.rpcCall("imagelooop.getLooopMetaDataEx","looopId="+this.looopId,C);
if(!C||C==null){this.metaData=D}}else{this.metaData=new Object()}}else{if(C){C(this.metaData)}}return this.metaData},getMetaData:function(C){if(!this.metaData||this.metaData==null){if(this.looopId!=null){var D=this.rpcCall("imagelooop.getLooopMetaData","looopId="+this.looopId,C);this.metaData=D}else{this.metaData=new Object()}}return this.metaData},setMetaData:function(E,D){var F=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&"+E,D);this.clear();return F},getName:function(){var B=this.getMetaData();if(!B.name){B.name=""}return B.name},getDescription:function(){var B=this.getMetaData();if(!B.description){B.description=""}return B.description},setDescription:function(D){var C=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&description="+encodeURIComponent(D));this.clear();return C},getAccessType:function(){var B=this.getMetaData();if(!B.accessType){B.accessType="PUBLIC"}return B.accessType},setAccessType:function(E,D){var F=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&accessType="+encodeURIComponent(E),D);
this.clear();return F},getDescriptiveName:function(){var B=this.getMetaData();if(!B.descriptiveName){B.descriptiveName=""}return B.descriptiveName},setDescriptiveName:function(D){var C=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&descriptiveName="+encodeURIComponent(D));this.clear();return C},getLooopExternalSource:function(C){var D=this.rpcCall("imagelooop.getLooopExternalSource","looopID="+this.looopId,C);return D},disableLooopExternalSource:function(C){var D=this.rpcCall("imagelooop.disableExternalSourceLooop","looopID="+this.looopId,C);return D},getRating:function(){var B=this.getMetaData();if(!B.rating){B.rating=0}return B.rating},addRating:function(C){var D=this.rpcCall("imagelooop.looopRating","looopId="+this.looopId+"&rating="+C);this.getMetaData().rating=D.rating},getTeaserContentId:function(){if(!this.getMetaData().teaserContentId){return null}return this.getMetaData().teaserContentId},setTeaserContentId:function(D){var C=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&teaserContentId="+encodeURIComponent(D));
this.clear();return C},getTeaserImage:function(){if(!this.teaserImage||this.teaserImage==null){if(!this.getMetaData().teaserContentId){this.teaserImage=null}else{this.teaserImage=new Imagelooop.LooopImage(this,this.getTeaserContentId())}}return this.teaserImage},getLooopExternalLink:function(){var B=this.getMetaData();if(!B.looopExternalLink){B.looopExternalLink=""}return B.looopExternalLink},setLooopExternalLink:function(D){var C=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&looopExternalLink="+encodeURIComponent(D));this.clear();return C},getOwnerId:function(){return this.getMetaData().ownerId},isMine:function(){return getOwnerId()==main.getCurrentUserIdNoFail()},hasReadAccess:function(){var D=this.getCurrentUserIdNoFail();if(D==null){return false}if(D==this.getOwnerId()||this.getAccessType()=="PUBLIC"||this.getAccessType()=="UNPROTECTED"){return true}var E=this.getPermittedUsers("READ");for(var F=0;F<E.length;F++){if(E[F]==D){return true}}return false},hasWriteAccess:function(){var D=this.getCurrentUserIdNoFail();
if(D==null){return false}if(D==this.getOwnerId()){return true}var E=this.getPermittedUsers("WRITE");for(var F=0;F<E.length;F++){if(E[F]==D){return true}}return false},getPermalink:function(){return this.getMetaData().permalink},getTags:function(){return this.getMetaData().tags},setTags:function(D){var C=this.rpcCall("imagelooop.setLooopMetaData","looopId="+this.looopId+"&tags="+encodeURIComponent(D));this.clear();return C},getImages:function(){var I=this.rpcCall("imagelooop.getLooopImages","looopId="+this.looopId);var F=new Array();if(I.imageIds){var J=I.imageIds.length;for(var G=0;G<J;G++){var H=I.imageIds[G];F.push(new Imagelooop.LooopImage(this,H))}}return F},getImagesFromResult:function(L){var H=new Array();if(L!=null){var N=L.length;for(var I=0;I<N;I++){var K=L[I];var J=K.imageId;var M=new Imagelooop.LooopImage(this,J);if(K.tags&&K.tags!=null){K.tags+="";K.tags=K.tags.split(",")}M.metaData=K;H.push(M)}}return H},getImagesEx:function(){var B=this.rpcCall(this.useRTcalls?"imagelooop.getLooopImagesExRT":"imagelooop.getLooopImagesEx","looopId="+this.looopId);
if(B.imageMeta){return this.getImagesFromResult(B.imageMeta)}return new Array()},getImagesExAsync:function(B){this.rpcCall(this.useRTcalls?"imagelooop.getLooopImagesExRT":"imagelooop.getLooopImagesEx","looopId="+this.looopId,B)},uploadImagesForm:function(I,H,J,G){I.method="post";I.enctype="multipart/form-data";var F=this.baseUrl+"?apiKey="+this.apiKey+"&looopId="+this.looopId+"&f=imagelooop.uploadFilesForm&h="+window.ilApiLocationHost;if(H&&H!=null){F+="&successPage="+encodeURIComponent(H)}if(J&&J!=null){F+="&failurePage="+encodeURIComponent(J)}if(G&&G!=null){F+="&cookie="+encodeURIComponent(G)}I.action=F;I.submit()},getLooopPlayerConfig:function(){if(!this.playerConfig){this.playerConfig=this.rpcCall("imagelooop.getLooopPlayerConfig","looopId="+this.looopId)}return this.playerConfig},setLooopPlayerConfig:function(G,H){var F="looopId="+this.looopId+"&name="+encodeURIComponent(G);for(var E in H){F+="&playerConfig$"+E+"="+encodeURIComponent(H[E])}return this.rpcCall("imagelooop.setLooopPlayerConfig",F)},getDisplayName:function(){var B=this.getDescriptiveName();
if(B==null||B==""){B=this.getName()}if(B==null||B==""){B=this.getDescription()}return B},publishLooop:function(){var B="looopId="+this.looopId;this.rpcCall("imagelooop.publishLooop",B)},getLooopPlayerExportHtml:function(){var D="looopId="+this.looopId;var C=this.rpcCall("imagelooop.getLooopPlayerExportHtml",D);return C.html},getLooopPlayerExportHtml:function(F){var E="looopId="+this.looopId+"&template="+F;var D=this.rpcCall("imagelooop.getLooopPlayerExportHtml",E);return D.html},toString:function(){return"Imagelooop.Looop[id="+this.getId()+"]"}});Imagelooop.LooopImage=Class.create();Object.extend(Object.extend(Imagelooop.LooopImage.prototype,Imagelooop.prototype),{initialize:function(C,D){this.copy(C);this.looop=C;this.imageId=D},clear:function(){this.metaData=null},deleteImage:function(C){if(this.imageId!=null){var D=this.rpcCall("imagelooop.deleteImage","imageID="+this.imageId,C);return D}else{throw ("You cannot delete an image, without at least setting the imageId!")}},getMetaData:function(C){if(this.metaData==null){if(this.imageId!=null){var D=this.rpcCall("imagelooop.getImageMetaData","looopId="+((this.looop&&this.looop.looopId)?this.looop.looopId:"")+"&imageId="+this.imageId,C);
this.metaData=D}else{this.metaData=new Object()}}return this.metaData},setMetaData:function(E,D){var F=this.rpcCall("imagelooop.setImageMetaData","imageId="+this.imageId+((this.looop.looopId)?("&looopId="+this.looop.looopId):"")+"&"+E,D);this.clear();return F},getCreatedTimestamp:function(){return this.getMetaData().createdTimestamp},getModifiedTimestamp:function(){return this.getMetaData().modifiedTimestamp},getContentDatetime:function(){return this.getMetaData().contentDatetime},getId:function(){return this.imageId},getName:function(){var B=this.getMetaData();if(!B.name){B.name=""}return B.name},getDescription:function(){var B=this.getMetaData();if(!B.description){B.description=""}return B.description},getRating:function(){var B=this.getMetaData();if(!B.rating){B.rating=0}return B.rating},addRating:function(C){var D=this.rpcCall("imagelooop.imageRating","looopId="+this.looop.looopId+"&imageId="+this.imageId+"&rating="+C);this.getMetaData().rating=D.rating},isMine:function(){return getOwnerId()==main.getCurrentUserIdNoFail()
},getOwnerId:function(){var B=this.getMetaData();if(!B.ownerId){B.ownerId=null}return B.ownerId},getContentLink:function(){var B=this.getMetaData();if(!B.contentLink){B.contentLink=""}return B.contentLink},getImageLink:function(C){var D=this.getMetaData();if(D!=null&&D.imageLink){return D.imageLink.replace("@",C)}return this.looop.getPermalink()+"content/"+this.imageId+"_"+this.getModifiedTimestamp()+","+C+"/image.jpg"},getFastImageLink:function(C){var D=this.metaData;if(D!=null&&D.imageLink){return D.imageLink.replace("@",C)}return this.looop.getPermalink()+"content/"+this.imageId+","+C+"/image.jpg"},getPermalink:function(){return this.getMetaData().permalink},getTags:function(){return this.getMetaData().tags},setName:function(D){var C=this.rpcCall("imagelooop.setImageMetaData","looopId="+this.looop.looopId+"&imageId="+this.imageId+"&name="+encodeURIComponent(D));this.clear();return C},setDescription:function(D){var C=this.rpcCall("imagelooop.setImageMetaData","looopId="+this.looop.looopId+"&imageId="+this.imageId+"&description="+encodeURIComponent(D));
this.clear();return C},setContentLink:function(D){var C=this.rpcCall("imagelooop.setImageMetaData","looopId="+this.looop.looopId+"&imageId="+this.imageId+"&contentLink="+encodeURIComponent(D));this.clear();return C},setTags:function(D){var C=this.rpcCall("imagelooop.setImageMetaData","looopId="+this.looop.looopId+"&imageId="+this.imageId+"&tags="+encodeURIComponent(D));this.clear();return C},toString:function(){return"Imagelooop.LooopImage[id="+this.getId()+"]"}});eventObjs=new Array();onloadHandlers=new Array();onloadHandlersRunning=false;function addOnloadHandler(B){if(onloadHandlersRunning){B()}else{onloadHandlers.push(B)}}if(window.onload!=null){onloadHandlers.push(window.onload)}window.onload=function(){onloadHandlersRunning=true;for(var D=0;D<onloadHandlers.length;D++){try{onloadHandlers[D]()}catch(C){alert("error "+C+" in "+onloadHandlers[D])}}};opacityAdjust=0;opacityMode=3;initBrowserDone=false;function initBrowser(C){if(initBrowserDone){return }isMac=navigator.userAgent.toLowerCase().indexOf("mac");opacityAdjust=(isMac)?0:0.001;
if(C.filters){opacityMode=2}else{try{if(C.style.opacity!=null){opacityMode=0}else{if(C.style.MozOpacity!=null){opacityMode=1}else{if(C.style.KhtmlOpacity!=null){opacityMode=4}else{C.style.opacity=1;opacityMode=0}}}}catch(D){opacityMode=3}}initBrowserDone=true}function addMozillaSearchEngine(){if((typeof window.sidebar=="object")&&(typeof window.sidebar.addSearchEngine=="function")){window.sidebar.addSearchEngine("http://www.imagelooop.de/imagelooop.src","http://www.imagelooop.de/images/imagelooop.gif","imagelooop","0")}else{alert("Sorry, you need a Mozilla-based browser to install a search plugin.")}}function setOpacity(D,C){D=getRef(D);if(D&&D!=null){if(!initBrowserDone){initBrowser(D)}switch(opacityMode){case 0:if(C==0){D.style.visibility="hidden"}else{D.style.visibility="visible";D.style.opacity=(C/100)-opacityAdjust}break;case 1:if(C==0){D.style.visibility="hidden"}else{D.style.visibility="visible";D.style.MozOpacity=(C/100)-opacityAdjust}break;case 4:if(C==0){D.style.visibility="hidden"}else{D.style.visibility="visible";
D.style.KhtmlOpacity=(C/100)-opacityAdjust}break;case 2:if(C==0){D.style.visibility="hidden"}else{D.style.visibility="visible";if(C<100){D.style.filter="Alpha(opacity="+C+")"}else{D.style.filter=""}}break;case 3:if(C<50){D.style.visibility="hidden"}else{D.style.visibility="visible"}break}}}function getRef(id){if(!id||id==null){return null}if(id.nodeName){return id}return eval(document.getElementById(id))}function trim(B){B=B.replace(/^[ \r\n]+/g,"");return B.replace(/[ \r\n]+$/g,"")}function toggleDisplay(H,I){var G=(H.nodeType)?H:getRef(H);if(G==null){return false}if(G.style.display=="none"){var J=G.getAttribute("xfocus");if(J!=null){J=getRef(J)}var F=null;if(J!=null){F=function(){this.focus()}.bind(J)}Effect.Appear(H,{duration:(I?I:0.8),beforeFinish:F})}else{Effect.Fade(H,{duration:(I?I:0.8)})}return false}function toggleDisplayBlind(G){var F=(G.nodeType)?G:getRef(G);if(F==null){return false}if(F.style.display=="none"){var H=F.getAttribute("xfocus");if(H!=null){H=getRef(H)}var E=null;if(H!=null){E=function(){this.focus()
}.bind(H)}Effect.BlindDown(G,{duration:0.8,beforeFinish:E})}else{Effect.BlindUp(G,{duration:0.8})}return false}function toggleDisplaySlide(G){var F=(G.nodeType)?G:getRef(G);if(F==null){return false}if(F.style.display=="none"){var H=F.getAttribute("xfocus");if(H!=null){H=getRef(H)}var E=null;if(H!=null){E=function(){this.focus()}.bind(H)}Effect.SlideDown(G,{duration:0.8,beforeFinish:E})}else{Effect.SlideUp(G,{duration:0.8})}return false}function toggleDisplayNa(C){var D=getRef(C);if(D==null){return false}if(D.style.display=="none"){D.style.display="block"}else{D.style.display="none"}return false}function toggleDisplayAndAlignToParent(L,M,K,N){var J=getRef(L);var O=getRef(M);var I=(isNaN(Number(N))?0:Number(N));var P=findPos(O,K,(O.offsetHeight+I));J.style.left=P[0];J.style.top=P[1];return toggleDisplay(L)}function toggleFotosize(E){if(E!=curr_fotosize){var F=getRef("fotosize"+E);try{$("fotosizeDummy").style.display="block"}catch(D){}$("fotosize"+curr_fotosize).style.display="none";toggleDisplay("fotosize"+E);changeClass("fs_"+E,"fotosize_hi");
changeClass("fs_"+curr_fotosize,"fotosize_low");curr_fotosize=E}return(false)}function toggleSl(D,C){if(C==1){varCurr=curr_sl_import}else{if(C==2){varCurr=curr_sl_design}}if(D==varCurr){toggleDisplayNa(D);curr_sl_design=""}if(D!=varCurr&&varCurr!=""){toggleDisplayNa(varCurr);toggleDisplayNa(D);curr_sl_design=D}if(D!=varCurr&&varCurr==""){toggleDisplayNa(D);curr_sl_design=D}return(false)}function toggleEl(D,C){if(C==1){varCurr=curr_sl_import}else{if(C==2){varCurr=curr_sl_design}}if(D!=varCurr){getRef(varCurr).style.display="none";toggleDisplay(D);changeClass("tab-"+D,"sl-tab-hi");changeClass("tab-"+varCurr,"sl-tab");if(C==1){curr_sl_import=D}else{curr_sl_design=D}}getRef("exporterValue").value=D;return false}function changeClass(D,C){o=getRef(D);if(o){o.className=C}return false}function findPos(G,H,E){var F=curtop=0;if(G.offsetParent){F=G.offsetLeft;curtop=G.offsetTop;while(G=G.offsetParent){F+=G.offsetLeft;curtop+=G.offsetTop}}if(H){F+=H}if(E){curtop+=E}F+="px";curtop+="px";return[F,curtop]}function getRef(C){var D=document.getElementById(C);
return D}function reAssignFunction(D){var C=eventObjs[D];window[C.target]=C.value;if(typeof (eventObjs[D].execute)=="function"){eventObjs[D].execute()}delete eventObjs[D]}function toggleFields(I,J,L,P,M){var K={id:Math.random(),target:"toggleFields",value:window.toggleFields};I=I.nodeType?I:$(I);J=J.nodeType?J:$(J);eventObjs[K.id]=K;window.toggleFields=function(){};window.setTimeout("reAssignFunction('"+K.id+"')",700);if(L===true){try{K.chgObj=I;K.oldObj=J;K.oldPos=findPos(I);var N=findPos(J);if(M){N[0]=(parseInt(N[0].replace(/px/i,""))+M)+"px"}if(P){N[1]=(parseInt(N[1].replace(/px/i,""))+P)+"px"}K.oldStyle=I.style.position;I.style.top=N[1];I.style.position="absolute";K.execute=function(){this.chgObj.style.position=this.oldStyle;this.chgObj.style.top=this.oldPos[1];this.oldObj.style.display="none"}}catch(O){alert(O)}}toggleDisplay(I);toggleDisplay(J);return false}function toggleFieldsAndSave(E,D,F){toggleDisplay(f1,F);toggleDisplay(f2,F);return false}function checkElement(O,P,L,I){if((new Date().getTime()-currTime.getTime())>=2000){try{K=getRef(O);
if(O.indexOf("user")>=0||O.indexOf("email")>=0){il.getUserIdByName(K.value,function(A){asyncFormChecker(P,L,I,A)})}else{if(O.indexOf("password")>=0){var J=new Object();J.isException=(I?!K.validPass:K.validPass);asyncFormChecker(P,"Invalid Password",I,J)}}}catch(M){alert(M);var K=getRef(P);var N=getRef(P+"_err");K.innerHTML="";N.innerHTML=""}}}function asyncFormChecker(K,J,G,H){var I=getRef(K);var L=getRef(K+"_err");H.isException=(G?!H.isException:H.isException);if(H.isException){I.innerHTML="OK";if(L.isVisible){toggleDisplay(L.id);L.isVisible=false}}else{L.innerHTML=J;if(!L.isVisible){toggleDisplay(L.id);L.isVisible=true}I.innerHTML=""}}var curTime;function check_username(G,H){var F=G.replace(/'/g,"");var E=new Date();curTime=E.getTime();window.setTimeout("check_waiting('"+F+"','"+H+"')",1500)}function check_waiting(H,J){var F=new Date();newTime=F.getTime();if((newTime-curTime)>=1500){var I=getRef(J);H=I.value;var G=H.replace(/'/g,"");window.setTimeout("check_user()",0)}}function check_user(B){toggleDisplay("c_user")
}cookiesArray=null;function getCookies(J){if(cookiesArray==null||J==true){var L=document.cookie.split(";");if(L==null){L=""}cookiesArray=new Array();for(var H=0;H<L.length;H++){var K=L[H];var I=new Object();var G=K.indexOf("=");I.name=trim(K.substring(0,G));I.value=trim(K.substring(G+1));cookiesArray.push(I);cookiesArray[I.name]=I.value;I.toString=function(){return"Cookie[name="+this.name+", value="+this.value+"]"}}}return cookiesArray}function makeCookieString(){var D="";for(var E=0;E<cookiesArray.length;E++){if(E>0){D+="; "}var F=cookiesArray[E];D+=F.name+"="+F.value}document.cookies=D}function getCookieValue(F,E){var D=getCookies(E==true);F=trim(F);return D[F]}function setCookie(E,H,F){var G="";if(H==null||H==""){G=E+"=;path=/;expires="+new Date(0).toGMTString()}else{G=E+"="+escape(H)+";path=/"}if(F!=null){G+=";domain="+F}document.cookie=G;cookiesArray=null}function setElHtmlValue(D,C){o=getRef(D);if(o!=null){o.innerHTML=C}return(false)}function getPlayer(O,N,R,V,U,M,Q){var P=new SWFObject(O,N,R,V,"7",null,"high",null,null,null);
var S=U.split("&");for(var L=0;L<S.length;L++){var T=S[L].split("=");P.addVariable(T[0],T[1])}P.addParam("scale","noscale");P.addParam("salign","v");if(!M){P.addParam("wmode","transparent")}P.addParam("allowScriptAccess","always");P.addParam("allowFullScreen","true");if(Q){P.addParam("allowNetworking","internal")}P.addParam("align","middle");return P}function getPlayerCode(J,O,P,M,K,L,I){var N=getPlayer(J,O,P,M,K,L,I);return N.getSWFHTML()}function showPlayer(I,M,N,L,J,K,H){document.write(getPlayerCode(I,M,N,L,J,K,H))}function setPlayer(J,M,L,P,R,Q,K,O){var N=getPlayer(M,L,P,R,Q,K,O);N.write(J)}if(typeof deconcept=="undefined"){deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(X,N,R,W,U,S,Q,V,P,M){if(!document.getElementById){return }this.DETECT_KEY=M?M:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();
this.variables=new Object();this.attributes=new Array();if(X){this.setAttribute("swf",X)}if(N){this.setAttribute("id",N)}if(R){this.setAttribute("width",R)}if(W){this.setAttribute("height",W)}if(U){this.setAttribute("version",new deconcept.PlayerVersion(U.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(S){this.addParam("bgcolor",S)}var O=Q?Q:"high";this.addParam("quality",O);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var T=(V)?V:window.location;this.setAttribute("xiRedirectUrl",T);this.setAttribute("redirectUrl","");if(P){this.setAttribute("redirectUrl",P)}};deconcept.SWFObject.prototype={useExpressInstall:function(B){this.xiSWFPath=!B?"expressinstall.swf":B;this.setAttribute("useExpressInstall",true)},setAttribute:function(C,D){this.attributes[C]=D},getAttribute:function(B){return this.attributes[B]},addParam:function(C,D){this.params[C]=D
},getParams:function(){return this.params},addVariable:function(C,D){this.variables[C]=D},getVariable:function(B){return this.variables[B]},getVariables:function(){return this.variables},getVariablePairs:function(){var D=new Array();var F;var E=this.getVariables();for(F in E){D[D.length]=F+"="+E[F]}return D},getSWFHTML:function(){var F="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}F='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';F+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var G=this.getParams();for(var E in G){F+=[E]+'="'+G[E]+'" '}var H=this.getVariablePairs().join("&");if(H.length>0){F+='flashvars="'+H+'"'}F+=' pluginspage="http://www.macromedia.com/go/getflashplayer"';F+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");
this.setAttribute("swf",this.xiSWFPath)}F='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';F+=' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" >';F+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var G=this.getParams();for(var E in G){F+='<param name="'+E+'" value="'+G[E]+'" />'}var H=this.getVariablePairs().join("&");if(H.length>0){F+='<param name="flashvars" value="'+H+'" />'}F+="</object>"}return F},write:function(D){if(this.getAttribute("useExpressInstall")){var F=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(F)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var E=(typeof D=="string")?document.getElementById(D):D;E.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var I=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var F=navigator.plugins["Shockwave Flash"];if(F&&F.description){I=new deconcept.PlayerVersion(F.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var H=1;var J=3;while(H){try{J++;H=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+J);I=new deconcept.PlayerVersion([J,0,0])}catch(G){H=null}}}else{try{var H=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(G){try{var H=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
I=new deconcept.PlayerVersion([6,0,21]);H.AllowScriptAccess="always"}catch(G){if(I.major==6){return I}}try{H=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(G){}}if(H!=null){I=new deconcept.PlayerVersion(H.GetVariable("$version").split(" ")[1].split(","))}}}return I};deconcept.PlayerVersion=function(B){this.major=B[0]!=null?parseInt(B[0]):0;this.minor=B[1]!=null?parseInt(B[1]):0;this.rev=B[2]!=null?parseInt(B[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(B){if(this.major<B.major){return false}if(this.major>B.major){return true}if(this.minor<B.minor){return false}if(this.minor>B.minor){return true}if(this.rev<B.rev){return false}return true};deconcept.util={getRequestParameter:function(F){var G=document.location.search||document.location.hash;if(F==null){return G}if(G){var H=G.substring(1).split("&");for(var E=0;E<H.length;E++){if(H[E].substring(0,H[E].indexOf("="))==F){return H[E].substring((H[E].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=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]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(B){return document.all[B]}}getQueryParamValue=deconcept.util.getRequestParameter;FlashObject=deconcept.SWFObject;SWFObject=deconcept.SWFObject;if(!this.JSON){JSON=function(){function f(n){return n<10?"0"+n:n}Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==="string"){return c}return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(typeof value.length==="number"&&!(value.propertyIsEnumerable("length"))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;
i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value,rep);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}return{stringify:function(value,replacer,space){var i;gap="";indent="";if(space){if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)
}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+(+(a.charCodeAt(0))).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}()}function copyPrototype(D,E){var B=E.toString();var C=B.match(/\s*function ([^\(\s]*)\s*\(/);if(C!=null){D.prototype[C[1].replace(/^\s*|\s*$/g,"")]=E}D.prototype[C[1]]=E;for(var A in E.prototype){D.prototype[A]=E.prototype[A]}}function IlBaseObject(A,B){this.name=A;this.id=B}function IlConfigItem(D,A,B,C){this.IlBaseObject(D,A);this.settings=B;this.selected=C?true:false;this.setMeActive=function(){alert("Override me: IlConfigItem->setMeActive")}}copyPrototype(IlConfigItem,IlBaseObject);function IlMainObject(B,C,D,A){this.configCats=B?B:[];this.ilObject=D;this.type=C;this.ilMain=(typeof (A)=="string"?new Imagelooop.Looop(this.ilObject,A):(A?A:null));
this.ilMainSettings={};this.getConfigCat=function(E){return this.configCats[E]};this.getType=function(){if(this.type){return this.type}return""};this.getIlMain=function(){return this.ilMain};this.makeIlMain=function(E){if(typeof (E)=="string"){this.ilMain=new Imagelooop.Looop(this.ilObject,E)}else{this.ilMain=E}this.addSetting("id",this.getId())};this.getMetaData=function(F){try{if(!this.ilMain.metDat||!this.ilMain.metDat.looopId||F){this.ilMain.clear();this.ilMain.metDat=this.ilMain.getMetaData()}return this.ilMain.metDat}catch(E){return{}}};this.getLpcfg=function(F){try{if(!this.ilMainSettings.playerConfig||F){this.ilMain.clear();var G=this.ilMain.getLooopPlayerConfig();this.ilMainSettings.playerConfig=G.playerConfig;if(!this["name"]){this["name"]=G.name}}return this.ilMainSettings.playerConfig}catch(E){return{}}};this.clearSetting=function(E){delete this.ilMainSettings[E]};this.addSetting=function(E,F){this.ilMainSettings[E]=F};this.getSetting=function(E){return this.ilMainSettings[E]};this.getId=function(){try{return this.ilMain.getId()
}catch(E){return false}};this.getContents=function(){try{return this.ilMain.getImages()}catch(E){return[]}};this.getContentsEx=function(){try{return this.ilMain.getImagesEx()}catch(E){return[]}};this.getSettingsString=function(){var E="";for(foo in this.ilMainSettings){if(typeof (this.ilMainSettings[foo])=="object"){for(bar in this.ilMainSettings[foo]){if(typeof (this.ilMainSettings[foo][bar])!="undefined"&&this.ilMainSettings[foo][bar]!=null){E+=(foo+"$"+bar+"="+this.ilMainSettings[foo][bar]+"&")}}continue}if(typeof (this.ilMainSettings[foo])!="undefined"){E+=(foo+"="+this.ilMainSettings[foo]+"&")}}return E.substring(0,E.length-1)};this.updateMe=function(F,E){alert("Override me: IlMainObject->updateMe")};this.saveMe=function(E,F){alert("Override me: IlMainObject->saveMe")};this.beforeCollectionCheck=function(E){var F=false;if(this.ilMain&&this.ilMain.getId&&this.ilMain.getId()!=defaultId){F=this.getId()}else{if(this.createParams&&E){this.createParams+=("&"+E)}else{if(E){this.createParams=E}}looop=window.il.createLooop(window.pageBrand?window.pageBrand:this.getType(),"accessType="+this.getType()+"&"+(this.createParams?this.createParams:""));
this.makeIlMain(looop);F=this.getId()}return F}}function addSet(A,B){for(foo in A){if(typeof (A[foo])=="object"){if(!window.mainObject.ilMainSettings[foo]){window.mainObject.ilMainSettings[foo]={}}for(bar in A[foo]){window.mainObject.ilMainSettings[foo][bar]=A[foo][bar]}}else{window.mainObject.ilMainSettings[foo]=A[foo]}}window.mainObject.updateMe();return false};