/* Copyright Julius Blum GmbH, Hoechst 2004 - 2009, All rights Reserved. */
/* baselib 2009 Prototype JavaScript framework (c) 2005-2009 Sam Stephenson */
/* Scriptaculous Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)*/
var Prototype={Version:"1.6.1_rc3",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)};})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype);})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true;}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true;}c=b=null;return a;})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a;}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false;}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break;}catch(f){}}return c;}};var Class=(function(){function a(){}function b(){var h=null,g=$A(arguments);if(Object.isFunction(g[0])){h=g.shift();}function d(){this.initialize.apply(this,arguments);}Object.extend(d,Class.Methods);d.superclass=h;d.subclasses=[];if(h){a.prototype=h.prototype;d.prototype=new a;h.subclasses.push(d);}for(var f=0;f<g.length;f++){d.addMethods(g[f]);}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction;}d.prototype.constructor=d;return d;}function c(l){var g=this.superclass&&this.superclass.prototype;var f=Object.keys(l);if(!Object.keys({toString:true}).length){if(l.toString!=Object.prototype.toString){f.push("toString");}if(l.valueOf!=Object.prototype.valueOf){f.push("valueOf");}}for(var d=0,h=f.length;d<h;d++){var k=f[d],j=l[k];if(g&&Object.isFunction(j)&&j.argumentNames().first()=="$super"){var m=j;j=(function(n){return function(){return g[n].apply(this,arguments);};})(k).wrap(m);j.valueOf=m.valueOf.bind(m);j.toString=m.toString.bind(m);}this.prototype[k]=j;}return this;}return{create:b,Methods:{addMethods:c}};})();(function(){function n(s){return Object.prototype.toString.call(s).match(/^\[object\s(.*)\]$/)[1];}function j(s,u){for(var t in u){s[t]=u[t];}return s;}function m(s){try{if(d(s)){return"undefined";}if(s===null){return"null";}return s.inspect?s.inspect():String(s);}catch(t){if(t instanceof RangeError){return"...";}throw t;}}function l(s){var u=typeof s;switch(u){case"undefined":case"function":case"unknown":return;case"boolean":return s.toString();}if(s===null){return"null";}if(s.toJSON){return s.toJSON();}if(h(s)){return;}var t=[];for(var w in s){var v=l(s[w]);if(!d(v)){t.push(w.toJSON()+": "+v);}}return"{"+t.join(", ")+"}";}function c(s){return $H(s).toQueryString();}function f(s){return s&&s.toHTML?s.toHTML():String.interpret(s);}function q(s){var t=[];for(var u in s){t.push(u);}return t;}function o(s){var t=[];for(var u in s){t.push(s[u]);}return t;}function k(s){return j({},s);}function h(s){return !!(s&&s.nodeType==1);}function g(s){return n(s)==="Array";}function r(s){return s instanceof Hash;}function b(s){return typeof s==="function";}function a(s){return n(s)==="String";}function p(s){return n(s)==="Number";}function d(s){return typeof s==="undefined";}j(Object,{extend:j,inspect:m,toJSON:l,toQueryString:c,toHTML:f,keys:q,values:o,clone:k,isElement:h,isArray:g,isHash:r,isFunction:b,isString:a,isNumber:p,isUndefined:d});})();Object.extend(Function.prototype,(function(){var m=Array.prototype.slice;function d(q,n){var p=q.length,o=n.length;while(o--){q[p+o]=n[o];}return q;}function k(o,n){o=m.call(o,0);return d(o,n);}function h(){var n=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return n.length==1&&!n[0]?[]:n;}function j(p){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this;}var n=this,o=m.call(arguments,1);return function(){var q=k(o,arguments);return n.apply(p,q);};}function g(p){var n=this,o=m.call(arguments,1);return function(r){var q=d([r||window.event],o);return n.apply(p,q);};}function l(){if(!arguments.length){return this;}var n=this,o=m.call(arguments,0);return function(){var p=k(o,arguments);return n.apply(this,p);};}function f(p){var n=this,o=m.call(arguments,1);p=p*1000;return window.setTimeout(function(){return n.apply(n,o);},p);}function a(){var n=d([0.01],arguments);return this.delay.apply(this,n);}function c(o){var n=this;return function(){var p=d([n.bind(this)],arguments);return o.apply(this,p);};}function b(){if(this._methodized){return this._methodized;}var n=this;return this._methodized=function(){var o=d([this],arguments);return n.apply(null,o);};}return{argumentNames:h,bind:j,bindAsEventListener:g,curry:l,delay:f,defer:a,wrap:c,methodize:b};})());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"';};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1");};var PeriodicalExecuter=Class.create({initialize:function(b,a){this.callback=b;this.frequency=a;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();}catch(a){}finally{this.currentlyExecuting=false;}}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a);},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,(function(){function prepareReplacement(replacement){if(Object.isFunction(replacement)){return replacement;}var template=new Template(replacement);return function(match){return template.evaluate(match);};}function gsub(pattern,replacement){var result="",source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern)){pattern=RegExp.escape(pattern);}if(!(pattern.length||pattern.source)){replacement=replacement("");return replacement+source.split("").join(replacement)+replacement;}while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source="";}}return result;}function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0){return match[0];}return replacement(match);});}function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this);}function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?"...":truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"");}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"");}function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"");}function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,"img");var matchOne=new RegExp(Prototype.ScriptFragment,"im");return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||["",""])[1];});}function evalScripts(){return this.extractScripts().map(function(script){return eval(script);});}function escapeHTML(){escapeHTML.text.data=this;return escapeHTML.div.innerHTML;}function unescapeHTML(){var div=document.createElement("div");div.innerHTML=this.stripTags();return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject("",function(memo,node){return memo+node.nodeValue;}):div.childNodes[0].nodeValue):"";}function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match){return{};}return match[1].split(separator||"&").inject({},function(hash,pair){if((pair=pair.split("="))[0]){var key=decodeURIComponent(pair.shift());var value=pair.length>1?pair.join("="):pair[0];if(value!=undefined){value=decodeURIComponent(value);}if(key in hash){if(!Object.isArray(hash[key])){hash[key]=[hash[key]];}hash[key].push(value);}else{hash[key]=value;}}return hash;});}function toArray(){return this.split("");}function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);}function times(count){return count<1?"":new Array(count+1).join(this);}function camelize(){var parts=this.split("-"),len=parts.length;if(len==1){return parts[0];}var camelized=this.charAt(0)=="-"?parts[0].charAt(0).toUpperCase()+parts[0].substring(1):parts[0];for(var i=1;i<len;i++){camelized+=parts[i].charAt(0).toUpperCase()+parts[i].substring(1);}return camelized;}function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();}function underscore(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase();}function dasherize(){return this.gsub(/_/,"-");}function inspect(useDoubleQuotes){var escapedString=this.gsub(/[\x00-\x1f\\]/,function(match){var character=String.specialChar[match[0]];return character?character:"\\u00"+match[0].charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes){return'"'+escapedString.replace(/"/g,'\\"')+'"';}return"'"+escapedString.replace(/'/g,"\\'")+"'";}function toJSON(){return this.inspect(true);}function unfilterJSON(filter){return this.sub(filter||Prototype.JSONFilter,"#{1}");}function isJSON(){var str=this;if(str.blank()){return false;}str=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);}function evalJSON(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")");}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect());}function include(pattern){return this.indexOf(pattern)>-1;}function startsWith(pattern){return this.indexOf(pattern)===0;}function endsWith(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d;}function empty(){return this=="";}function blank(){return/^\s*$/.test(this);}function interpolate(object,pattern){return new Template(this,pattern).evaluate(object);}return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim?String.prototype.trim:strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,toJSON:toJSON,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate};})());Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);if("<\n>".escapeHTML()!=="&lt;\n&gt;"){String.prototype.escapeHTML=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");};}if("&lt;\n&gt;".unescapeHTML()!=="<\n>"){String.prototype.unescapeHTML=function(){return this.stripTags().replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&");};}var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern;},evaluate:function(a){if(a&&Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements();}return this.template.gsub(this.pattern,function(d){if(a==null){return(d[1]+"");}var g=d[1]||"";if(g=="\\"){return d[2];}var b=a,h=d[3];var f=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=f.exec(h);if(d==null){return g;}while(d!=null){var c=d[1].startsWith("[")?d[2].gsub("\\\\]","]"):d[1];b=b[c];if(null==b||""==d[3]){break;}h=h.substring("["==d[3]?d[1].length:d[0].length);d=f.exec(h);}return g+String.interpret(b);});}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function c(B,A){var z=0;try{this._each(function(D){B.call(A,D,z++);});}catch(C){if(C!=$break){throw C;}}return this;}function t(C,B,A){var z=-C,D=[],E=this.toArray();if(C<1){return E;}while((z+=C)<E.length){D.push(E.slice(z,z+C));}return D.collect(B,A);}function b(B,A){B=B||Prototype.K;var z=true;this.each(function(D,C){z=z&&!!B.call(A,D,C);if(!z){throw $break;}});return z;}function k(B,A){B=B||Prototype.K;var z=false;this.each(function(D,C){if(z=!!B.call(A,D,C)){throw $break;}});return z;}function l(B,A){B=B||Prototype.K;var z=[];this.each(function(D,C){z.push(B.call(A,D,C));});return z;}function v(B,A){var z;this.each(function(D,C){if(B.call(A,D,C)){z=D;throw $break;}});return z;}function j(B,A){var z=[];this.each(function(D,C){if(B.call(A,D,C)){z.push(D);}});return z;}function h(C,B,A){B=B||Prototype.K;var z=[];if(Object.isString(C)){C=new RegExp(RegExp.escape(C));}this.each(function(E,D){if(C.match(E)){z.push(B.call(A,E,D));}});return z;}function a(z){if(Object.isFunction(this.indexOf)){if(this.indexOf(z)!=-1){return true;}}var A=false;this.each(function(B){if(B==z){A=true;throw $break;}});return A;}function s(A,z){z=Object.isUndefined(z)?null:z;return this.eachSlice(A,function(B){while(B.length<A){B.push(z);}return B;});}function n(z,B,A){this.each(function(D,C){z=B.call(A,z,D,C);});return z;}function y(A){var z=$A(arguments).slice(1);return this.map(function(B){return B[A].apply(B,z);});}function r(B,A){B=B||Prototype.K;var z;this.each(function(D,C){D=B.call(A,D,C);if(z==null||D>=z){z=D;}});return z;}function p(B,A){B=B||Prototype.K;var z;this.each(function(D,C){D=B.call(A,D,C);if(z==null||D<z){z=D;}});return z;}function f(C,A){C=C||Prototype.K;var B=[],z=[];this.each(function(E,D){(C.call(A,E,D)?B:z).push(E);});return[B,z];}function g(A){var z=[];this.each(function(B){z.push(B[A]);});return z;}function d(B,A){var z=[];this.each(function(D,C){if(!B.call(A,D,C)){z.push(D);}});return z;}function o(A,z){return this.map(function(C,B){return{value:C,criteria:A.call(z,C,B)};}).sort(function(E,D){var C=E.criteria,B=D.criteria;return C<B?-1:C>B?1:0;}).pluck("value");}function q(){return this.map();}function u(){var A=Prototype.K,z=$A(arguments);if(Object.isFunction(z.last())){A=z.pop();}var B=[this].concat(z).map($A);return this.map(function(D,C){return A(B.pluck(C));});}function m(){return this.toArray().length;}function w(){return"#<Enumerable:"+this.toArray().inspect()+">";}return{each:c,eachSlice:t,all:b,every:b,any:k,some:k,collect:l,map:l,detect:v,findAll:j,select:j,filter:j,grep:h,include:a,member:a,inGroupsOf:s,inject:n,invoke:y,max:r,min:p,partition:f,pluck:g,reject:d,sortBy:o,toArray:q,entries:q,zip:u,size:m,inspect:w,find:v};})();function $A(c){if(!c){return[];}if("toArray" in Object(c)){return c.toArray();}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b];}return a;}function $w(a){if(!Object.isString(a)){return[];}a=a.strip();return a?a.split(/\s+/):[];}Array.from=$A;(function(){var u=Array.prototype,o=u.slice,q=u.forEach;function b(z){for(var y=0,A=this.length;y<A;y++){z(this[y]);}}if(!q){q=b;}function n(){this.length=0;return this;}function d(){return this[0];}function h(){return this[this.length-1];}function k(){return this.select(function(y){return y!=null;});}function w(){return this.inject([],function(z,y){if(Object.isArray(y)){return z.concat(y.flatten());}z.push(y);return z;});}function j(){var y=o.call(arguments,0);return this.select(function(z){return !y.include(z);});}function g(y){return(y!==false?this:this.toArray())._reverse();}function m(y){return this.inject([],function(B,A,z){if(0==z||(y?B.last()!=A:!B.include(A))){B.push(A);}return B;});}function r(y){return this.uniq().findAll(function(z){return y.detect(function(A){return z===A;});});}function s(){return o.call(this,0);}function l(){return this.length;}function v(){return"["+this.map(Object.inspect).join(", ")+"]";}function t(){var y=[];this.each(function(z){var A=Object.toJSON(z);if(!Object.isUndefined(A)){y.push(A);}});return"["+y.join(", ")+"]";}function a(A,y){y||(y=0);var z=this.length;if(y<0){y=z+y;}for(;y<z;y++){if(this[y]===A){return y;}}return -1;}function p(z,y){y=isNaN(y)?this.length:(y<0?this.length+y:y)+1;var A=this.slice(0,y).reverse().indexOf(z);return(A<0)?A:y-A-1;}function c(){var D=o.call(this,0),B;for(var z=0,A=arguments.length;z<A;z++){B=arguments[z];if(Object.isArray(B)&&!("callee" in B)){for(var y=0,C=B.length;y<C;y++){D.push(B[y]);}}else{D.push(B);}}return D;}Object.extend(u,Enumerable);if(!u._reverse){u._reverse=u.reverse;}Object.extend(u,{_each:q,clear:n,first:d,last:h,compact:k,flatten:w,without:j,reverse:g,uniq:m,intersect:r,clone:s,toArray:s,size:l,inspect:v,toJSON:t});var f=(function(){return[].concat(arguments)[0][0]!==1;})(1,2);if(f){u.concat=c;}if(!u.indexOf){u.indexOf=a;}if(!u.lastIndexOf){u.lastIndexOf=p;}})();function $H(a){return new Hash(a);}var Hash=Class.create(Enumerable,(function(){function f(s){this._object=Object.isHash(s)?s.toObject():Object.clone(s);}function g(t){for(var s in this._object){var u=this._object[s],v=[s,u];v.key=s;v.value=u;t(v);}}function m(s,t){return this._object[s]=t;}function c(s){if(this._object[s]!==Object.prototype[s]){return this._object[s];}}function p(s){var t=this._object[s];delete this._object[s];return t;}function r(){return Object.clone(this._object);}function q(){return this.pluck("key");}function o(){return this.pluck("value");}function h(t){var s=this.detect(function(u){return u.value===t;});return s&&s.key;}function k(s){return this.clone().update(s);}function d(s){return new Hash(s).inject(this,function(t,u){t.set(u.key,u.value);return t;});}function b(s,t){if(Object.isUndefined(t)){return s;}return s+"="+encodeURIComponent(String.interpret(t));}function a(){return this.inject([],function(u,v){var t=encodeURIComponent(v.key),s=v.value;if(s&&typeof s=="object"){if(Object.isArray(s)){return u.concat(s.map(b.curry(t)));}}else{u.push(b(t,s));}return u;}).join("&");}function n(){return"#<Hash:{"+this.map(function(s){return s.map(Object.inspect).join(": ");}).join(", ")+"}>";}function l(){return Object.toJSON(this.toObject());}function j(){return new Hash(this);}return{initialize:f,_each:g,set:m,get:c,unset:p,toObject:r,toTemplateReplacements:r,keys:q,values:o,index:h,merge:k,update:d,toQueryString:a,inspect:n,toJSON:l,clone:j};})());Hash.from=$H;Object.extend(Number.prototype,(function(){function d(){return this.toPaddedString(2,16);}function f(){return this+1;}function a(m,l){$R(0,this,true).each(m,l);return this;}function b(n,m){var l=this.toString(m||10);return"0".times(n-l.length)+l;}function g(){return isFinite(this)?this.toString():"null";}function k(){return Math.abs(this);}function j(){return Math.round(this);}function h(){return Math.ceil(this);}function c(){return Math.floor(this);}return{toColorPart:d,succ:f,times:a,toPaddedString:b,toJSON:g,abs:k,round:j,ceil:h,floor:c};})());function $R(c,a,b){return new ObjectRange(c,a,b);}var ObjectRange=Class.create(Enumerable,(function(){function b(g,d,f){this.start=g;this.end=d;this.exclusive=f;}function c(d){var f=this.start;while(this.include(f)){d(f);f=f.succ();}}function a(d){if(d<this.start){return false;}if(this.exclusive){return d<this.end;}return d<=this.end;}return{initialize:b,_each:c,include:a};})());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(a){this.responders._each(a);},register:function(a){if(!this.include(a)){this.responders.push(a);}},unregister:function(a){this.responders=this.responders.without(a);},dispatch:function(d,b,c,a){this.each(function(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a]);}catch(g){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});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,b,a){$super(a);this.transport=Ajax.getTransport();this.request(b);},request:function(b){this.url=b;this.method=this.options.method;var d=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){d._method=this.method;this.method="post";}this.parameters=d;if(d=Object.toQueryString(d)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+d;}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_=";}}}try{var a=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a);}Ajax.Responders.dispatch("onCreate",this,a);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||d):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(c){this.dispatchException(c);}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==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 c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b<d;b+=2){f[c[b]]=c[b+1];}}else{$H(c).each(function(g){f[g.key]=g.value;});}}for(var a in f){this.transport.setRequestHeader(a,f[a]);}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300);},getStatus:function(){try{return this.transport.status||0;}catch(a){return 0;}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON);}catch(d){this.dispatchException(d);}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse();}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON);}catch(d){this.dispatchException(d);}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction;}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}));},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null;}catch(b){return null;}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a);}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON();}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON();}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||"";}catch(a){return"";}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(a){return null;}},getResponseHeader:function(a){return this.transport.getResponseHeader(a);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null;}a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin());}catch(b){this.request.dispatchException(b);}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null;}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin());}catch(b){this.request.dispatchException(b);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(f,g){this.updateContent(f.responseText);if(Object.isFunction(d)){d(f,g);}}).bind(this);$super(c,b);},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts();}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b);}else{a.insertion(c,d);}}else{c.update(d);}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;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(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.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 $(b){if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($(arguments[a]));}return d;}if(Object.isString(b)){b=document.getElementById(b);}return Element.extend(b);}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(g,a){var c=[];var f=document.evaluate(g,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=f.snapshotLength;b<d;b++){c.push(Element.extend(f.snapshotItem(b)));}return c;};}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(c){var b=(function(){var g=document.createElement("form");var f=document.createElement("input");var d=document.documentElement;f.setAttribute("name","test");g.appendChild(f);d.appendChild(g);var h=g.elements?(typeof g.elements.test=="undefined"):null;d.removeChild(g);g=f=null;return h;})();var a=c.Element;c.Element=function(g,f){f=f||{};g=g.toLowerCase();var d=Element.cache;if(b&&f.name){g="<"+g+' name="'+f.name+'">';delete f.name;return Element.writeAttribute(document.createElement(g),f);}if(!d[g]){d[g]=Element.extend(document.createElement(g));}return Element.writeAttribute(d[g].cloneNode(false),f);};Object.extend(c.Element,a||{});if(a){c.Element.prototype=a.prototype;}})(this);Element.cache={};Element.idCounter=1;Element.Methods={visible:function(a){return $(a).style.display!="none";},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a;},hide:function(a){a=$(a);a.style.display="none";return a;},show:function(a){a=$(a);a.style.display="";return a;},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a;},update:(function(){var b=(function(){var f=document.createElement("select"),g=true;f.innerHTML='<option value="test">test</option>';if(f.options&&f.options[0]){g=f.options[0].nodeName.toUpperCase()!=="OPTION";}f=null;return g;})();var a=(function(){try{var f=document.createElement("table");if(f&&f.tBodies){f.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var h=typeof f.tBodies[0]=="undefined";f=null;return h;}}catch(g){return true;}})();var d=(function(){var f=document.createElement("script"),h=false;try{f.appendChild(document.createTextNode(""));h=!f.firstChild||f.firstChild&&f.firstChild.nodeType!==3;}catch(g){h=true;}f=null;return h;})();function c(g,h){g=$(g);if(h&&h.toElement){h=h.toElement();}if(Object.isElement(h)){return g.update().insert(h);}h=Object.toHTML(h);var f=g.tagName.toUpperCase();if(f==="SCRIPT"&&d){g.text=h;return g;}if(b||a){if(f in Element._insertionTranslations.tags){while(g.firstChild){g.removeChild(g.firstChild);}Element._getContentFromAnonymousElement(f,h.stripScripts()).each(function(j){g.appendChild(j);});}else{g.innerHTML=h.stripScripts();}}else{g.innerHTML=h.stripScripts();}h.evalScripts.bind(h).defer();return g;}return c;})(),replace:function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement();}else{if(!Object.isElement(c)){c=Object.toHTML(c);var a=b.ownerDocument.createRange();a.selectNode(b);c.evalScripts.bind(c).defer();c=a.createContextualFragment(c.stripScripts());}}b.parentNode.replaceChild(c,b);return b;},insert:function(c,f){c=$(c);if(Object.isString(f)||Object.isNumber(f)||Object.isElement(f)||(f&&(f.toElement||f.toHTML))){f={bottom:f};}var d,g,b,h;for(var a in f){d=f[a];a=a.toLowerCase();g=Element._insertionTranslations[a];if(d&&d.toElement){d=d.toElement();}if(Object.isElement(d)){g(c,d);continue;}d=Object.toHTML(d);b=((a=="before"||a=="after")?c.parentNode:c).tagName.toUpperCase();h=Element._getContentFromAnonymousElement(b,d.stripScripts());if(a=="top"||a=="after"){h.reverse();}h.each(g.curry(c));d.evalScripts.bind(d).defer();}return c;},wrap:function(b,c,a){b=$(b);if(Object.isElement(c)){$(c).writeAttribute(a||{});}else{if(Object.isString(c)){c=new Element(c,a);}else{c=new Element("div",c);}}if(b.parentNode){b.parentNode.replaceChild(c,b);}c.appendChild(b);return c;},inspect:function(b){b=$(b);var a="<"+b.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(g){var f=g.first(),c=g.last();var d=(b[f]||"").toString();if(d){a+=" "+c+"="+d.inspect(true);}});return a+">";},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a));}}return b;},ancestors:function(a){return Element.recursivelyCollect(a,"parentNode");},descendants:function(a){return Element.select(a,"*");},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling;}return $(a);},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[];}while(a&&a.nodeType!=1){a=a.nextSibling;}if(a){return[a].concat($(a).nextSiblings());}return[];},previousSiblings:function(a){return Element.recursivelyCollect(a,"previousSibling");},nextSiblings:function(a){return Element.recursivelyCollect(a,"nextSibling");},siblings:function(a){a=$(a);return Element.previousSiblings(a).reverse().concat(Element.nextSiblings(a));},match:function(b,a){if(Object.isString(a)){a=new Selector(a);}return a.match($(b));},up:function(b,d,a){b=$(b);if(arguments.length==1){return $(b.parentNode);}var c=Element.ancestors(b);return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a);},down:function(b,c,a){b=$(b);if(arguments.length==1){return Element.firstDescendant(b);}return Object.isNumber(c)?Element.descendants(b)[c]:Element.select(b,c)[a||0];},previous:function(b,d,a){b=$(b);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(b));}var c=Element.previousSiblings(b);return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a);},next:function(c,d,b){c=$(c);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(c));}var a=Element.nextSiblings(c);return Object.isNumber(d)?a[d]:Selector.findElement(a,d,b);},select:function(b){var a=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(b,a);},adjacent:function(b){var a=Array.prototype.slice.call(arguments,1);return Selector.findChildElements(b.parentNode,a).without(b);},identify:function(a){a=$(a);var b=Element.readAttribute(a,"id");if(b){return b;}do{b="anonymous_element_"+Element.idCounter++;}while($(b));Element.writeAttribute(a,"id",b);return b;},readAttribute:(function(){var a=(function(){var b=document.createElement("iframe"),d=false;document.documentElement.appendChild(b);try{b.getAttribute("type",2);}catch(c){d=true;}document.documentElement.removeChild(b);b=null;return d;})();return function(d,b){d=$(d);if(a&&b==="type"&&d.tagName.toUpperCase()=="IFRAME"){return d.getAttribute("type");}if(Prototype.Browser.IE){var c=Element._attributeTranslations.read;if(c.values[b]){return c.values[b](d,b);}if(c.names[b]){b=c.names[b];}if(b.include(":")){return(!d.attributes||!d.attributes[b])?null:d.attributes[b].value;}}return d.getAttribute(b);};})(),writeAttribute:function(f,c,g){f=$(f);var b={},d=Element._attributeTranslations.write;if(typeof c=="object"){b=c;}else{b[c]=Object.isUndefined(g)?true:g;}for(var a in b){c=d.names[a]||a;g=b[a];if(d.values[a]){c=d.values[a](f,g);}if(g===false||g===null){f.removeAttribute(c);}else{if(g===true){f.setAttribute(c,c);}else{f.setAttribute(c,g);}}}return f;},getHeight:function(a){return Element.getDimensions(a).height;},getWidth:function(a){return Element.getDimensions(a).width;},classNames:function(a){return new Element.ClassNames(a);},hasClassName:function(a,b){if(!(a=$(a))){return;}var c=a.className;return(c.length>0&&(c==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(c)));},addClassName:function(a,b){if(!(a=$(a))){return;}if(!Element.hasClassName(a,b)){a.className+=(a.className?" ":"")+b;}return a;},removeClassName:function(a,b){if(!(a=$(a))){return;}a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a;},toggleClassName:function(a,b){if(!(a=$(a))){return;}return Element[Element.hasClassName(a,b)?"removeClassName":"addClassName"](a,b);},cleanWhitespace:function(b){b=$(b);var c=b.firstChild;while(c){var a=c.nextSibling;if(c.nodeType==3&&!/\S/.test(c.nodeValue)){b.removeChild(c);}c=a;}return b;},empty:function(a){return $(a).innerHTML.blank();},descendantOf:function(b,a){b=$(b),a=$(a);if(b.compareDocumentPosition){return(b.compareDocumentPosition(a)&8)===8;}if(a.contains){return a.contains(b)&&a!==b;}while(b=b.parentNode){if(b==a){return true;}}return false;},scrollTo:function(a){a=$(a);var b=Element.cumulativeOffset(a);window.scrollTo(b[0],b[1]);return a;},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c.camelize();var d=b.style[c];if(!d||d=="auto"){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null;}if(c=="opacity"){return d?parseFloat(d):1;}return d=="auto"?null:d;},getOpacity:function(a){return $(a).getStyle("opacity");},setStyle:function(b,c){b=$(b);var f=b.style,a;if(Object.isString(c)){b.style.cssText+=";"+c;return c.include("opacity")?b.setOpacity(c.match(/opacity:\s*(\d?\.?\d*)/)[1]):b;}for(var d in c){if(d=="opacity"){b.setOpacity(c[d]);}else{f[(d=="float"||d=="cssFloat")?(Object.isUndefined(f.styleFloat)?"cssFloat":"styleFloat"):d]=c[d];}}return b;},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;return a;},getDimensions:function(c){c=$(c);var h=Element.getStyle(c,"display");if(h!="none"&&h!=null){return{width:c.offsetWidth,height:c.offsetHeight};}var b=c.style;var g=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";if(d!="fixed"){b.position="absolute";}b.display="block";var j=c.clientWidth;var f=c.clientHeight;b.display=a;b.position=d;b.visibility=g;return{width:j,height:f};},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(Prototype.Browser.Opera){a.style.top=0;a.style.left=0;}}return a;},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right="";}return a;},makeClipping:function(a){a=$(a);if(a._overflow){return a;}a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden"){a.style.overflow="hidden";}return a;},undoClipping:function(a){a=$(a);if(!a._overflow){return a;}a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a;},cumulativeOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent;}while(b);return Element._returnOffset(c,a);},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){if(b.tagName.toUpperCase()=="BODY"){break;}var c=Element.getStyle(b,"position");if(c!=="static"){break;}}}while(b);return Element._returnOffset(d,a);},absolutize:function(b){b=$(b);if(Element.getStyle(b,"position")=="absolute"){return b;}var d=Element.positionedOffset(b);var g=d[1];var f=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=f-parseFloat(b.style.left||0);b._originalTop=g-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=g+"px";b.style.left=f+"px";b.style.width=c+"px";b.style.height=a+"px";return b;},relativize:function(a){a=$(a);if(Element.getStyle(a,"position")=="relative"){return a;}a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a;},cumulativeScrollOffset:function(b){var a=0,c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode;}while(b);return Element._returnOffset(c,a);},getOffsetParent:function(a){if(a.offsetParent){return $(a.offsetParent);}if(a==document.body){return $(a);}while((a=a.parentNode)&&a!=document.body){if(Element.getStyle(a,"position")!="static"){return $(a);}}return $(document.body);},viewportOffset:function(d){var a=0,c=0;var b=d;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&Element.getStyle(b,"position")=="absolute"){break;}}while(b=b.offsetParent);b=d;do{if(!Prototype.Browser.Opera||(b.tagName&&(b.tagName.toUpperCase()=="BODY"))){a-=b.scrollTop||0;c-=b.scrollLeft||0;}}while(b=b.parentNode);return Element._returnOffset(c,a);},clonePosition:function(b,d){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var f=Element.viewportOffset(d);b=$(b);var g=[0,0];var c=null;if(Element.getStyle(b,"position")=="absolute"){c=Element.getOffsetParent(b);g=Element.viewportOffset(c);}if(c==document.body){g[0]-=document.body.offsetLeft;g[1]-=document.body.offsetTop;}if(a.setLeft){b.style.left=(f[0]-g[0]+a.offsetLeft)+"px";}if(a.setTop){b.style.top=(f[1]-g[1]+a.offsetTop)+"px";}if(a.setWidth){b.style.width=d.offsetWidth+"px";}if(a.setHeight){b.style.height=d.offsetHeight+"px";}return b;}};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(d,b,c){switch(c){case"left":case"top":case"right":case"bottom":if(d(b,"position")==="static"){return null;}case"height":case"width":if(!Element.visible(b)){return null;}var f=parseInt(d(b,c),10);if(f!==b["offset"+c.capitalize()]){return f+"px";}var a;if(c==="height"){a=["border-top-width","padding-top","padding-bottom","border-bottom-width"];}else{a=["border-left-width","padding-left","padding-right","border-right-width"];}return a.inject(f,function(g,h){var j=d(b,h);return j===null?g:g-parseInt(j,10);})+"px";default:return d(b,c);}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(c,a,b){if(b==="title"){return a.title;}return c(a,b);});}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,b){b=$(b);try{b.offsetParent;}catch(f){return $(document.body);}var a=b.getStyle("position");if(a!=="static"){return c(b);}b.setStyle({position:"relative"});var d=c(b);b.setStyle({position:a});return d;});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(f,c){c=$(c);try{c.offsetParent;}catch(h){return Element._returnOffset(0,0);}var b=c.getStyle("position");if(b!=="static"){return f(c);}var d=c.getOffsetParent();if(d&&d.getStyle("position")==="fixed"){d.setStyle({zoom:1});}c.setStyle({position:"relative"});var g=f(c);c.setStyle({position:b});return g;});});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(b,a){try{a.offsetParent;}catch(c){return Element._returnOffset(0,0);}return b(a);});Element.Methods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b];}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100;}}return 1;}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+b.capitalize()]+"px";}return null;}return c;};Element.Methods.setOpacity=function(b,f){function g(h){return h.replace(/alpha\([^\)]*\)/gi,"");}b=$(b);var a=b.currentStyle;if((a&&!a.hasLayout)||(!a&&b.style.zoom=="normal")){b.style.zoom=1;}var d=b.getStyle("filter"),c=b.style;if(f==1||f===""){(d=g(d))?c.filter=d:c.removeAttribute("filter");return b;}else{if(f<0.00001){f=0;}}c.filter=g(d)+"alpha(opacity="+(f*100)+")";return b;};Element._attributeTranslations=(function(){var b="className";var a="for";var c=document.createElement("div");c.setAttribute(b,"x");if(c.className!=="x"){c.setAttribute("class","x");if(c.className==="x"){b="class";}}c=null;c=document.createElement("label");c.setAttribute(a,"x");if(c.htmlFor!=="x"){c.setAttribute("htmlFor","x");if(c.htmlFor==="x"){a="htmlFor";}}c=null;return{read:{names:{"class":b,className:b,"for":a,htmlFor:a},values:{_getAttr:function(d,f){return d.getAttribute(f,2);},_getAttrNode:function(d,g){var f=d.getAttributeNode(g);return f?f.value:"";},_getEv:(function(){var d=document.createElement("div");d.onclick=Prototype.emptyFunction;var h=d.getAttribute("onclick");var g;if(String(h).indexOf("{")>-1){g=function(f,j){j=f.getAttribute(j);if(!j){return null;}j=j.toString();j=j.split("{")[1];j=j.split("}")[0];return j.strip();};}else{if(h===""){g=function(f,j){j=f.getAttribute(j);if(!j){return null;}return j.strip();};}}d=null;return g;})(),_flag:function(d,f){return $(d).hasAttribute(f)?f:null;},style:function(d){return d.style.cssText.toLowerCase();},title:function(d){return d.title;}}}};})();Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b;},style:function(a,b){a.style.cssText=b?b:"";}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a;});(function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv});})(Element._attributeTranslations.read.values);if(Prototype.BrowserFeatures.ElementExtensions){(function(){function a(f){var b=f.getElementsByTagName("*"),d=[];for(var c=0,g;g=b[c];c++){if(g.tagName!=="!"){d.push(g);}}return d;}Element.Methods.down=function(c,d,b){c=$(c);if(arguments.length==1){return c.firstDescendant();}return Object.isNumber(d)?a(c)[d]:Element.select(c,d)[b||0];};})();}}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==="")?"":(b<0.00001)?0:b;return a;};}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;if(b==1){if(a.tagName.toUpperCase()=="IMG"&&a.width){a.width++;a.width--;}else{try{var d=document.createTextNode(" ");a.appendChild(d);a.removeChild(d);}catch(c){}}}return a;};Element.Methods.cumulativeOffset=function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,"position")=="absolute"){break;}}b=b.offsetParent;}while(b);return Element._returnOffset(c,a);};}}}}if("outerHTML" in document.documentElement){Element.Methods.replace=function(c,f){c=$(c);if(f&&f.toElement){f=f.toElement();}if(Object.isElement(f)){c.parentNode.replaceChild(f,c);return c;}f=Object.toHTML(f);var d=c.parentNode,b=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[b]){var g=c.next();var a=Element._getContentFromAnonymousElement(b,f.stripScripts());d.removeChild(c);if(g){a.each(function(h){d.insertBefore(h,g);});}else{a.each(function(h){d.appendChild(h);});}}else{c.outerHTML=f.stripScripts();}f.evalScripts.bind(f).defer();return c;};}Element._returnOffset=function(b,c){var a=[b,c];a.left=b;a.top=c;return a;};Element._getContentFromAnonymousElement=function(c,b){var d=new Element("div"),a=Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];a[2].times(function(){d=d.firstChild;});}else{d.innerHTML=b;}return $A(d.childNodes);};Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a);},top:function(a,b){a.insertBefore(b,a.firstChild);},bottom:function(a,b){a.appendChild(b);},after:function(a,b){a.parentNode.insertBefore(b,a.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(){var a=Element._insertionTranslations.tags;Object.extend(a,{THEAD:a.TBODY,TFOOT:a.TBODY,TH:a.TD});})();Element.Methods.Simulated={hasAttribute:function(a,c){c=Element._attributeTranslations.has[c]||c;var b=$(a).getAttributeNode(c);return !!(b&&b.specified);}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(a){if(!Prototype.BrowserFeatures.ElementExtensions&&a.__proto__){window.HTMLElement={};window.HTMLElement.prototype=a.__proto__;Prototype.BrowserFeatures.ElementExtensions=true;}a=null;})(document.createElement("div"));Element.extend=(function(){function c(j){if(typeof window.Element!="undefined"){var l=window.Element.prototype;if(l){var n="_"+(Math.random()+"").slice(2);var k=document.createElement(j);l[n]="x";var m=(k[n]!=="x");delete l[n];k=null;return m;}}return false;}function b(k,j){for(var m in j){var l=j[m];if(Object.isFunction(l)&&!(m in k)){k[m]=l.methodize();}}}var d=c("object");var g=c("applet");if(Prototype.BrowserFeatures.SpecificElementExtensions){if(d&&g){return function(k){if(k&&typeof k._extendedByPrototype=="undefined"){var j=k.tagName;if(j&&(/^(?:object|applet|embed)$/i.test(j))){b(k,Element.Methods);b(k,Element.Methods.Simulated);b(k,Element.Methods.ByTag[j.toUpperCase()]);}}return k;};}return Prototype.K;}var a={},f=Element.Methods.ByTag;var h=Object.extend(function(l){if(!l||typeof l._extendedByPrototype!="undefined"||l.nodeType!=1||l==window){return l;}var j=Object.clone(a),k=l.tagName.toUpperCase();if(f[k]){Object.extend(j,f[k]);}b(l,j);l._extendedByPrototype=Prototype.emptyFunction;return l;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(a,Element.Methods);Object.extend(a,Element.Methods.Simulated);}}});h.refresh();return h;})();Element.hasAttribute=function(a,b){if(a.hasAttribute){return a.hasAttribute(b);}return Element.Methods.Simulated.hasAttribute(a,b);};Element.addMethods=function(c){var k=Prototype.BrowserFeatures,d=Element.Methods.ByTag;if(!c){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 b=c;c=arguments[1];}if(!b){Object.extend(Element.Methods,c||{});}else{if(Object.isArray(b)){b.each(h);}else{h(b);}}function h(m){m=m.toUpperCase();if(!Element.Methods.ByTag[m]){Element.Methods.ByTag[m]={};}Object.extend(Element.Methods.ByTag[m],c);}function a(o,n,m){m=m||false;for(var q in o){var p=o[q];if(!Object.isFunction(p)){continue;}if(!m||!(q in n)){n[q]=p.methodize();}}}function f(p){var m;var o={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(o[p]){m="HTML"+o[p]+"Element";}if(window[m]){return window[m];}m="HTML"+p+"Element";if(window[m]){return window[m];}m="HTML"+p.capitalize()+"Element";if(window[m]){return window[m];}var n=document.createElement(p);var q=n.__proto__||n.constructor.prototype;n=null;return q;}var j=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(k.ElementExtensions){a(Element.Methods,j);a(Element.Methods.Simulated,j,true);}if(k.SpecificElementExtensions){for(var l in Element.Methods.ByTag){var g=f(l);if(Object.isUndefined(g)){continue;}a(d[l],g.prototype);}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh();}Element.cache={};};document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()};},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};(function(b){var h=Prototype.Browser,f=document,c,d={};function a(){if(h.WebKit&&!f.evaluate){return document;}if(h.Opera&&window.parseFloat(window.opera.version())<9.5){return document.body;}return document.documentElement;}function g(j){if(!c){c=a();}d[j]="client"+j;b["get"+j]=function(){return c[d[j]];};return b["get"+j]();}b.getWidth=g.curry("Width");b.getHeight=g.curry("Height");})(document.viewport);Element.Storage={UID:1};Element.addMethods({getStorage:function(b){if(!(b=$(b))){return;}var a;if(b===window){a=0;}else{if(typeof b._prototypeUID==="undefined"){b._prototypeUID=[Element.Storage.UID++];}a=b._prototypeUID[0];}if(!Element.Storage[a]){Element.Storage[a]=$H();}return Element.Storage[a];},store:function(b,a,c){if(!(b=$(b))){return;}if(arguments.length===2){Element.getStorage(b).update(a);}else{Element.getStorage(b).set(a,c);}return b;},retrieve:function(c,b,a){if(!(c=$(c))){return;}var f=Element.getStorage(c),d=f.get(b);if(Object.isUndefined(d)){f.set(b,a);d=a;}return d;},clone:function(c,a){if(!(c=$(c))){return;}var f=c.cloneNode(a);f._prototypeUID=void 0;if(a){var d=Element.select(f,"*"),b=d.length;while(b--){d[b]._prototypeUID=void 0;}}return Element.extend(f);}});var Selector=Class.create({initialize:function(a){this.expression=a.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI";}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher();}else{this.mode="normal";this.compileMatcher();}}},shouldUseXPath:(function(){var a=(function(){var f=false;if(document.evaluate&&window.XPathResult){var d=document.createElement("div");d.innerHTML="<ul><li></li></ul><div><ul><li></li></ul></div>";var c=".//*[local-name()='ul' or local-name()='UL']//*[local-name()='li' or local-name()='LI']";var b=document.evaluate(c,d,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);f=(b.snapshotLength!==2);d=null;}return f;})();return 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(b)){return false;}if(a){return false;}return true;};})(),shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false;}if(Selector.CASE_INSENSITIVE_CLASS_NAMES){return false;}if(!Selector._div){Selector._div=new Element("div");}try{Selector._div.querySelector(this.expression);}catch(a){return false;}return true;},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m,len=ps.length,name;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=0;i<len;i++){p=ps[i].re;name=ps[i].name;if(m=e.match(p)){this.matcher.push(Object.isFunction(c[name])?c[name](m):new Template(c[name]).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 h=this.expression,j=Selector.patterns,c=Selector.xpath,g,b,a=j.length,d;if(Selector._cache[h]){this.xpath=Selector._cache[h];return;}this.matcher=[".//*"];while(h&&g!=h&&(/\S/).test(h)){g=h;for(var f=0;f<a;f++){d=j[f].name;if(b=h.match(j[f].re)){this.matcher.push(Object.isFunction(c[d])?c[d](b):new Template(c[d]).evaluate(b));h=h.replace(b[0],"");break;}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath;},findElements:function(a){a=a||document;var c=this.expression,b;switch(this.mode){case"selectorsAPI":if(a!==document){var d=a.id,f=$(a).identify();f=f.replace(/[\.:]/g,"\\$0");c="#"+f+" "+c;}b=$A(a.querySelectorAll(c)).map(Element.extend);a.id=d;return b;case"xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a);}},match:function(k){this.tokens=[];var q=this.expression,a=Selector.patterns,f=Selector.assertions;var b,d,g,o=a.length,c;while(q&&b!==q&&(/\S/).test(q)){b=q;for(var j=0;j<o;j++){d=a[j].re;c=a[j].name;if(g=q.match(d)){if(f[c]){this.tokens.push([c,Object.clone(g)]);q=q.replace(g[0],"");}else{return this.findElements(document).include(k);}}}}var n=true,c,l;for(var j=0,h;h=this.tokens[j];j++){c=h[0],l=h[1];if(!Selector.assertions[c](k,l)){n=false;break;}}return n;},toString:function(){return this.expression;},inspect:function(){return"#<Selector:"+this.expression.inspect()+">";}});if(Prototype.BrowserFeatures.SelectorsAPI&&document.compatMode==="BackCompat"){Selector.CASE_INSENSITIVE_CLASS_NAMES=(function(){var c=document.createElement("div"),a=document.createElement("span");c.id="prototype_test_id";a.className="Test";c.appendChild(a);var b=(c.querySelector("#prototype_test_id .test")!==null);c=a=null;return b;})();}Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return"";}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']";},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return new Template("[@#{1}]").evaluate(a);},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a);},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b){return"";}if(Object.isFunction(b)){return b(a);}return new Template(Selector.xpath.pseudos[a[1]]).evaluate(a);},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)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(f){var j=f[6],c=Selector.patterns,k=Selector.xpath,a,l,h=c.length,b;var d=[];while(j&&a!=j&&(/\S/).test(j)){a=j;for(var g=0;g<h;g++){b=c[g].name;if(f=j.match(c[g].re)){l=Object.isFunction(k[b])?k[b](f):new Template(k[b]).evaluate(f);d.push("("+l.substring(1,l.length-1)+")");j=j.replace(f[0],"");break;}}}return"[not("+d.join(" and ")+")]";},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a);},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a);},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a);},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a);},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a);},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a);},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a);},nth:function(h,f){var j,k=f[6],d;if(k=="even"){k="2n+0";}if(k=="odd"){k="2n+1";}if(j=k.match(/^(\d+)$/)){return"["+h+"= "+j[1]+"]";}if(j=k.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(j[1]=="-"){j[1]=-1;}var g=j[1]?Number(j[1]):1;var c=j[2]?Number(j[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:h,a:g,b:c});}}}},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(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(a);},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"');}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a);},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:[{name:"laterSibling",re:/^\s*~\s*/},{name:"child",re:/^\s*>\s*/},{name:"adjacent",re:/^\s*\+\s*/},{name:"descendant",re:/^\s/},{name:"tagName",re:/^\s*(\*|[\w\-]+)(\b|$)?/},{name:"id",re:/^#([\w\-\*]+)(\b|$)/},{name:"className",re:/^\.([\w\-\*]+)(\b|$)/},{name:"pseudo",re:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/},{name:"attrPresence",re:/^\[((?:[\w-]+:)?[\w-]+)\]/},{name:"attr",re:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/}],assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase();},className:function(a,b){return Element.hasClassName(a,b[1]);},id:function(a,b){return a.id===b[1];},attrPresence:function(a,b){return Element.hasAttribute(a,b[1]);},attr:function(b,c){var a=Element.readAttribute(b,c[1]);return a&&Selector.operators[c[2]](a,c[5]||c[6]);}},handlers:{concat:function(d,c){for(var f=0,g;g=c[f];f++){d.push(g);}return d;},mark:function(a){var d=Prototype.emptyFunction;for(var b=0,c;c=a[b];b++){c._countedByPrototype=d;}return a;},unmark:(function(){var a=(function(){var b=document.createElement("div"),f=false,d="_countedByPrototype",c="x";b[d]=c;f=(b.getAttribute(d)===c);b=null;return f;})();return a?function(b){for(var c=0,d;d=b[c];c++){d.removeAttribute("_countedByPrototype");}return b;}:function(b){for(var c=0,d;d=b[c];c++){d._countedByPrototype=void 0;}return b;};})(),index:function(a,d,h){a._countedByPrototype=Prototype.emptyFunction;if(d){for(var b=a.childNodes,f=b.length-1,c=1;f>=0;f--){var g=b[f];if(g.nodeType==1&&(!h||g._countedByPrototype)){g.nodeIndex=c++;}}}else{for(var f=0,c=1,b=a.childNodes;g=b[f];f++){if(g.nodeType==1&&(!h||g._countedByPrototype)){g.nodeIndex=c++;}}}},unique:function(b){if(b.length==0){return b;}var d=[],f;for(var c=0,a=b.length;c<a;c++){if(typeof(f=b[c])._countedByPrototype=="undefined"){f._countedByPrototype=Prototype.emptyFunction;d.push(Element.extend(f));}}return Selector.handlers.unmark(d);},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,f.getElementsByTagName("*"));}return b;},child:function(a){var f=Selector.handlers;for(var d=0,c=[],g;g=a[d];d++){for(var b=0,k;k=g.childNodes[b];b++){if(k.nodeType==1&&k.tagName!="!"){c.push(k);}}}return c;},adjacent:function(a){for(var c=0,b=[],f;f=a[c];c++){var d=this.nextElementSibling(f);if(d){b.push(d);}}return b;},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],f;f=a[c];c++){d.concat(b,Element.nextSiblings(f));}return b;},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a;}}return null;},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a;}}return null;},tagName:function(a,k,c,b){var l=c.toUpperCase();var f=[],j=Selector.handlers;if(a){if(b){if(b=="descendant"){for(var g=0,d;d=a[g];g++){j.concat(f,d.getElementsByTagName(c));}return f;}else{a=this[b](a);}if(c=="*"){return a;}}for(var g=0,d;d=a[g];g++){if(d.tagName.toUpperCase()===l){f.push(d);}}return f;}else{return k.getElementsByTagName(c);}},id:function(a,m,b,c){var l=$(b),k=Selector.handlers;if(m==document){if(!l){return[];}if(!a){return[l];}}else{if(!m.sourceIndex||m.sourceIndex<1){var a=m.getElementsByTagName("*");for(var f=0,d;d=a[f];f++){if(d.id===b){return[d];}}}}if(a){if(c){if(c=="child"){for(var g=0,d;d=a[g];g++){if(l.parentNode==d){return[l];}}}else{if(c=="descendant"){for(var g=0,d;d=a[g];g++){if(Element.descendantOf(l,d)){return[l];}}}else{if(c=="adjacent"){for(var g=0,d;d=a[g];g++){if(Selector.handlers.previousElementSibling(l)==d){return[l];}}}else{a=k[c](a);}}}}for(var g=0,d;d=a[g];g++){if(d==l){return[l];}}return[];}return(l&&Element.descendantOf(l,m))?[l]:[];},className:function(b,a,c,d){if(b&&d){b=this[d](b);}return Selector.handlers.byClassName(b,a,c);},byClassName:function(c,b,g){if(!c){c=Selector.handlers.descendant([b]);}var j=" "+g+" ";for(var f=0,d=[],h,a;h=c[f];f++){a=h.className;if(a.length==0){continue;}if(a==g||(" "+a+" ").include(j)){d.push(h);}}return d;},attrPresence:function(c,b,a,h){if(!c){c=b.getElementsByTagName("*");}if(c&&h){c=this[h](c);}var f=[];for(var d=0,g;g=c[d];d++){if(Element.hasAttribute(g,a)){f.push(g);}}return f;},attr:function(a,k,j,l,c,b){if(!a){a=k.getElementsByTagName("*");}if(a&&b){a=this[b](a);}var m=Selector.operators[c],g=[];for(var f=0,d;d=a[f];f++){var h=Element.readAttribute(d,j);if(h===null){continue;}if(m(h,l)){g.push(d);}}return g;},pseudo:function(b,c,f,a,d){if(b&&d){b=this[d](b);}if(!b){b=a.getElementsByTagName("*");}return Selector.pseudos[c](b,f,a);}},pseudos:{"first-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.previousElementSibling(f)){continue;}c.push(f);}return c;},"last-child":function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(Selector.handlers.nextElementSibling(f)){continue;}c.push(f);}return c;},"only-child":function(b,j,a){var f=Selector.handlers;for(var d=0,c=[],g;g=b[d];d++){if(!f.previousElementSibling(g)&&!f.nextElementSibling(g)){c.push(g);}}return c;},"nth-child":function(b,c,a){return Selector.pseudos.nth(b,c,a);},"nth-last-child":function(b,c,a){return Selector.pseudos.nth(b,c,a,true);},"nth-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,false,true);},"nth-last-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,true,true);},"first-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,false,true);},"last-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,true,true);},"only-of-type":function(b,d,a){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,d,a),d,a);},getIndices:function(d,c,f){if(d==0){return c>0?[c]:[];}return $R(1,f).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b);}return a;});},nth:function(c,t,v,s,f){if(c.length==0){return[];}if(t=="even"){t="2n+0";}if(t=="odd"){t="2n+1";}var r=Selector.handlers,q=[],d=[],k;r.mark(c);for(var p=0,g;g=c[p];p++){if(!g.parentNode._countedByPrototype){r.index(g.parentNode,s,f);d.push(g.parentNode);}}if(t.match(/^\d+$/)){t=Number(t);for(var p=0,g;g=c[p];p++){if(g.nodeIndex==t){q.push(g);}}}else{if(k=t.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(k[1]=="-"){k[1]=-1;}var w=k[1]?Number(k[1]):1;var u=k[2]?Number(k[2]):0;var y=Selector.pseudos.getIndices(w,u,c.length);for(var p=0,g,n=y.length;g=c[p];p++){for(var o=0;o<n;o++){if(g.nodeIndex==y[o]){q.push(g);}}}}}r.unmark(c);r.unmark(d);return q;},empty:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.tagName=="!"||f.firstChild){continue;}c.push(f);}return c;},not:function(a,d,l){var j=Selector.handlers,n,c;var k=new Selector(d).findElements(l);j.mark(k);for(var g=0,f=[],b;b=a[g];g++){if(!b._countedByPrototype){f.push(b);}}j.unmark(k);return f;},enabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(!f.disabled&&(!f.type||f.type!=="hidden")){c.push(f);}}return c;},disabled:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.disabled){c.push(f);}}return c;},checked:function(b,g,a){for(var d=0,c=[],f;f=b[d];d++){if(f.checked){c.push(f);}}return c;}},operators:{"=":function(b,a){return b==a;},"!=":function(b,a){return b!=a;},"^=":function(b,a){return b==a||b&&b.startsWith(a);},"$=":function(b,a){return b==a||b&&b.endsWith(a);},"*=":function(b,a){return b==a||b&&b.include(a);},"~=":function(b,a){return(" "+b+" ").include(" "+a+" ");},"|=":function(b,a){return("-"+(b||"").toUpperCase()+"-").include("-"+(a||"").toUpperCase()+"-");}},split:function(b){var a=[];b.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){a.push(c[1].strip());});return a;},matchElements:function(g,j){var f=$$(j),d=Selector.handlers;d.mark(f);for(var c=0,b=[],a;a=g[c];c++){if(a._countedByPrototype){b.push(a);}}d.unmark(f);return b;},findElement:function(b,c,a){if(Object.isNumber(c)){a=c;c=false;}return Selector.matchElements(b,c||"*")[a||0];},findChildElements:function(f,j){j=Selector.split(j.join(","));var d=[],g=Selector.handlers;for(var c=0,b=j.length,a;c<b;c++){a=new Selector(j[c].strip());g.concat(d,a.findElements(f));}return(b>1)?g.unique(d):d;}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var f=0,g;g=c[f];f++){if(g.tagName!=="!"){d.push(g);}}return d;}});}function $$(){return Selector.findChildElements(document,$A(arguments));}var Form={reset:function(a){a=$(a);a.reset();return a;},serializeElements:function(h,b){if(typeof b!="object"){b={hash:!!b};}else{if(Object.isUndefined(b.hash)){b.hash=true;}}var c,g,a=false,f=b.submit;var d=h.inject({},function(j,k){if(!k.disabled&&k.name){c=k.name;g=$(k).getValue();if(g!=null&&k.type!="file"&&(k.type!="submit"||(!a&&f!==false&&(!f||c==f)&&(a=true)))){if(c in j){if(!Object.isArray(j[c])){j[c]=[j[c]];}j[c].push(g);}else{j[c]=g;}}}return j;});return b.hash?d:Object.toQueryString(d);}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a);},getElements:function(f){var g=$(f).getElementsByTagName("*"),d,a=[],c=Form.Element.Serializers;for(var b=0;d=g[b];b++){a.push(d);}return a.inject([],function(h,j){if(c[j.tagName.toLowerCase()]){h.push(Element.extend(j));}return h;});},getInputs:function(h,c,d){h=$(h);var a=h.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend);}for(var f=0,j=[],g=a.length;f<g;f++){var b=a[f];if((c&&b.type!=c)||(d&&b.name!=d)){continue;}j.push(Element.extend(b));}return j;},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a;},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a;},findFirstElement:function(b){var c=$(b).getElements().findAll(function(d){return"hidden"!=d.type&&!d.disabled;});var a=c.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0;}).sortBy(function(d){return d.tabIndex;}).first();return a?a:c.find(function(d){return/^(?:input|select|textarea)$/i.test(d.tagName);});},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a;},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href;}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams();}Object.extend(a.parameters,d);}if(b.hasAttribute("method")&&!a.method){a.method=b.method;}return new Ajax.Request(c,a);}};Form.Element={focus:function(a){$(a).focus();return a;},select:function(a){$(a).select();return a;}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c);}}return"";},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a);},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a;},clear:function(a){$(a).value="";return a;},present:function(a){return $(a).value!="";},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!(/^(?:button|reset|submit)$/i.test(a.type)))){a.select();}}catch(b){}return a;},disable:function(a){a=$(a);a.disabled=true;return a;},enable:function(a){a=$(a);a.disabled=false;return a;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b);}},inputSelector:function(a,b){if(Object.isUndefined(b)){return a.checked?a.value:null;}else{a.checked=!!b;}},textarea:function(a,b){if(Object.isUndefined(b)){return a.value;}else{a.value=b;}},select:function(c,g){if(Object.isUndefined(g)){return this[c.type=="select-one"?"selectOne":"selectMany"](c);}else{var b,d,h=!Object.isArray(g);for(var a=0,f=c.length;a<f;a++){b=c.options[a];d=this.optionValue(b);if(h){if(d==g){b.selected=true;return;}}else{b.selected=g.include(d);}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null;},selectMany:function(d){var a,f=d.length;if(!f){return null;}for(var c=0,a=[];c<f;c++){var b=d.options[c];if(b.selected){a.push(this.optionValue(b));}}return a;},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text;}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b);this.element=$(a);this.lastValue=this.getValue();},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a;}}});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(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks();}else{this.registerCallback(this.element);}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"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);}});(function(){var y={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:{}};var f=document.documentElement;var z="onmouseenter" in f&&"onmouseleave" in f;var q;if(Prototype.Browser.IE){var j={0:1,1:4,2:2};q=function(B,A){return B.button===j[A];};}else{if(Prototype.Browser.WebKit){q=function(B,A){switch(A){case 0:return B.which==1&&!B.metaKey;case 1:return B.which==1&&B.metaKey;default:return false;}};}else{q=function(B,A){return B.which?(B.which===A+1):(B.button===A);};}}function t(A){return q(A,0);}function s(A){return q(A,1);}function m(A){return q(A,2);}function c(C){C=y.extend(C);var B=C.target,A=C.type,D=C.currentTarget;if(D&&D.tagName){if(A==="load"||A==="error"||(A==="click"&&D.tagName.toLowerCase()==="input"&&D.type==="radio")){B=D;}}if(B.nodeType==Node.TEXT_NODE){B=B.parentNode;}return Element.extend(B);}function o(B,D){var A=y.element(B);if(!D){return A;}var C=[A].concat(A.ancestors());return Selector.findElement(C,D,0);}function r(A){return{x:b(A),y:a(A)};}function b(C){var B=document.documentElement,A=document.body||{scrollLeft:0};return C.pageX||(C.clientX+(B.scrollLeft||A.scrollLeft)-(B.clientLeft||0));}function a(C){var B=document.documentElement,A=document.body||{scrollTop:0};return C.pageY||(C.clientY+(B.scrollTop||A.scrollTop)-(B.clientTop||0));}function p(A){y.extend(A);A.preventDefault();A.stopPropagation();A.stopped=true;}y.Methods={isLeftClick:t,isMiddleClick:s,isRightClick:m,element:c,findElement:o,pointer:r,pointerX:b,pointerY:a,stop:p};var v=Object.keys(y.Methods).inject({},function(A,B){A[B]=y.Methods[B].methodize();return A;});if(Prototype.Browser.IE){function h(B){var A;switch(B.type){case"mouseover":A=B.fromElement;break;case"mouseout":A=B.toElement;break;default:return null;}return Element.extend(A);}Object.extend(v,{stopPropagation:function(){this.cancelBubble=true;},preventDefault:function(){this.returnValue=false;},inspect:function(){return"[object Event]";}});y.extend=function(B,A){if(!B){return false;}if(B._extendedByPrototype){return B;}B._extendedByPrototype=Prototype.emptyFunction;var C=y.pointer(B);Object.extend(B,{target:B.srcElement||A,relatedTarget:h(B),pageX:C.x,pageY:C.y});return Object.extend(B,v);};}else{y.prototype=window.Event.prototype||document.createEvent("HTMLEvents").__proto__;Object.extend(y.prototype,v);y.extend=Prototype.K;}function n(E,D,F){var C=Element.retrieve(E,"prototype_event_registry");if(Object.isUndefined(C)){d.push(E);C=Element.retrieve(E,"prototype_event_registry",$H());}var A=C.get(D);if(Object.isUndefined(A)){A=[];C.set(D,A);}if(A.pluck("handler").include(F)){return false;}var B;if(D.include(":")){B=function(G){if(Object.isUndefined(G.eventName)){return false;}if(G.eventName!==D){return false;}y.extend(G,E);F.call(E,G);};}else{if(!z&&(D==="mouseenter"||D==="mouseleave")){if(D==="mouseenter"||D==="mouseleave"){B=function(H){y.extend(H,E);var G=H.relatedTarget;while(G&&G!==E){try{G=G.parentNode;}catch(I){G=E;}}if(G===E){return;}F.call(E,H);};}}else{B=function(G){y.extend(G,E);F.call(E,G);};}}B.handler=F;A.push(B);return B;}function g(){for(var A=0,B=d.length;A<B;A++){y.stopObserving(d[A]);d[A]=null;}}var d=[];if(Prototype.Browser.IE){window.attachEvent("onunload",g);}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false);}var l=Prototype.K;if(!z){l=function(B){var A={mouseenter:"mouseover",mouseleave:"mouseout"};return B in A?A[B]:B;};}function u(D,C,E){D=$(D);var B=n(D,C,E);if(!B){return D;}if(C.include(":")){if(D.addEventListener){D.addEventListener("dataavailable",B,false);}else{D.attachEvent("ondataavailable",B);D.attachEvent("onfilterchange",B);}}else{var A=l(C);if(D.addEventListener){D.addEventListener(A,B,false);}else{D.attachEvent("on"+A,B);}}return D;}function k(F,D,G){F=$(F);var C=Element.retrieve(F,"prototype_event_registry");if(Object.isUndefined(C)){return F;}if(D&&!G){var E=C.get(D);if(Object.isUndefined(E)){return F;}E.each(function(H){Element.stopObserving(F,D,H.handler);});return F;}else{if(!D){C.each(function(J){var H=J.key,I=J.value;I.each(function(K){Element.stopObserving(F,H,K.handler);});});return F;}}var E=C.get(D);if(!E){return;}var B=E.find(function(H){return H.handler===G;});if(!B){return F;}var A=l(D);if(D.include(":")){if(F.removeEventListener){F.removeEventListener("dataavailable",B,false);}else{F.detachEvent("ondataavailable",B);F.detachEvent("onfilterchange",B);}}else{if(F.removeEventListener){F.removeEventListener(A,B,false);}else{F.detachEvent("on"+A,B);}}C.set(D,E.without(B));return F;}function w(D,C,B,A){D=$(D);if(Object.isUndefined(A)){A=true;}if(D==document&&document.createEvent&&!D.dispatchEvent){D=document.documentElement;}var E;if(document.createEvent){E=document.createEvent("HTMLEvents");E.initEvent("dataavailable",true,true);}else{E=document.createEventObject();E.eventType=A?"ondataavailable":"onfilterchange";}E.eventName=C;E.memo=B||{};if(document.createEvent){D.dispatchEvent(E);}else{D.fireEvent(E.eventType,E);}return y.extend(E);}Object.extend(y,y.Methods);Object.extend(y,{fire:w,observe:u,stopObserving:k});Element.addMethods({fire:w,observe:u,stopObserving:k});Object.extend(document,{fire:w.methodize(),observe:u.methodize(),stopObserving:k.methodize(),loaded:false});if(window.Event){Object.extend(window.Event,y);}else{window.Event=y;}})();(function(){var d;function a(){if(document.loaded){return;}if(d){window.clearTimeout(d);}document.loaded=true;document.fire("dom:loaded");}function c(){if(document.readyState==="complete"){document.stopObserving("readystatechange",c);a();}}function b(){try{document.documentElement.doScroll("left");}catch(f){d=b.defer();return;}a();}if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false);}else{document.observe("readystatechange",c);if(window==top){d=b.defer();}}Event.observe(window,"load",a);})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b});},Top:function(a,b){return Element.insert(a,{top:b});},Bottom:function(a,b){return Element.insert(a,{bottom:b});},After:function(a,b){return Element.insert(a,{after:b});}};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(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c);}this.xcomp=a;this.ycomp=c;this.offset=Element.cumulativeOffset(b);return(c>=this.offset[1]&&c<this.offset[1]+b.offsetHeight&&a>=this.offset[0]&&a<this.offset[0]+b.offsetWidth);},withinIncludingScrolloffsets:function(b,a,d){var c=Element.cumulativeScrollOffset(b);this.xcomp=a+c[0]-this.deltaX;this.ycomp=d+c[1]-this.deltaY;this.offset=Element.cumulativeOffset(b);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+b.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+b.offsetWidth);},overlap:function(b,a){if(!b){return 0;}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight;}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth;}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a);},relativize:function(a){Position.prepare();return Element.relativize(a);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(b,c,a){a=a||{};return Element.clonePosition(c,b,a);}};if(!document.getElementsByClassName){document.getElementsByClassName=function(b){function a(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]";}b.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,f){f=f.toString().strip();var d=/\s/.test(f)?$w(f).map(a).join(""):a(f);return d?document._getElementsByXPath(".//*"+d,c):[];}:function(f,g){g=g.toString().strip();var h=[],j=(/\s/.test(g)?$w(g):null);if(!j&&!g){return h;}var c=$(f).getElementsByTagName("*");g=" "+g+" ";for(var d=0,l,k;l=c[d];d++){if(l.className&&(k=" "+l.className+" ")&&(k.include(g)||(j&&j.all(function(m){return !m.toString().blank()&&k.include(" "+m+" ");})))){h.push(Element.extend(l));}}return h;};return function(d,c){return $(c||document.body).getElementsByClassName(d);};}(Element.Methods);}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a);},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0;})._each(a);},set:function(a){this.element.className=a;},add:function(a){if(this.include(a)){return;}this.set($A(this).concat(a).join(" "));},remove:function(a){if(!this.include(a)){return;}this.set($A(this).without(a).join(" "));},toString:function(){return $A(this).join(" ");}};Object.extend(Element.ClassNames.prototype,Enumerable);var Builder={NODEMAP:{AREA:"map",CAPTION:"table",COL:"table",COLGROUP:"table",LEGEND:"fieldset",OPTGROUP:"select",OPTION:"select",PARAM:"object",TBODY:"table",TD:"table",TFOOT:"table",TH:"table",THEAD:"table",TR:"table"},node:function(a){a=a.toUpperCase();var g=this.NODEMAP[a]||"div";var b=document.createElement(g);try{b.innerHTML="<"+a+"></"+a+">";}catch(f){}var d=b.firstChild||null;if(d&&(d.tagName.toUpperCase()!=a)){d=d.getElementsByTagName(a)[0];}if(!d){d=document.createElement(a);}if(!d){return;}if(arguments[1]){if(this._isStringOrNumber(arguments[1])||(arguments[1] instanceof Array)||arguments[1].tagName){this._children(d,arguments[1]);}else{var c=this._attributes(arguments[1]);if(c.length){try{b.innerHTML="<"+a+" "+c+"></"+a+">";}catch(f){}d=b.firstChild||null;if(!d){d=document.createElement(a);for(attr in arguments[1]){d[attr=="class"?"className":attr]=arguments[1][attr];}}if(d.tagName.toUpperCase()!=a){d=b.getElementsByTagName(a)[0];}}}}if(arguments[2]){this._children(d,arguments[2]);}return $(d);},_text:function(a){return document.createTextNode(a);},ATTR_MAP:{className:"class",htmlFor:"for"},_attributes:function(a){var b=[];for(attribute in a){b.push((attribute in this.ATTR_MAP?this.ATTR_MAP[attribute]:attribute)+'="'+a[attribute].toString().escapeHTML().gsub(/"/,"&quot;")+'"');}return b.join(" ");},_children:function(b,a){if(a.tagName){b.appendChild(a);return;}if(typeof a=="object"){a.flatten().each(function(c){if(typeof c=="object"){b.appendChild(c);}else{if(Builder._isStringOrNumber(c)){b.appendChild(Builder._text(c));}}});}else{if(Builder._isStringOrNumber(a)){b.appendChild(Builder._text(a));}}},_isStringOrNumber:function(a){return(typeof a=="string"||typeof a=="number");},build:function(b){var a=this.node("div");$(a).update(b.strip());return a.down();},dump:function(b){if(typeof b!="object"&&typeof b!="function"){b=window;}var a=("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);a.each(function(c){b[c]=function(){return Builder.node.apply(Builder,[c].concat($A(arguments)));};});}};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(a,b){return $A($(a).childNodes).collect(function(c){return(c.nodeType==3?c.nodeValue:((c.hasChildNodes()&&!Element.hasClassName(c,b))?Element.collectTextNodesIgnoreClass(c,b):""));}).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(a){try{a=$(a);var c=document.createTextNode(" ");a.appendChild(c);a.removeChild(c);}catch(b){}};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(b,a){return(-Math.cos((b*((a||5)-0.5)*2)*Math.PI)/2)+0.5;},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(b,c){var f;if(((typeof b=="object")||Object.isFunction(b))&&(b.length)){f=b;}else{f=$(b).childNodes;}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var d=a.delay;$A(f).each(function(h,g){new c(h,Object.extend(a,{delay:g*a.speed+d}));});},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(b,c){b=$(b);c=(c||"appear").toLowerCase();var a=Object.extend({queue:{position:"end",scope:(b.id||"global"),limit:1}},arguments[2]||{});Effect[b.visible()?Effect.PAIRS[c][1]:Effect.PAIRS[c][0]](b,a);}};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(b){var c=new Date().getTime();var a=Object.isString(b.options.queue)?b.options.queue:b.options.queue.position;switch(a){case"front":this.effects.findAll(function(d){return d.state=="idle";}).each(function(d){d.startOn+=b.finishOn;d.finishOn+=b.finishOn;});break;case"with-last":c=this.effects.pluck("startOn").max()||c;break;case"end":c=this.effects.pluck("finishOn").max()||c;break;}b.startOn+=c;b.finishOn+=c;if(!b.options.queue.limit||(this.effects.length<b.options.queue.limit)){this.effects.push(b);}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 c=new Date().getTime();for(var b=0,a=this.effects.length;b<a;b++){this.effects[b]&&this.effects[b].loop(c);}}});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(a){if(a&&a.transition===false){a.transition=Effect.Transitions.linear;}this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});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;this.render=(function(){function b(d,c){if(d.options[c+"Internal"]){d.options[c+"Internal"](d);}if(d.options[c]){d.options[c](d);}}return function(c){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");if(this.setup){this.setup();}b(this,"afterSetup");}if(this.state==="running"){c=(this.options.transition(c)*this.fromToDelta)+this.options.from;this.position=c;b(this,"beforeUpdate");if(this.update){this.update(c);}b(this,"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(c){if(c>=this.startOn){if(c>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");if(this.finish){this.finish();}this.event("afterFinish");return;}var b=(c-this.startOn)/this.totalTime,a=(b*this.totalFrames).round();if(a>this.currentFrame){this.render(b);this.currentFrame=a;}}},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(c,g,f){c=Object.isString(c)?$(c):c;var b=$A(arguments),d=b.last(),a=b.length==5?b[3]:null;this.method=Object.isFunction(d)?d.bind(c):Object.isFunction(c[d])?c[d].bind(c):function(h){c[d]=h;};this.start(Object.extend({from:g,to:f},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(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError);}if(Prototype.Browser.IE&&(!this.element.currentStyle.hasLayout)){this.element.setStyle({zoom:1});}var a=Object.extend({from:this.element.getOpacity()||0,to:1},arguments[1]||{});this.start(a);},update:function(a){this.element.setOpacity(a);}});Effect.Move=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError);}var a=Object.extend({x:0,y:0,mode:"relative"},arguments[1]||{});this.start(a);},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(b,a,c){return new Effect.Move(b,Object.extend({x:c,y:a},arguments[3]||{}));};Effect.Scale=Class.create(Effect.Base,{initialize:function(b,c){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError);}var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:c},arguments[2]||{});this.start(a);},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,f){var g={};if(this.options.scaleX){g.width=f.round()+"px";}if(this.options.scaleY){g.height=a.round()+"px";}if(this.options.scaleFromCenter){var c=(a-this.dims[0])/2;var b=(f-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY){g.top=this.originalTop-c+"px";}if(this.options.scaleX){g.left=this.originalLeft-b+"px";}}else{if(this.options.scaleY){g.top=-c+"px";}if(this.options.scaleX){g.left=-b+"px";}}}this.element.setStyle(g);}});Effect.Highlight=Class.create(Effect.Base,{initialize:function(b){this.element=$(b);if(!this.element){throw (Effect._elementDoesNotExistError);}var a=Object.extend({startcolor:"#ffff99"},arguments[1]||{});this.start(a);},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(b,c,d){return b+((this._base[d]+(this._delta[d]*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();if(b.offset){d[1]+=b.offset;}return new Effect.Tween(null,a.top,d[1],b,function(f){scrollTo(a.left,f.round());});};Effect.Fade=function(c){c=$(c);var a=c.getInlineOpacity();var b=Object.extend({from:c.getOpacity()||1,to:0,afterFinishInternal:function(d){if(d.options.to!=0){return;}d.element.hide().setStyle({opacity:a});}},arguments[1]||{});return new Effect.Opacity(c,b);};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(b){b=$(b);var a=b.getInlineOpacity();return new Effect.Appear(b,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:a});}});}},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 b=Object.extend({distance:20,duration:0.5},arguments[1]||{});var f=parseFloat(b.distance);var c=parseFloat(b.duration)/10;var a={top:d.getStyle("top"),left:d.getStyle("left")};return new Effect.Move(d,{x:f,y:0,duration:c,afterFinishInternal:function(g){new Effect.Move(g.element,{x:-f*2,y:0,duration:c*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:f*2,y:0,duration:c*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-f*2,y:0,duration:c*2,afterFinishInternal:function(k){new Effect.Move(k.element,{x:f*2,y:0,duration:c*2,afterFinishInternal:function(l){new Effect.Move(l.element,{x:-f,y:0,duration:c,afterFinishInternal:function(m){m.element.undoPositioned().setStyle(a);}});}});}});}});}});}});};Effect.SlideDown=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:b.height,originalWidth:b.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:a});}},arguments[1]||{}));};Effect.SlideUp=function(c){c=$(c).cleanWhitespace();var a=c.down().getStyle("bottom");var b=c.getDimensions();return new Effect.Scale(c,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:b.height,originalWidth:b.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:a});}},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 a={top:c.style.top,left:c.style.left,height:c.style.height,width:c.style.width,opacity:c.getInlineOpacity()};var h=c.getDimensions();var j,g;var f,d;switch(b.direction){case"top-left":j=g=f=d=0;break;case"top-right":j=h.width;g=d=0;f=-h.width;break;case"bottom-left":j=f=0;g=h.height;d=-h.height;break;case"bottom-right":j=h.width;g=h.height;f=-h.width;d=-h.height;break;case"center":j=h.width/2;g=h.height/2;f=-h.width/2;d=-h.height/2;break;}return new Effect.Move(c,{x:j,y:g,duration:0.01,beforeSetup:function(k){k.element.hide().makeClipping().makePositioned();},afterFinishInternal:function(k){new Effect.Parallel([new Effect.Opacity(k.element,{sync:true,to:1,from:0,transition:b.opacityTransition}),new Effect.Move(k.element,{x:f,y:d,sync:true,transition:b.moveTransition}),new Effect.Scale(k.element,100,{scaleMode:{originalHeight:h.height,originalWidth:h.width},sync:true,scaleFrom:window.opera?1:0,transition:b.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(l){l.effects[0].element.setStyle({height:"0px"}).show();},afterFinishInternal:function(l){l.effects[0].element.undoClipping().undoPositioned().setStyle(a);}},b));}});};Effect.Shrink=function(c){c=$(c);var b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var a={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,d;switch(b.direction){case"top-left":f=d=0;break;case"top-right":f=g.width;d=0;break;case"bottom-left":f=0;d=g.height;break;case"bottom-right":f=g.width;d=g.height;break;case"center":f=g.width/2;d=g.height/2;break;}return new Effect.Parallel([new Effect.Opacity(c,{sync:true,to:0,from:1,transition:b.opacityTransition}),new Effect.Scale(c,window.opera?1:0,{sync:true,transition:b.scaleTransition,restoreAfterFinish:true}),new Effect.Move(c,{x:f,y:d,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(h){h.effects[0].element.makePositioned().makeClipping();},afterFinishInternal:function(h){h.effects[0].element.hide().undoClipping().undoPositioned().setStyle(a);}},b));};Effect.Pulsate=function(c){c=$(c);var b=arguments[1]||{},a=c.getInlineOpacity(),f=b.transition||Effect.Transitions.linear,d=function(g){return 1-f((-Math.cos((g*(b.pulses||5)*2)*Math.PI)/2)+0.5);};return new Effect.Opacity(c,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(g){g.element.setStyle({opacity:a});}},b),{transition:d}));};Effect.Fold=function(b){b=$(b);var a={top:b.style.top,left:b.style.left,width:b.style.width,height:b.style.height};b.makeClipping();return new Effect.Scale(b,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(c){new Effect.Scale(b,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(a);}});}},arguments[1]||{}));};Effect.Morph=Class.create(Effect.Base,{initialize:function(c){this.element=$(c);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 b=this.element.getStyles();this.style=this.style.reject(function(d){return d.value==b[d.key];});a.afterFinishInternal=function(d){d.element.addClassName(d.options.style);d.transforms.each(function(f){d.element.style[f.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(h){var g=h[0],f=h[1],d=null;if(f.parseColor("#zzzzzz")!="#zzzzzz"){f=f.parseColor();d="color";}else{if(g=="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 c=f.match(/^([\+\-]?[0-9\.]+)(.*)$/);f=parseFloat(c[1]);d=(c.length==3)?c[2]:null;}}}var b=this.element.getStyle(g);return{style:g.camelize(),originalValue:d=="color"?a(b):parseFloat(b||0),targetValue:d=="color"?a(f):f,unit:d};}.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 d=a.get("ids"),c=a.get("effect"),b=a.get("options");var f=[$(d)||$$(d)].flatten();return f.map(function(g){return new c(g,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(b){var a=document.defaultView.getComputedStyle($(b),null);return Element.CSS_PROPERTIES.inject({},function(c,d){c[d]=a[d];return c;});};}else{Element.getStyles=function(b){b=$(b);var a=b.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(d,f){d[f]=a[f];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(c,f,b){c=$(c);var d=f.dasherize().camelize(),a=d.charAt(0).toUpperCase()+d.substring(1);new Effect[a](c,b);return c;},highlight:function(b,a){b=$(b);new Effect.Highlight(b,a);return b;}};$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(c,b){c=$(c);Effect[a.charAt(0).toUpperCase()+a.substring(1)](c,b);return c;};});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a];});Element.addMethods(Effect.Methods);var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"#unknown";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"#unknown";this.OS=this.osName()||"unknown OS";this.platform=navigator.platform;this.codeName=navigator.appCodeName;this.language=this.getBrowserLanguage();this.screenWidth=screen.width||800;this.screenHeight=screen.height||600;this.colorDepth=(screen.colorDepth||screen.pixelDepth);this.plugins=this.getPluginInfo();},getBrowserInfo:function(a){var b="";b+=this.browser+a;b+=this.version+a;b+=this.OS+a;b+=this.platform+a;b+=this.screenWidth+a;b+=this.screenHeight+a;b+=this.colorDepth+a;b+=this.language+a;b+=this.plugins;return b;},getBrowserLanguage:function(){var a="en";if(navigator.browserLanguage){a=navigator.browserLanguage;}if(navigator.userLanguage){a=navigator.userLanguage;}if(navigator.systemLanguage){a=navigator.systemLanguage;}if(navigator.language){a=navigator.language;}if(a.indexOf("-")==2){a=a.substring(0,2);}return a;},checkJava:function(){if(typeof navigator.javaEnabled()=="boolean"&&navigator.javaEnabled()){return 1;}return 0;},checkCookies:function(){if(navigator.cookieEnabled){return 1;}return 0;},checkXMLRequest:function(){if(window.XMLHttpRequest){return 1;}else{if(window.ActiveXObject){return 2;}}return 0;},getPluginInfo:function(a){var b="";b+=((Plugin.isInstalled("Acrobat"))?"PDF":"-")+"|";b+=((Plugin.isInstalled("Flash"))?"FLV":"-")+"|";b+=((Plugin.isInstalled("SVG Viewer"))?"SVG":"-")+"|";if(a&&a===true){b+=((Plugin.isInstalled("QuickTime"))?"QT":"-")+"|";b+=((Plugin.isInstalled("Windows Media"))?"WMF":"-")+"|";b+=((this.isSilverLight)?"SLG":"-")+"|";}return b;},isSilverLight:function(){if(window.navigator.userAgent.indexOf("MSIE")>=0){try{var a=new ActiveXObject("AgControl.AgControl");if(a){var b=a.settings.version;a=null;return true;}}catch(c){}}else{if(navigator.plugins["Silverlight Plug-In"]){return true;}}return false;},searchString:function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;this.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity;}}else{if(c){return d[a].identity;}}}},searchVersion:function(b){var a=b.indexOf(this.versionSearchString);if(a==-1){return;}return parseFloat(b.substring(a+this.versionSearchString.length+1));},osName:function(){if(navigator.platform){if(navigator.platform=="Win32"){if(navigator.userAgent.indexOf("Windows NT 6.0")>-1){return"Windows Vista";}else{if(navigator.userAgent.indexOf("Windows NT 5.2")>-1){return"Windows 2003";}else{if(navigator.userAgent.indexOf("Windows NT 5.1")>-1){return"Windows XP";}else{if(navigator.userAgent.indexOf("Windows NT 5.0")>-1){return"Windows 2000";}else{if(navigator.userAgent.indexOf("Windows NT 4")>-1){return"Windows NT";}else{if(navigator.userAgent.indexOf("Windows ME")>-1){return"Windows ME";}else{if(navigator.userAgent.indexOf("Windows 98")>-1){return"Windows 98";}else{if(navigator.userAgent.indexOf("Windows 95")>-1){return"Windows 95";}else{if(navigator.userAgent.indexOf("Windows CE")>-1){return"Windows CE";}else{return"undefined";}}}}}}}}}}else{var a=navigator.platform.match("Linux|Mac Os|Sun");return a[0];}}else{return"#unknown";}},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}]};var BandwidthTest=Class.create();BandwidthTest.prototype={runCount:3,imgUrl:"/js/sti.jpg",size:19482,initialize:function(){},run:function(a){this.results=[];this.callback=(a&&a.onEnd)?a.onEnd:null;this.runTrial(0,a);},runTrial:function(b,a){var f=this.imgUrl+"?r="+new Date().getTime();var c=this;var d=new Image();d.onload=function(){c.results[b].endTime=(new Date()).getTime();c.results[b].runTime=c.results[b].endTime-c.results[b].startTime;if(b<c.runCount-1){c.runTrial(b+1);}else{if(c.callback){c.callback(c.getResults());}}};this.results[b]={startTime:(new Date()).getTime()};d.src=f;},getResults:function(){var c=0;for(var b=0;b<this.runCount;b++){if(!this.results||!this.results[b].endTime){return null;}else{c+=this.results[b].runTime;}}var a=c/this.runCount;return{avgRunTime:a,Kbps:(this.size*8/1024/(a/1000)),KBps:(this.size/1024/(a/1000))};}};function getClientDataInfo(){if(pglevel&&pglevel=="1"){BrowserDetect.init();var a=new BandwidthTest();a.run({onStart:function(){},onEnd:function(d){var b=tickeid+"|"+ipaddr+"|"+up_site+"|"+up_lang+"|";b+=parseInt(d.Kbps)+"|"+parseInt(d.avgRunTime)+"|";b+=BrowserDetect.getBrowserInfo("|");b+=new Date().getTime();var c=new Image();c.src="/dlib/log/cida.php?data="+b;}});}}function getClientDataInfos(){if(opener){return;}try{if(pglevel&&pglevel=="1"){var d=new Date().getTime();BrowserDetect.init();var a=tickeid+"|"+ipaddr+"|"+up_site+"|"+up_lang+"|";if(datStart1){d=new Date().getTime()-datStart1;}a+=d+"|";a+=BrowserDetect.getBrowserInfo("|");a+=new Date().getTime();var c=new Image();c.src="/dlib/log/cida.php?data="+a;}}catch(b){}}window.onload=getClientDataInfos;var myLightbox=null;var myOverlayOpacity=0.6;var activeElement=0;function inlinePopup(a){if(myLightbox==null){myLightbox=new Lightbox();}myLightbox.start(a);return false;}var Lightbox=Class.create();Lightbox.prototype={initialize:function(){this.version="08.05.241832",this.viewdata=[],this.loadanimation="/js/img/loading.gif",this.closeimage="/js/img/closelabel.gif",this.overlayimage="/js/img/overlay.png",this.border=8,this.overlayOpacity=myOverlayOpacity,this.animate=true,this.updateElementList();this.overlayDuration=0;this.resizeDuration=0;this.resizeSpeed=7;this.initSize=(this.animate)?{width:"1px",height:"1px"}:{width:"100px",height:"100px"};this.userAgent=navigator.userAgent.toLowerCase();if(this.animate==true){this.overlayDuration=0.8;if(this.resizeSpeed>10){this.resizeSpeed=10;}if(this.resizeSpeed<1){this.resizeSpeed=1;}this.resizeDuration=(11-this.resizeSpeed)*0.15;}this.createOverlay();this.createLightbox();},createLightbox:function(){var r=document.getElementsByTagName("body").item(0);var d=document.createElement("div");d.setAttribute("id","lightbox");d.style.display="none";d.onclick=function(t){t=t||window.event;var s=Event.element(t).id;if(s=="lightbox"){myLightbox.end();}};r.appendChild(d);var q=document.createElement("div");q.setAttribute("id","outerImageContainer");d.appendChild(q);$("outerImageContainer").setStyle({width:this.initSize.width,height:this.initSize.height});var m=document.createElement("div");m.setAttribute("id","imageContainer");q.appendChild(m);var c=document.createElement("div");c.setAttribute("id","lightboxcontent");m.appendChild(c);var f=document.createElement("img");f.setAttribute("id","lightboximage");f.style.display="none";c.appendChild(f);objLightboxSwf=document.createElement("div");objLightboxSwf.setAttribute("id","lightboxswf");objLightboxSwf.style.position="relative";objLightboxSwf.style.zIndex=101;objLightboxSwf.style.display="none";c.appendChild(objLightboxSwf);var p=document.createElement("div");p.setAttribute("id","loading");m.appendChild(p);var o=document.createElement("a");o.setAttribute("id","loadingLink");o.setAttribute("href","#");o.onclick=function(){myLightbox.end();return false;};p.appendChild(o);var b=document.createElement("img");b.setAttribute("src",this.loadanimation);o.appendChild(b);var l=document.createElement("div");l.setAttribute("id","imageDataContainer");d.appendChild(l);var h=document.createElement("div");h.setAttribute("id","imageData");l.appendChild(h);var g=document.createElement("div");g.setAttribute("id","imageDetails");h.appendChild(g);var k=document.createElement("span");k.setAttribute("id","caption");g.appendChild(k);var j=document.createElement("div");j.setAttribute("id","bottomNav");h.appendChild(j);var n=document.createElement("a");n.setAttribute("id","bottomNavClose");n.setAttribute("href","#");n.onclick=function(){myLightbox.end();return false;};j.appendChild(n);var a=document.createElement("img");a.setAttribute("src",this.closeimage);n.appendChild(a);},createOverlay:function(){var a=$("wrapper");if(a){var b=document.createElement("div");b.setAttribute("id","overlay");b.style.backgroundImage="url("+this.overlayimage+")";b.style.backgroundRepeat="repeat";b.style.backgroundColor="#000000";b.style.display="none";b.style.position="absolute";b.style.top="0";b.style.left="0";b.style.width="100%";b.style.height="100%";b.onclick=function(){myLightbox.end();};a.appendChild(b);if(!Prototype.Browser.IE){$("overlay").setStyle({position:"absolute",display:"none",width:"100%",height:"200%",backgroundcolor:"#000000",top:"0px",left:"0px"});}}},window_size:function(){var c=window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth);var b=window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight);var a=window.pageXOffset||(window.document.documentElement.scrollLeft||window.document.body.scrollLeft);var d=window.pageYOffset||(window.document.documentElement.scrollTop||window.document.body.scrollTop);return{width:c,height:b,x:a,y:d};},updateElementList:function(){if(!document.getElementsByTagName){return;}var c=document.getElementsByTagName("a");for(var b=0;b<c.length;b++){var a=c[b];var d=String(a.getAttribute("rel"));if(a.getAttribute("href")&&(d.toLowerCase().match("lightbox"))){a.onclick=function(){myLightbox.start(this);return false;};}}},start:function(b){hideSelectBoxes();if((b.getAttribute("rel")=="lightbox")){this.viewdata=[];this.addViewData(b);elementNum=0;var a=document.viewport.getScrollOffsets();myLightbox.moveY=a.top+140;$("lightbox").setStyle({top:myLightbox.moveY+"px"});Element.show("lightbox");new Effect.Appear("overlay",{duration:this.overlayDuration,from:0,to:this.overlayOpacity});this.changeElement(elementNum);}},end:function(){this.disableKeyboardNav();new Effect.Parallel([new Effect.SwitchOff("lightbox",{duration:this.resizeDuration,queue:"end",afterFinish:function(){showSelectBoxes();}}),new Effect.Fade("overlay",{duration:this.overlayDuration,queue:"end",afterFinish:function(){var a=$("up_player1");if(a){a.hide();a=null;}var b=$("lightboxswf");if(b){b.innerHTML="";}}})],{duration:this.resizeDuration,afterFinish:function(){}});},addViewData:function(c){var f={};if(c&&c.id){f.id=c.id;var d=$(f.id+"param");var a=$(f.id+"width");var b=$(f.id+"height");f.href=f.url=c.getAttribute("href");f.title=c.getAttribute("title")||"";f.url=f.href;if(d){f.param=d.value;f.url=f.href+"?"+f.param;}f.width=440;f.height=f.width*0.5;if(a){f.width=parseInt(a.value);}if(b){f.height=parseInt(b.value);}f.viewmode="slideshow";if(f.href.include(".swf")==true){f.viewmode="video";}if(f.href.include(".php")==true){f.viewmode="iframe";}}else{f.viewmode="slideshow";f.href=f.url=c.getAttribute("href");f.title=c.getAttribute("title")||"";}this.viewdata.push(f);},changeElement:function(a){activeElement=a;var b=this.viewdata[activeElement];if(b){if(this.animate){Element.show("loading");}Element.hide("lightboximage");Element.hide("lightboxswf");Element.hide("imageDataContainer");if(b.viewmode=="slideshow"){imgPreloader=new Image();imgPreloader.onload=function(){$("lightboximage").src=b.url;myLightbox.resizeElementContainer(imgPreloader.width,imgPreloader.height);imgPreloader.onload=function(){};};imgPreloader.src=b.url;}else{myLightbox.resizeElementContainer(b.width,b.height);}}},resizeElementContainer:function(f,d){this.widthCurrent=Element.getWidth("outerImageContainer");this.heightCurrent=Element.getHeight("outerImageContainer");var a=(f+(this.border*2));var b=(d+(this.border*2));this.xScale=(a/this.widthCurrent)*100;this.yScale=(b/this.heightCurrent)*100;wDiff=this.widthCurrent-a;hDiff=this.heightCurrent-b;var c=this.resizeDuration;if(!(hDiff==0)){new Effect.Scale("outerImageContainer",this.yScale,{scaleX:false,duration:c,queue:"front"});}if(!(wDiff==0)){new Effect.Scale("outerImageContainer",this.xScale,{scaleY:false,delay:c,duration:c});}if((hDiff==0)&&(wDiff==0)){if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250);}else{pause(100);}}$("imageDataContainer").style.width=a+"px";this.buildElement();},buildElement:function(){Element.hide("loading");var c=this.viewdata[activeElement];var a=this.resizeDuration;if(c.viewmode=="video"){$("lightboximage").style.display="none";var b=$("lightboxswf");b.innerHTML='<object id="up_player1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" width="'+c.width+'" height="'+c.height+'"><param name="movie" value="'+c.url+'"/><param name="base" value="."/><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed name="up_player1"  allowscriptaccess="always" src="'+c.url+'" base="." quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+c.width+'" height="'+c.height+'"><param name="base" value="." /><param name="quality" value="high" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /></embed></object>';new Effect.Appear("lightboxswf",{duration:a,queue:"end",from:0,to:100,afterFinish:function(){myLightbox.updateDetails();}});}else{if(c.viewmode=="iframe"){$("lightboximage").style.display="none";var b=$("lightboxswf");b.innerHTML='<iframe src="'+c.url+'" frameborder="0" marginwidth="0" marginheight="0" tabIndex="-1" width="'+c.width+'" height="'+c.height+'"></iframe>';new Effect.Appear("lightboxswf",{duration:a,queue:"end",from:0,to:100,afterFinish:function(){myLightbox.updateDetails();}});}else{$("lightboxswf").style.display="none";new Effect.Appear("lightboximage",{duration:a,queue:"end",afterFinish:function(){myLightbox.updateDetails();}});}}},updateDetails:function(){var a=this.viewdata[activeElement];if(a.title){$("caption").update(a.title);}new Effect.Parallel([new Effect.SlideDown("imageDataContainer",{sync:true,duration:this.resizeDuration,from:0,to:1}),new Effect.Appear("imageDataContainer",{sync:true,duration:this.resizeDuration})],{duration:this.resizeDuration,afterFinish:function(){}});},enableKeyboardNav:function(){document.onkeydown=this.keyboardAction;},disableKeyboardNav:function(){document.onkeydown="";},keyboardAction:function(a){if(a==null){keycode=event.keyCode;escapeKey=27;}else{keycode=a.keyCode;escapeKey=a.DOM_VK_ESCAPE;}key=String.fromCharCode(keycode).toLowerCase();if((key=="x")||(key=="o")||(key=="c")||(keycode==escapeKey)){myLightbox.end();}}};function showSelectBoxes(){var a=document.getElementsByTagName("select");for(i=0;i!=a.length;i++){a[i].style.visibility="visible";}}function hideSelectBoxes(){var a=document.getElementsByTagName("select");for(i=0;i!=a.length;i++){a[i].style.visibility="hidden";}}function pause(c){var b=new Date();a=null;do{var a=new Date();}while(a-b<c);}Event.observe(window,"load",function(){myLightbox=new Lightbox();});var PluginFactory=function(){this.isInstalled=function(m){return Plugin.getInfo(m).isInstalled;};this.getVersion=function(m){return Plugin.getInfo(m).version;};this.getPluginsForMimeType=function(r){var m=[];if(b()){for(var o=0;o<navigator.mimeTypes.length;o++){if(navigator.mimeTypes[o].type.indexOf(r)==0&&navigator.mimeTypes[o].enabledPlugin){var q=(j(navigator.mimeTypes[o].enabledPlugin.name)||navigator.mimeTypes[o].enabledPlugin.name);if(!Array.contains(m,q)){m.push(q);}}}}else{for(var q in Plugin.PLUGINS){var p=Plugin.PLUGINS[q].acceptedMimeTypes;if(!p){continue;}for(var n=0;n<p.length;n++){if(p[n].type.indexOf(r)==0&&Plugin.isInstalled(q)){if(!Array.contains(m,q)){m.push(q);}}}}}return m;};this.getPluginsForFileSuffix=function(r){var m=[];if(b()){for(var o=0;o<navigator.mimeTypes.length;o++){if((","+navigator.mimeTypes[o].suffixes+",").indexOf(","+r+",")!=-1&&navigator.mimeTypes[o].enabledPlugin){var q=(j(navigator.mimeTypes[o].enabledPlugin.name)||navigator.mimeTypes[o].enabledPlugin.name);if(!Array.contains(m,q)){m.push(q);}}}}else{for(var q in Plugin.PLUGINS){var p=Plugin.PLUGINS[q].acceptedMimeTypes;if(!p){continue;}for(var n=0;n<p.length;n++){if((","+p[n].suffixes+",").indexOf(","+r+",")!=-1&&Plugin.isInstalled(q)){if(!Array.contains(m,q)){m.push(q);}}}}}return m;};this.getInfo=function(o){var t=Plugin.PLUGINS[o];var s=false;var n=null;if(b()){var r=h((o=="RealPlayer")?"RealPlayer Version Plugin":o);if(r){s=true;n=c(r);}}else{s=l(Plugin.PLUGINS[o]&&Plugin.PLUGINS[o].progID);if(s){if(Plugin.PLUGINS[o].getActiveXVersionInfo){n=Plugin.PLUGINS[o].getActiveXVersionInfo();}else{var q=f(Plugin.PLUGINS[o].progID);n=c(q);}}else{n=a(Plugin.PLUGINS[o]&&Plugin.PLUGINS[o].classID);if(n){n=n.replace(new RegExp(",","g"),".");}s=(n!=undefined);}}var m={};for(var p in t){m[p]=t[p];}m.isInstalled=s;m.version=n;m.name=o;return m;};this.embed=function(t,B,v){B=B||{};var u=Object.extend({},B);var m=u.src;delete u.src;var o=u.id;delete u.id;var n=u.name||o;delete u.name;var p=u.width;delete u.width;var z=u.height;delete u.height;var w=u.type||(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].mimeType)||"";delete u.type;var A=u.activeXType||(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].activeXType)||w;delete u.activeXType;var y=(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].forceEmbedTag===true)?true:false;var q=(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].forceObjectdTag===true)?true:false;var u=Object.extend(((Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].standardEmbedAttributes)||{}),u);switch(t){case"QuickTime":if(u.controller=="true"&&(z+"").indexOf("%")==-1){z+=16;}if(!B.activeXType){A=null;}break;case"DivX":if((z+"").indexOf("%")==-1){if(u.mode=="mini"){z+=20;}else{if(u.mode=="large"){z+=65;}else{if(u.mode=="full"){z+=90;}}}}break;case"Windows Media":if(!b()||window.GeckoActiveXObject){q=false;}if((window.ActiveXObject||window.GeckoActiveXObject||window.opera)&&(z+"").indexOf("%")==-1){z+=45;}break;case"Flash":if(!b()){u.movie=m;m=null;}break;case"VLC":if(b()){u.target=m;}break;case"RealPlayer":break;default:break;}var s="";if((b()&&!q)||y){s+="<embed"+g("src",m)+g("id",o)+g("name",n)+g("width",p)+g("height",z)+g("pluginspage",Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].pluginsPage)+g("type",w);for(var r in u){s+=" "+r+'="'+u[r]+'"';}s+="></embed>\n";}else{s+='<object classid="clsid:'+(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].classID)+'"';s+=g("id",o)+g("name",n)+g("width",p)+g("height",z)+g("codebase",(Plugin.PLUGINS[t]&&Plugin.PLUGINS[t].codeBase))+g("type",A)+">\n";s+=(m)?'  <param name="src" value="'+m+'">\n':"";for(var r in u){s+='  <param name="'+r+'" value="'+u[r]+'" />';}s+="</object>\n";}if(v){if(typeof v=="string"){v=document.getElementById(v);}v.innerHTML=s;}else{document.write(s);}};function g(m,n){return(n)?(" "+m+'="'+n+'"'):"";}this.PLUGINS={Acrobat:{description:"Adobe Acrobat Plugin",progID:["PDF.PdfCtrl.7","PDF.PdfCtrl.6","PDF.PdfCtrl.5","PDF.PdfCtrl.4","PDF.PdfCtrl.3","AcroPDF.PDF.1"],classID:"CA8A9780-280D-11CF-A24D-444553540000",pluginsPage:"http://www.adobe.com/products/acrobat/readstep2.html",acceptedMimeTypes:[{type:"application/pdf",suffixes:"pdf"},{type:"application/vnd.fdf",suffixes:"fdf"},{type:"application/vnd.adobe.xfdf",suffixes:"xfdf"},{type:"application/vnd.adobe.xdp+xml",suffixes:"xdp"},{type:"application/vnd.adobe.xfd+xml",suffixes:"xfd"}]},QuickTime:{description:"QuickTime Plug-in",progID:["QuickTimeCheckObject.QuickTimeCheck.1","QuickTime.QuickTime"],classID:"02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",pluginsPage:"http://www.apple.com/quicktime/download/",codeBase:"http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0",mimeType:"video/quicktime",standardEmbedAttributes:{autoplay:"false"},getActiveXVersionInfo:function(){var n=f(Plugin.PLUGINS.QuickTime.progID);var o=new ActiveXObject(n);var m=(o&&o.QuickTimeVersion)?o.QuickTimeVersion.toString(16):"";return m.substring(0,1)+"."+m.substring(1,2)+"."+m.substring(2,3);},acceptedMimeTypes:[{type:"image/tiff",suffixes:"tif,tiff"},{type:"image/x-tiff",suffixes:"tif,tiff"},{type:"video/x-m4v",suffixes:"m4v"},{type:"image/x-macpaint",suffixes:"pntg,pnt,mac"},{type:"image/pict",suffixes:"pict,pic,pct"},{type:"image/x-pict",suffixes:"pict,pic,pct"},{type:"image/x-quicktime",suffixes:"qtif,qti"},{type:"image/x-sgi",suffixes:"sgi,rgb"},{type:"image/x-targa",suffixes:"targa,tga"},{type:"audio/3gpp",suffixes:"3gp,3gpp"},{type:"video/3gpp2",suffixes:"3g2,3gp2"},{type:"audio/3gpp2",suffixes:"3g2,3gp2"},{type:"video/sd-video",suffixes:"sdv"},{type:"application/x-mpeg",suffixes:"amc"},{type:"video/mp4",suffixes:"mp4"},{type:"audio/mp4",suffixes:"mp4"},{type:"audio/x-m4a",suffixes:"m4a"},{type:"audio/x-m4p",suffixes:"m4p"},{type:"audio/x-m4b",suffixes:"m4b"},{type:"video/mpeg",suffixes:"mpeg,mpg,m1s,m1v,m1a,m75,m15,mp2,mpm,mpv,mpa"},{type:"audio/mpeg",suffixes:"mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a"},{type:"audio/x-mpeg",suffixes:"mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a"},{type:"video/3gpp",suffixes:"3gp,3gpp"},{type:"audio/x-gsm",suffixes:"gsm"},{type:"audio/AMR",suffixes:"AMR"},{type:"audio/aac",suffixes:"aac,adts"},{type:"audio/x-aac",suffixes:"aac,adts"},{type:"audio/x-caf",suffixes:"caf"},{type:"video/x-mpeg",suffixes:"mpeg,mpg,m1s,m1v,m1a,m75,m15,mp2,mpm,mpv,mpa"},{type:"audio/aiff",suffixes:"aiff,aif,aifc,cdda"},{type:"audio/x-aiff",suffixes:"aiff,aif,aifc,cdda"},{type:"audio/basic",suffixes:"au,snd,ulw"},{type:"audio/mid",suffixes:"mid,midi,smf,kar"},{type:"audio/x-midi",suffixes:"mid,midi,smf,kar"},{type:"audio/midi",suffixes:"mid,midi,smf,kar"},{type:"audio/vnd.qcelp",suffixes:"qcp"},{type:"application/sdp",suffixes:"sdp"},{type:"application/x-sdp",suffixes:"sdp"},{type:"application/x-rtsp",suffixes:"rtsp,rts"},{type:"video/quicktime",suffixes:"mov,qt,mqv"},{type:"video/flc",suffixes:"flc,fli,cel"},{type:"audio/x-wav",suffixes:"wav,bwf"},{type:"audio/wav",suffixes:"wav,bwf"},{type:"application/x-silverlight",suffixes:"mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a"},{type:"application/x-silverlight-2-b1",suffixes:"mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a"}]},DivX:{description:"DivX Browser Plugin",progID:["npdivx.DivXBrowserPlugin.1","npdivx.DivXBrowserPlugin"],classID:"67DABFBF-D0AB-41fa-9C46-CC0F21721616",codeBase:"http://go.divx.com/plugin/DivXBrowserPlugin.cab",pluginsPage:"http://go.divx.com/plugin/download/",mimeType:"video/divx",standardEmbedAttributes:{mode:"mini",minversion:"1.0.0"},getActiveXVersionInfo2:function(){var m=f(Plugin.PLUGINS.DivX.progID);return"1.0.0";},acceptedMimeTypes:[{type:"video/divx",suffixes:"dvx,divx"}]},Director:{description:"Macromedia Director",progID:["SWCtl.SWCtl.11","SWCtl.SWCtl.10","SWCtl.SWCtl.9","SWCtl.SWCtl.8","SWCtl.SWCtl.7","SWCtl.SWCtl.6","SWCtl.SWCtl.5","SWCtl.SWCtl.4"],classID:"166B1BCA-3F9C-11CF-8075-444553540000",pluginsPage:"http://www.macromedia.com/shockwave/download/",codeBase:"http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0",mimeType:"application/x-director"},Flash:{description:"Macromedia Shockwave Flash",progID:["ShockwaveFlash.ShockwaveFlash.10","ShockwaveFlash.ShockwaveFlash.9","ShockwaveFlash.ShockwaveFlash.8.5","ShockwaveFlash.ShockwaveFlash.8","ShockwaveFlash.ShockwaveFlash.7","ShockwaveFlash.ShockwaveFlash.6","ShockwaveFlash.ShockwaveFlash.5","ShockwaveFlash.ShockwaveFlash.4"],classID:"D27CDB6E-AE6D-11CF-96B8-444553540000",pluginsPage:"http://www.macromedia.com/go/getflashplayer",codeBase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0",mimeType:"application/x-shockwave-flash",standardEmbedAttributes:{quality:"high"},acceptedMimeTypes:[{type:"application/x-shockwave-flash",suffixes:"swf"},{type:"application/futuresplash",suffixes:"spl"}]},VLC:{description:"VLC multimedia plugin",progID:[],classID:"",pluginsPage:"http://www.videolan.org/doc/play-howto/en/ch02.html#id287569",codeBase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0",mimeType:"application/x-vlc-plugin",standardEmbedAttributes:{quality:"high",autoplay:"no"},acceptedMimeTypes:[{type:"audio/mpeg",suffixes:"mp2,mp3,mpga,mpega"},{type:"audio/x-mpeg",suffixes:"mp2,mp3,mpga,mpega"},{type:"video/mpeg",suffixes:"mpg,mpeg,mpe"},{type:"video/x-mpeg",suffixes:"mpg,mpeg,mpe"},{type:"video/mpeg-system",suffixes:"mpg,mpeg,vob"},{type:"video/x-mpeg-system",suffixes:"mpg,mpeg,vob"},{type:"video/mpeg4",suffixes:"mp4,mpg4"},{type:"audio/mpeg4",suffixes:"mp4,mpg4"},{type:"application/mpeg4-iod",suffixes:"mp4,mpg4"},{type:"application/mpeg4-muxcodetable",suffixes:"mp4,mpg4"},{type:"video/x-msvideo",suffixes:"avi"},{type:"video/quicktime",suffixes:"mov,qt"},{type:"application/x-ogg",suffixes:"ogg"},{type:"application/x-vlc-plugin",suffixes:"*"},{type:"video/x-ms-asf-plugin",suffixes:"asf,asx,*"},{type:"video/x-ms-asf",suffixes:"asf,asx,*"},{type:"application/x-mplayer2",suffixes:"dvx,divx,ivx,xvid,ivf,*"},{type:"video/x-ms-wmv",suffixes:"wmv,*"},{type:"application/x-google-vlc-plugin",suffixes:"*"}]},"Windows Media":{description:"Windows Media Player Plug-in Dynamic Link Library",progID:["WMPlayer.OCX","MediaPlayer.MediaPlayer.1"],classID:"22D6f312-B0F6-11D0-94AB-0080C74C7E95",pluginsPage:"http://www.microsoft.com/windows/windowsmedia/",codeBase:"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902",mimeType:"application/x-mplayer2",activeXType:"application/x-oleobject",standardEmbedAttributes:{autoplay:"false"},getActiveXVersionInfo:function(){var m=f(Plugin.PLUGINS["Windows Media"].progID);var n=new ActiveXObject(m);return(n&&n.versionInfo)?n.versionInfo:"";},acceptedMimeTypes:[{type:"application/asx",suffixes:"*"},{type:"video/x-msvideo",suffixes:"avi"},{type:"video/x-ms-asf-plugin",suffixes:"*"},{type:"application/x-mplayer2",suffixes:"dvx,divx,ivx,xvid,ivf,*"},{type:"video/x-ms-asf",suffixes:"asf,asx,*"},{type:"video/x-ms-wm",suffixes:"wm,*"},{type:"audio/x-ms-wma",suffixes:"wma,*"},{type:"audio/x-ms-wax",suffixes:"wax,*"},{type:"video/x-ms-wmv",suffixes:"wmv,*"},{type:"video/x-ms-wvx",suffixes:"wvx,*"}]},Java:{description:"Java Virtual Machine",progID:[],classID:"08B0E5C0-4FCB-11CF-AAA5-00401C608500",pluginsPage:"http://www.java.com/de/download/manual.jsp",acceptedMimeTypes:[{type:"application/x-java-applet",suffixes:""},{type:"application/x-java-bean",suffixes:""},{type:"application/x-java-vm",suffixes:" "}]},RealPlayer:{description:"RealPlayer Version Plugin",progID:["RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","rmocx.RealPlayer G2 Control"],classID:"CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA",mimeType:"audio/x-pn-realaudio-plugin",pluginsPage:"http://www.real.com/freeplayer/?rppr=rnwk",forceEmbedTag:true,standardEmbedAttributes:{controls:"ControlPanel",nojava:"true",autostart:"false"},getActiveXVersionInfo:function(){var n=f(Plugin.PLUGINS.RealPlayer.progID);var o=new ActiveXObject(n);var m=(o)?o.GetVersionInfo():"";return m;},acceptedMimeTypes:[{type:"audio/x-pn-realaudio-plugin",suffixes:"rpm"},{type:"application/vnd.rn-realplayer-javascript",suffixes:"rpj"}]}};function b(){return(navigator.plugins&&(navigator.plugins.length>0));}function d(){return((typeof"ActiveXObject"!="undefined")&&(navigator.userAgent.indexOf("Win")!=-1));}function h(m){if(b()){for(var n=0;n<navigator.plugins.length;++n){var o=navigator.plugins[n];if(o.name.indexOf(m)!=-1){return o;}}}return null;}function j(n){for(var m in Plugin.PLUGINS){if(n.indexOf(m)!=-1){return m;}}return null;}function k(){var m=document.getElementById("__Plugin_ClientCaps");if(!m){var m=document.createElement("DIV");m.id="__Plugin_ClientCaps";if(m.addBehavior){m.addBehavior("#default#clientCaps");document.body.appendChild(m);}m=document.getElementById("__Plugin_ClientCaps");}return m;}function a(p){if(!p){return null;}if(!p.match(/{[^}]+}/)){p="{"+p+"}";}var n=k();try{var m=n.getComponentVersion(p,"ComponentID");return m||null;}catch(o){}return null;}function l(m){m=f(m);return(m!=null);}function f(n){if(!n){return null;}for(var m=0;m<n.length;m++){try{var p=new ActiveXObject(n[m]);return n[m]||null;}catch(o){}}return null;}function c(m){if(!m.name){m={name:m,description:name};}var n=/[\d][\d\.]*/.exec(m.name);if(n&&m.name.indexOf("Java")==-1){return n[0];}n=/[\d\.]+/.exec(m.description);return n?n[0]:"";}};Array.contains=function(a,b){return Array.indexOf(a,b)!=-1;};Array.indexOf=function(a,c){for(var b=0;b<a.length;b++){if(a[b]==c){return b;}}return -1;};String.encode=String.prototype.encode=function(){var a=this;a=a.replace("&","&amp;");a=a.replace("<","&lt;");a=a.replace(">","&gt;");a=a.replace('"',"&quot;");a=a.replace("\n","");return a;};if(!window.Plugin){var Plugin=new Object();}Object.extend(Plugin,(new PluginFactory()));function showDiv(){var c=document.getElementById("wf-info");var b=document.getElementById("wf-infoshim");c.style.display="block";var g=Element.getHeight("wf-info");var d=Element.getWidth("wf-info");var a=getWindowSize();var f=parseInt((a.width-d)/2);var h=parseInt((a.height-g)/2);f=a.left+f;h=a.top+100;Element.setStyle(c,{top:h+"px"});Element.setStyle(b,{top:h+"px",height:g+"px",width:d+"px"});b.style.display="block";}function centerToScreen(b){Element.setStyle(b,{position:"absolute"});var a=(window.innerWidth)?window.innerWidth:document.body.clientWidth;var c=(window.innerHeight)?window.innerHeight:document.body.clientHeight;var g=Element.getDimensions(b);var f=(screen.width)?(a-g.width)/2:100;var d=(screen.height)?(c-g.height)/2:100;Element.setPosition(b,f,d);}function getWindowSize(){var c,a;var b,d;a=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;b=window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth);d=window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight);return{width:b,height:d,top:a,left:c};}function hideDiv(){var b=document.getElementById("wf-info");var a=document.getElementById("wf-infoshim");b.style.display="none";a.style.display="none";}ajFrm={frame:function(g){if(elm=document.getElementById("fxBBA")){document.body.removeChild(elm);}var a="fbx"+new Date().getTime();var f=document.createElement("DIV");f.setAttribute("id","fxBBA");f.innerHTML='<iframe style="display:none" src="/js/img/blank.gif" id="'+a+'" name="'+a+'" onload="ajFrm.loaded(\''+a+"')\"></iframe>";document.body.appendChild(f);var b=document.getElementById(a);if(g&&typeof(g.onComplete)=="function"){b.onComplete=g.onComplete;}else{b.onComplete=this.onComplete;}return a;},form:function(b,a){b.setAttribute("target",a);},submit:function(a,b){ajFrm.form(a,ajFrm.frame(b));if(b&&typeof(b.onStart)=="function"){return b.onStart();}else{showDiv();window.status="sending..";$("wf-reset").disable();$("wf-submit").disable();Element.hide("wf-finish");new Effect.Appear("wf-send",{duration:2,from:0,to:0.8});a.submit();return true;}},onStart:function(){return true;},onComplete:function(a){if(a&&a=="ALLOK"){window.status=a;$("wform").disable();Element.hide("wf-send");Element.show("wf-finish");showDiv();this.sendstate=true;}else{Element.hide("wf-send");$("wform").disable();Element.show("wf-finish");showDiv();gotoErrorPage();window.status=a;}},loaded:function(c){var a=document.getElementById(c);if(a.contentDocument){var b=a.contentDocument;}else{if(a.contentWindow){var b=a.contentWindow.document;}else{var b=window.frames[c].document;}}if(b.location.href=="/js/img/blank.gif"){return;}if(typeof(a.onComplete)=="function"){a.onComplete(b.body.innerHTML);}}};Validator=Class.create();Validator.prototype={initialize:function(c,b,d,a){this.options=Object.extend({},a||{});this._test=d?d:function(f,g){return true;};this.error=b?b:"Validation failed.";this.className=c;},test:function(a,b){return this._test(a,b);}};var Validation=Class.create();Validation.prototype={initialize:function(c,a){this.options=Object.extend({serverurl:window.location.protocol+"//"+window.location.host,onSubmit:true,stopOnFirst:false,immediate:false,advicelabel:"top",focusOnError:true,useTitles:true,method:"post",asynchronous:false,useajax:true,ticketId:"WF"+new Date().getTime(),onFormValidate:function(f,g){},onElementValidate:function(f,g){}},a||{});this.form=$(c);this.notesfunction=$("WEB07-NFNC");this.logName=$("wfname");this.logName=(this.logName)?this.logName:"WEB07FORM";this.options.serverurl=this.form.action;this.options.serverurl="/dlib/up_mail.php";this.form.action=this.options.serverurl;if(this.options.onSubmit){Event.observe(this.form,"submit",this.onSubmit.bind(this),false);}if(this.options.immediate){var b=this.options.useTitles;var d=this.options.onElementValidate;Form.getElements(this.form).each(function(f){Event.observe(f,"blur",function(g){Validation.validate(Event.element(g),{useTitle:b,onElementValidate:d});});});}if(this.notesfunction){this.onNotesFunction();}},onNotesFunction:function(){var a=this.notesfunction.getValue();switch(a){case"recommendation":if(parent&&parent.document){if($("MAIL-SITELINK-255")&&parent.document.location.href){$("MAIL-SITELINK-255").value=parent.document.location.href;}if($("MAIL-SUBJECT-255")&&parent.document.title){$("MAIL-SUBJECT-255").value=parent.document.title;}window.setTimeout(function(){try{$("MAIL-EMAIL1-31").focus();}catch(b){}},1500);}break;default:this.form.focusFirstElement();break;}},onSubmit:function(a){if(!this.validate()){$("wf-reset").setAttribute("clear",1);Event.stop(a);}else{$("wf-reset").setAttribute("clear",0);if(this.options.useajax===true){Event.stop(a);return this.transferdata();}else{if(this.options.uploader===true){Event.stop(a);this.form.action="/dlib/up_mail.php";return ajFrm.submit(this.form);}else{gotoErrorPage();}}}},transferdata:function(){var b=this.options.serverurl;this.sendstate=false;this.options.postBody=Form.serialize(this.form);this.options.ticketId="WF"+new Date().getTime();this.options.serverurl+="?upform="+this.logName+"&ticketId="+this.options.ticketId;var a=new Ajax.Request(this.options.serverurl,{method:this.options.method,postBody:this.options.postBody,onLoading:function(){showDiv();window.status="sending..";$("wf-reset").disable();$("wf-submit").disable();Element.hide("wf-finish");new Effect.Appear("wf-send",{duration:2,from:0,to:0.8});}.bind(this),onComplete:function(c){if(c.responseText&&c.responseText=="ALLOK"){window.status=c.responseText;$("wform").disable();Element.hide("wf-send");Element.show("wf-finish");showDiv();this.sendstate=true;}else{Element.hide("wf-send");$("wform").disable();Element.show("wf-finish");showDiv();gotoErrorPage();window.status=c.responseText;}}.bind(this),onFailure:function(){Element.hide("wf-send");$("wform").disable();gotoErrorPage();window.status="Fatal Error...";}.bind(this)});this.options.serverurl=b;return this.sendstate;},validate:function(){var a=false;var b=this.options.useTitles;var c=this.options.onElementValidate;if(this.options.stopOnFirst){a=Form.getElements(this.form).all(function(d){return Validation.validate(d,{useTitle:b,onElementValidate:c});});}else{a=Form.getElements(this.form).collect(function(d){return Validation.validate(d,{useTitle:b,onElementValidate:c});}).all();}if(!a&&this.options.focusOnError){Form.getElements(this.form).findAll(function(d){return $(d).hasClassName("validation-failed");}).first().focus();}this.options.onFormValidate(a,this.form);return a;},reset:function(){if($("wf-reset").getAttribute("clear")&&$("wf-reset").getAttribute("clear")==1){Form.getElements(this.form).each(Validation.reset);$("wf-reset").setAttribute("clear",0);}else{this.form.reset();}if(elm=Form.findFirstElement(this.form)){elm.activate();}}};Object.extend(Validation,{validate:function(c,a){a=Object.extend({useTitle:false,onElementValidate:function(d,f){}},a||{});c=$(c);var b=c.classNames();return result=b.all(function(d){var f=Validation.test(d,c,a.useTitle);a.onElementValidate(f,c);return f;});},test:function(b,h,j){var k=Validation.get(b);var a="__advice"+b.camelize();var f=(h.type.toLowerCase()=="select-one");var l=(f)?k.test(h.value,h):k.test($F(h),h);if(Validation.isVisible(h)&&!l){if(!h[a]){var d=Validation.getAdvice(b,h);if(typeof d=="undefined"||d==null){var g=j?((h&&h.title)?h.title:k.error):k.error;d='<div class="validation-advice" id="advice-'+b+"-"+Validation.getElmID(h)+'" style="display:none">'+g+"</div>";var c=null;switch(h.type.toLowerCase()){case"checkbox":case"radio":c=h.parentNode;default:c=null;}(c)?new Insertion.Before(c,d):new Insertion.Before(h,d);d=$("advice-"+b+"-"+Validation.getElmID(h));}if(typeof Effect=="undefined"||Effect==null){d.style.display="block";}else{new Effect.Appear(d,{duration:1});}}h[a]=true;h.removeClassName("validation-passed");h.addClassName("validation-failed");return false;}else{var d=Validation.getAdvice(b,h);if(typeof d!="undefined"&&d!=null){d.hide();}h[a]="";h.removeClassName("validation-failed");h.addClassName("validation-passed");return true;}},isVisible:function(a){while(a.tagName!="BODY"){if(!$(a).visible()){return false;}a=a.parentNode;}return true;},getAdvice:function(a,b){return Try.these(function(){return $("advice-"+a+"-"+Validation.getElmID(b));},function(){return $("advice-"+Validation.getElmID(b));});},getElmID:function(a){return a.id?a.id:a.name;},reset:function(b){b=$(b);var a=b.classNames();a.each(function(d){var f="__advice"+d.camelize();if(b[f]){var c=Validation.getAdvice(d,b);c.hide();b[f]="";}b.removeClassName("validation-failed");b.removeClassName("validation-passed");});Element.show("wf-submit");},add:function(d,c,f,b){var a={};a[d]=new Validator(d,c,f,b);Object.extend(Validation.methods,a);},addAllThese:function(a){var b={};$A(a).each(function(c){b[c[0]]=new Validator(c[0],c[1],c[2],(c.length>3?c[3]:{}));});Object.extend(Validation.methods,b);},get:function(a){return Validation.methods[a]?Validation.methods[a]:new Validator();},methods:{}});Validation.add("IsEmpty","",function(a){return((a==null)||(a.length==0));});Validation.addAllThese([["required","This is a required field.",function(a){return !Validation.get("IsEmpty").test(a);}],["validate-number","Enter a valid number in this field.",function(a){return Validation.get("IsEmpty").test(a)||(!isNaN(a)&&!/^\s+$/.test(a));}],["validate-digits","Use numbers only in this field, avoid spaces or other characters such as dots or commas.",function(a){return Validation.get("IsEmpty").test(a)||!/[^\d]/.test(a);}],["validate-alpha","Use letters only (a-z) in this field.",function(a){return Validation.get("IsEmpty").test(a)||/^[a-zA-Z]+$/.test(a);}],["validate-alphanum","Use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.",function(a){return Validation.get("IsEmpty").test(a)||!new RegExp("W").test(a);}],["validate-date","Enter a valid date.",function(a){var b=new Date(a);return Validation.get("IsEmpty").test(a)||!isNaN(b);}],["validate-date-iso","Please use this date format: yyyy/mm/dd. For example 2006/03/17 for the 17th of March, 2006.",function(a){if(Validation.get("IsEmpty").test(a)){return true;}var b=new RegExp("^([0-9]{4})(/|-|.|s)([0-9]{2})(/|-|.|s)([0-9]{2})$");if(!b.test(a)){return false;}var c=new Date(a.replace(b,"$1/$3/$5"));return(parseInt(RegExp.$3,10)==(1+c.getMonth()))&&(parseInt(RegExp.$5,10)==c.getDate())&&(parseInt(RegExp.$1,10)==c.getFullYear());}],["validate-date-dmy","Please use this date format: dd.mm.yyyy.",function(a){if(Validation.get("IsEmpty").test(a)){return true;}var b=new RegExp("^([0-9]{2})(/|-|.|s)([0-9]{2})(/|-|.|s)([0-9]{4})$");if(!b.test(a)){return false;}var c=new Date(a.replace(b,"$1/$2/$3"));return(parseInt(RegExp.$2,10)==(1+c.getMonth()))&&(parseInt(RegExp.$1,10)==c.getDate())&&(parseInt(RegExp.$3,10)==c.getFullYear());}],["validate-date-mdy","Please use this date format: mm.dd.yyyy.",function(a){if(Validation.get("IsEmpty").test(a)){return true;}var b=new RegExp("^([0-9]{2})(/|-|.|s)([0-9]{2})(/|-|.|s)([0-9]{4})$");if(!b.test(a)){return false;}var c=new Date(a.replace(b,"$1/$2/$3"));return(parseInt(RegExp.$1,10)==(1+c.getMonth()))&&(parseInt(RegExp.$2,10)==c.getDate())&&(parseInt(RegExp.$3,10)==c.getFullYear());}],["validate-date-yyyymm","Please use this date format: yyyy.mm. For example 2006.03 for the March, 2006.",function(a){if(Validation.get("IsEmpty").test(a)){return true;}var b=new RegExp("^([0-9]{4})(/|-|.|s)([0-9]{2})$");if(!b.test(a)){return false;}var c=new Date(a.replace(b,"$1/$3/01"));return(parseInt(RegExp.$3,10)==(1+c.getMonth()))&&(parseInt(RegExp.$1,10)==c.getFullYear());}],["validate-date-mmyyyy","Please use this date format: yyyy.mm. For example 03.2006 for the March, 2006.",function(a){if(Validation.get("IsEmpty").test(a)){return true;}var b=new RegExp("^([0-9]{2})(/|-|.|s)([0-9]{4})$");if(!b.test(a)){return false;}var c=new Date(a.replace(b,"$3/$1/01"));return(parseInt(RegExp.$1,10)==(1+c.getMonth()))&&(parseInt(RegExp.$3,10)==c.getFullYear());}],["validate-email","Enter a valid email address. For example fred@domain.com .",function(a){var b=new RegExp("^([a-zA-Z0-9\\-\\.\\_]+)(\\@)([a-zA-Z0-9\\-\\.]+)(\\.)([a-zA-Z]{2,4})$");return Validation.get("IsEmpty").test(a)||b.test(a);}],["validate-url","Enter a valid URL.",function(a){return Validation.get("IsEmpty").test(a)||/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(a);}],["validate-currency-dollar","Enter a valid $ amount. For example $100.00 .",function(a){return Validation.get("IsEmpty").test(a)||/^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(a);}],["validate-one-required","Select one of the options.",function(a,d){var c=d.parentNode;var b=c.getElementsByTagName("INPUT");return $A(b).any(function(f){return $F(f);});}],["validate-selectbox","Select one of the options.",function(a,b){return !((a==null)||(a.length==0));}]]);var ValidationFactory=function(){};ValidationFactory._cacheValidation={};ValidationFactory.create=function(d,b){var c=ValidationFactory._cacheValidation[d];if(c){return c;}var a=new Validation(d,b);ValidationFactory._cacheValidation[d]=a;return a;};Validation.add("max-length",function(b,d){var c=d.className.match(new RegExp("max-length-(\d*)"));var a=parseInt(c[1]);return"max-length-number:"+a+",current:"+b.length;},function(b,d){var c=d.className.match(new RegExp("max-length-(\d*)"));var a=parseInt(c[1]);return Validation.get("IsEmpty").test(b)||b.length<=a;});Validation.add("validate-file",function(a,f){var c=f.className.match(new RegExp("validate-file-([a-zA-Z0-9-]*)"));var b=c[1];var d=b.split("-");return"validate-file:"+d.join(",");},function(a,f){var c=f.className.match(new RegExp("validate-file-([a-zA-Z0-9-]*)"));var b=c[1];var d=b.split("-");return Validation.get("IsEmpty").test(a)||d.any(function(g){var h=new RegExp("\\."+g+"$","i");return h.test(a);});});Validation.add("validate-float-range",function(a,f){if(!Validation.get("validate-number").test(a)){return Validation.get("validate-number").error;}var b=f.className.match(new RegExp("validate-float-range-(-?[\d.]*)-(-?[\d.]*)"));var c=parseFloat(b[1]);var d=parseFloat(b[2]);return"Increase floating point numeral scope:"+c+" - "+d+"";},function(a,f){var b=f.className.match(new RegExp("validate-float-range-(-?[\d.]*)-(-?[\d.]*)"));var c=parseFloat(b[1]);var d=parseFloat(b[2]);return Validation.get("IsEmpty").test(a)||(Validation.get("validate-number").test(a)&&(parseFloat(a)>=c&&parseFloat(a)<=d));});Validation.add("validate-length-range",function(c,f){var d=f.className.match(new RegExp("validate-length-range-(\d*)-(\d*)"));var b=parseInt(d[1]);var a=parseInt(d[2]);return"minLength-maxLength:"+b+" - "+a+" current:"+c.length;},function(c,f){var d=f.className.match(new RegExp("validate-length-range-(\d*)-(\d*)"));var b=parseInt(d[1]);var a=parseInt(d[2]);return Validation.get("IsEmpty").test(c)||(c.length>=b&&c.length<=a);});Validation.add("max-value",function(a,d){if(!Validation.get("validate-number").test(a)){return Validation.get("validate-number").error;}var b=d.className.match(new RegExp("max-value-(-?[\d.]*)"));var c=parseFloat(b[1]);return"max-value-number:"+c;},function(a,d){var b=d.className.match(new RegExp("max-value-(-?[\d.]*)"));var c=parseFloat(b[1]);return Validation.get("IsEmpty").test(a)||(Validation.get("validate-number").test(a)&&parseFloat(a)<=c);});Validation.add("min-value",function(a,d){if(!Validation.get("validate-number").test(a)){return Validation.get("validate-number").error;}var b=d.className.match(new RegExp("min-value-(-?[\d.]*)"));var c=parseFloat(b[1]);return"min-value-number:"+c;},function(a,d){var b=d.className.match(new RegExp("min-value-(-?[\d.]*)"));var c=parseFloat(b[1]);return Validation.get("IsEmpty").test(a)||(Validation.get("validate-number").test(a)&&parseFloat(a)>=c);});if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(g,d,o,j,l,n,p,k,a,f){if(!document.getElementById){return;}this.DETECT_KEY=f?f:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(g){this.setAttribute("swf",g);}if(d){this.setAttribute("id",d);}if(o){this.setAttribute("width",o);}if(j){this.setAttribute("height",j);}if(l){this.setAttribute("version",new deconcept.PlayerVersion(l.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(n){this.addParam("bgcolor",n);}var b=p?p:"high";this.addParam("quality",b);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var m=(k)?k:window.location;this.setAttribute("xiRedirectUrl",m);this.setAttribute("redirectUrl","");if(a){this.setAttribute("redirectUrl",a);}};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"expressinstall.swf":a;this.setAttribute("useExpressInstall",true);},setAttribute:function(a,b){this.attributes[a]=b;},getAttribute:function(a){return this.attributes[a];},addParam:function(a,b){this.params[a]=b;},getParams:function(){return this.params;},addVariable:function(a,b){this.variables[a]=b;},getVariable:function(a){return this.variables[a];},getVariables:function(){return this.variables;},getVariablePairs:function(){var a=new Array();var b;var c=this.getVariables();for(b in c){a[a.length]=b+"="+c[b];}return a;},getSWFHTML:function(){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}d='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';d+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var c=this.getParams();for(var a in c){d+=[a]+'="'+c[a]+'" ';}var b=this.getVariablePairs().join("&");if(b.length>0){d+='flashvars="'+b+'"';}d+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}d='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';d+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var a in c){d+='<param name="'+a+'" value="'+c[a]+'" />';}var b=this.getVariablePairs().join("&");if(b.length>0){d+='<param name="flashvars" value="'+b+'" />';}d+="</object>";}return d;},write:function(a){if(this.getAttribute("useExpressInstall")){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!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 c=(typeof a=="string")?document.getElementById(a):a;c.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var c=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){c=new deconcept.PlayerVersion(a.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 d=1;var b=3;while(d){try{b++;d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);c=new deconcept.PlayerVersion([b,0,0]);}catch(f){d=null;}}}else{try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(f){try{var d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=new deconcept.PlayerVersion([6,0,21]);d.AllowScriptAccess="always";}catch(f){if(c.major==6){return c;}}try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(f){}}if(d!=null){c=new deconcept.PlayerVersion(d.GetVariable("$version").split(" ")[1].split(","));}}}return c;};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false;}if(this.major>a.major){return true;}if(this.minor<a.minor){return false;}if(this.minor>a.minor){return true;}if(this.rev<a.rev){return false;}return true;};deconcept.util={getRequestParameter:function(d){var c=document.location.search||document.location.hash;if(d==null){return c;}if(c){var b=c.substring(1).split("&");for(var a=0;a<b.length;a++){if(b[a].substring(0,b[a].indexOf("="))==d){return b[a].substring((b[a].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var c=document.getElementsByTagName("OBJECT");for(var b=c.length-1;b>=0;b--){c[b].style.display="none";for(var a in c[b]){if(typeof c[b][a]=="function"){c[b][a]=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(a){return document.all[a];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var urlAddress=this.location;var pageName=document.title;var videoPlayer="/js/videoplayer.swf";var FWM=null;var slTime=0.5;Element.addMethods({redraw:function(a){a=$(a);var b=document.createTextNode(" ");a.appendChild(b);(function(){b.parentNode.removeChild(b);}).defer();return a;}});if(Prototype.Browser.IE){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}function fcRemoveObjects(){var a=null;try{if(document.all&&document.all.tags){a=document.all.tags("object");}else{a=$("wrapper").getElementsBySelector("object");}if(a&&a.length){if(a&&a.length){for(var b=a.length-1;0<=b;b--){a[b].removeNode(true);}}}}catch(c){}}function dwl_showtext(a){if(a&&a.id){$(a.id+"C").toggle();}}function doError(f,b,c){try{var a="errMsg="+escape(f);a+="&errLine="+c;a+="&queryString="+escape(location.search);a+="&url="+escape(location.pathname);a+="&referrer="+escape(document.referrer);a+="&tid="+new Date().getTime();var d=new Image();d.src=weblibs+"dlib/up_logger.php?page=error&"+a;return true;}catch(g){}}function gotoErrorPage(){if(website){document.location.replace(webbase+"/00/01/index.php");}}function uid(){return new Date().getTime();}function getServerName(){var a=document.location.href;var b=new RegExp("^https*://");var c=new RegExp("/.*$");var d=a.replace(b,"");return d.replace(c,"");}function sBoxCheck(a,b){try{if(a&&a.value&&b){a.value=(a.value==b)?"":b;}}catch(c){}return true;}function sendSMS(b){var c=null;if(b=$(b)){if(c=b.value){if(checkPhoneNumber(c)){$("sndbtn").disabled=true;var a="/dlib/up_sms.php?phoneno="+c+getSiteParam();new Ajax.Request(a,{method:"get",onLoading:function(){$("sndbtn").disabled=true;},onSuccess:function(d){$("sndbtn").disabled=true;},onFailure:function(){},onComplete:function(g){var d=$("postmsg");var f=g.responseText;d.update(f).setStyle({color:"#ff4208"});}});}else{alert("Invalid Phone Number !");b.focus();b.select();$("sndbtn").disabled=false;return false;}}}}function checkPhoneNumber(b){var d=null;var a=0;if(b.length<10){return false;}for(a=0;a<b.length;a++){var d=b.charAt(a);if(((d<"0")||(d>"9"))){return false;}}return true;}function getSiteParam(){try{return"&WEB07-PAGESITE="+up_site+"&WEB07-PAGELANG="+up_lang;}catch(a){return"&WEB07-PAGESITE=eu&WEB07-PAGELANG=en";}}function loadVideoplayer(c,a){if(a&&c){var b=new SWFObject(videoPlayer,"flvPlayer","100%","100%","#EEEEEA","9.0.0");b.useExpressInstall("/js/expressinstall.swf");b.addVariable("file",a);b.addVariable("autoplay","true");b.addParam("menu","false");b.addParam("wmode","transparent");b.addParam("fullscreen","true");b.addParam("allowScriptAccess","always");b.write(c);return true;}return false;}function loadFlashVideo(g,k,d,b,f,c,a){b=b||"320";f=f||"280";c=c||"8";if(k){a=a||"#EEEEEA";var j=new SWFObject(k,d,b,f,c,a);j.addParam("movie","/js/player.swf");j.addParam("allowScriptAccess","sameDomain");j.addParam("FlashVars","flvURL=' + src + '&ControlPanelColor=0xff4208&buttonColor=0xffffff&ControlPanelPosition=0&showControlPanel=2&ShowtimeColor=0x000000&bAutoPlay=1&bAutoRepeat=0&BufferTime=5&tmeColor=0xffffff&loaColor=0x666666&GroundColor=0xeeeeea&");j.addParam("quality","high");j.addParam("bgcolor",a);j.addParam("scale","noscale");j.addParam("salign","lt");j.addParam("align","middle");j.write(g);return true;}return false;}function loadFlash(g,k,d,b,f,c,a){var j=new SWFObject(k,d,b,f,c,a);j.addParam("quality","high");j.addParam("swLiveConnect","true");j.addParam("name",d);j.addParam("allowScriptAccess","sameDomain");j.write(g);return true;}function load_contentflash(a,c){var b=new SWFObject(c,id+"a","654","454","8","#EEEEEA");b.addParam("swLiveConnect","true");b.addParam("scale","noscale");b.addParam("quality","autohigh");b.addParam("wmode","transparent");b.addParam("align","middle");b.addParam("allowScriptAccess","sameDomain");b.addParam("name",id+"_fm");b.write(a);return true;}function load_Flash(c,a){param=Object.extend({src:null,quality:"autohigh",menu:null,scale:null,align:null,wmode:null,version:"8",liveconnect:true,allowscript:"sameDomain",allowfullscreen:"true",width:654,height:454,bgcolor:"#EEEEEA"},arguments[1]||{});var b=new SWFObject(param.src,c+"_fm",param.width,param.height,param.version,param.bgcolor);if(param.qualitiy){b.addParam("quality",param.qualitiy);}if(param.scale){b.addParam("scale",param.scale);}if(param.menu){b.addParam("menu",param.menu);}if(param.align){b.addParam("salign",param.align);}if(param.text){b.addVariable("flashVarText",param.text);}if(param.wmode){b.addVariable("wmode",param.wmode);}if(param.liveconnect){b.addParam("swLiveConnect",param.liveconnect);}if(param.allowscript){b.addParam("allowScriptAccess",param.allowscript);}b.addParam("name",c+"_fm");b.write(c);return true;}function onImageData(a){if(a&&a.tooltip){if(a.type&&a.type=="upbanner"&&$(a.type)){$(a.type).title=a.tooltip;}}}function pdfInit(){window.setTimeout("pdfcatalog_start()",500);}function pdfcatalog_start(){try{window.document.focus();}catch(a){}try{$("pdflist").focus();}catch(a){}}function pdfcatalog_load(a){if(a&&a.value){$("pdfviewer").src=a.value;window.setTimeout("pdfcatalog_start()",2000);}}function pdfselpage(a){if(elm=$("pdflist")){var b=elm.options.length;var c=elm.selectedIndex;switch(Number(a)){case 1:if(!$("pdfbtnFirst").disabled){elm.selectedIndex=0;}break;case 2:if(!$("pdfbtnPrev").disabled){elm.selectedIndex=(c==0)?0:(Number(c)-1);}break;case 3:if(!$("pdfbtnNext").disabled){elm.selectedIndex=((b-c)==1)?elm.selectedIndex:(Number(c)+1);}break;case 4:if(!$("pdfbtnLast").disabled){elm.selectedIndex=Number(b)-1;}break;}$("pdfbtnFirst").disabled=(elm.selectedIndex==0);$("pdfbtnPrev").disabled=(elm.selectedIndex==0);$("pdfbtnNext").disabled=(elm.selectedIndex==Number(b)-1);$("pdfbtnLast").disabled=(elm.selectedIndex==Number(b)-1);pdfcatalog_load(elm);}}function pdfDownload(a){if(fileName=$(a).value){$("pdf1").src="/dlib/dwl.php?file="+fileName;}return true;}function init(){FWM=new web07("WF"+new Date().getTime());try{self.focus();}catch(a){}}function setmap(b){try{$("map").src=b;}catch(a){}}function setimgsrc(c,b){var a=$("id");if(a&&b){a.src=b;}}function sendpage(){var a="";a+="mailto:?subject=BLUM Produktinformation: "+document.title;a+="&body=Interessanter Artikel bei BLUM entdeckt!";a+="Er heißt: "+document.title;a+=". Hier ist die Adresse: "+location.href;location.href=a;}function init_slideShow(){var a=new slideShow("sls01");}function doubleClick(e){if(e.target.parentNode.className=="photo photo-selected"){var day=new Date();var id=day.getTime();eval("page"+id+" = window.open('"+_photoDir+e.target.parentNode.id+".jpg', '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=620,height=420');");}}function openpopup(a,b){b=Object.extend({mode:"content",header:true,footer:false,navigation:false,width:650,height:460,size:0},arguments[1]||{});a=checkUrl(a);return FWM.openPopup(a,b);}function openslideshow(a,b){b=Object.extend({mode:"slideshow",header:false,footer:false,navigation:false,width:650,height:460,size:6},arguments[1]||{});a=checkUrl(a);return FWM.openPopup(a,b);}function checkUrl(a){if(up_site&&up_lang){a+=(a.indexOf("?")>=0?"&":"?")+("up_site="+up_site+"&up_lang="+up_lang);}return a;}function openvideoshow(a,b){b=Object.extend({mode:"videoshow",header:false,footer:false,navigation:false,width:650,height:460,size:6},arguments[1]||{});a=checkUrl(a);return FWM.openPopup(a,b);}var web07=Class.create();web07.prototype={initialize:function(b,a){this.version="09.03.051843";this.id=b;this.options=Object.extend({style:"default"},arguments[1]||{});this.newWindow=null;this.baseurl=document.location.protocol+"//"+document.location.host;},destroy:function(){},preloader:function(){for(tmp=[],x=0;x<arguments.length;){tmp[x]=new Image();tmp[x].src=arguments[x];if(tmp[x].complete){x++;}}return(x==arguments.length)?true:false;},get_image_property:function(a){var tmp,t=["fileCreatedDate","fileModifiedDate","mimeType","fileSize","width","height"];tmp=new Image();tmp.src=a;for(obj={},x=0;x<t.length;x++){obj[eval(x)]=tmp[t[x]];}return obj;},setmap:function(c){try{$("map").src=c;}catch(b){var a=0;}},mailto:function(a){location.href=this._uncryptMailto(a);},_uncryptMailto:function(b){var c="";if(b&&b.length){var f=0,d=b.length;for(var a=0;a<d;a++){f=b.charCodeAt(a);if(f>=8364){f=128;}c+=String.fromCharCode(f-(2));}}return c;},openPopup:function(b,d){d=Object.extend({name:"WSL01",mode:"content",header:false,footer:false,navigation:false,width:0,height:0},arguments[1]||{});if(b&&d){try{this.checkQueryParams(b,d);d.mode=(d.width==0||d.height==0)?"extern":d.mode;d.top=(screen.availHeight-d.height)/2;d.left=(screen.availWidth-d.width)/2;d.top=d.top||10;d.left=d.left||10;d.width=d.width||650;d.height=d.height||440;d.size=d.size||0;var a="toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no";switch(d.size){case 1:d.width=800;d.height=600;a="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";b=this.checkPopupType(b,d.mode);break;case 2:d.width=500;d.height=320;d.mode="small";b=this.checkPopupType(b,d.mode);break;case 3:d.width=650;d.height=480;d.mode="medium";b=this.checkPopupType(b,d.mode);break;case 4:a="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";d.width=720;d.height=600;d.mode="large";b=this.checkPopupType(b,d.mode);break;case 6:d.width=650;d.height=480;b=this.checkPopupType(b,d.mode);d.mode="slideshow";default:a="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";d.width=d.width||800;d.height=d.height||600;d.mode=d.mode||"large";b=this.checkPopupType(b,d.mode);break;}if(this.newWindow&&!this.newWindow.closed&&this.newWindow.location){this.newWindow.location.href=b;}else{if((d.mode=="extern")||(d.width==800&&d.height==600)){a="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no";}if(d.mode=="pdf"){a="toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,directories=no";}this.newWindow=window.open(b,d.name,"top="+d.top+",left="+d.left+",width="+d.width+",height="+d.height+","+a);if(!this.newWindow.opener){this.newWindow.opener=self;}}if(window.focus&&this.newWindow){this.newWindow.focus();}}catch(c){alert("Error: check popup blocker !!");}if(!this.newWindow){alert("Error: check popup blocker !!");}}},checkPopupType:function(b,c){if((b.toLowerCase().indexOf("http://")!=-1)&&(b.toLowerCase().indexOf("https://")!=-1)){return b;}var a=b.split("?")[0];c=c||"content";switch(c){case"content":case"large":b+=(a==b)?"?pmod=101":"&pmod=101";break;case"videoshow":case"slideshow":b+=(a==b)?"?pmod="+c:"&pmod=slm";break;case"small":b+=(a==b)?"?pmod=001":"&pmod=001";b+="&ps=450";break;case"medium":b+=(a==b)?"?pmod=001":"&pmod=001";b+="&ps=600";break;case"flash":b+=(a==b)?"?pmod=001":"&pmod=001";break;case"pdf":b+=(a==b)?"?pmod=pdf":"&pmod=pdf";break;case"extern":default:break;}return b;},checkQueryParams:function(c,b){c=c.replace(new RegExp("&amp;","g"),"&");var a=c.toQueryParams();if(a){if(a.w){b.width=a.w;}if(a.h){b.height=a.h;}if(a.m){b.mode=a.m;}}return true;},openurl:function(a){if(a&&a.value){document.location.href=this.baseurl+a.value;return true;}return false;}};function zImage(a){if(a){}}function enlightMe(d,f){var a=$$(d+" a");var g=new RegExp("jpg|gif|png","i");for(var c=0;c<a.length;c++){var b=a[c].href;if(g.test(b)){if(f!=undefined){a[c].setAttribute("rel","lightbox["+f+"]");}else{a[c].setAttribute("rel","lightbox");}}}lb=new Lightbox();lb.initialize();}var slideShow=Class.create();slideShow.prototype={initialize:function(b){this.version="09.03.051843";this.id=b;this.options=Object.extend({viewmode:"IMG",autoplay:"true",duration:slTime},arguments[1]||{});this.container=$(this.id+"A");this.target=$(this.id+"L");this.options.viewmode=this.target.tagName;this.source=null;this.items=0;this.itemlast=null;this.description=null;this.viewwidth=357;this.viewheight=230;this.videoview="video";this.videocontainer=$(this.videoview);this.options.viewmode=(this.videocontainer)?"VIDEO":this.options.viewmode;this.videotype="wmv";this.videosource=null;if(this.videocontainer){var a=Element.getDimensions(this.videocontainer);this.viewwidth=a.width;this.viewheight=a.height;}if(this.target&&this.container){this.initSlideshow();}},initSlideshow:function(){var d=this.container.childNodes.length;var a=null;for(var b=0;b<d;b++){var c=this.container.childNodes[b];if(c.tagName=="IMG"){c.onmousemove=this.lightOn.bindAsEventListener(this);c.onmouseout=this.lightOff.bindAsEventListener(this);if(this.options.viewmode=="IMG"){c.onclick=this.showItem.bindAsEventListener(this);this.videosource=null;this.videotype=null;if(this.items===0){this.itemlast=c;this.description=$(c.id+"t");}}if(this.options.viewmode=="VIDEO"){c.onclick=this.showItem.bindAsEventListener(this);a=this.getVideoSource(c);c.setAttribute("videosource",a);c.setAttribute("videotype",this.videotype);if(this.items===0){this.videosource=a;this.itemlast=c;this.description=$(c.id+"t");}}c.setAttribute("textId",c.id+"t");this.items++;}}if(this.items==1){Element.hide(this.container);}if(this.videosource){this.startVideo();}},getVideoSource:function(b){var a=b.src.replace(".gif","");this.videotype=this._getVideoMimetype(a);if(this.videotype==="swf"||this.videotype==="flv"){}else{if(this.videotype!="swf"){a=a.replace("http://","mms://");}}return a;},startVideo:function(a){a=Object.extend({width:this.viewwidth,height:this.viewheight,src:this.videosource,autoplay:this.options.autoplay},arguments[0]||{});a.height="100%";a.width="100%";if(this.videosource&&this.videotype){this.videotype=this._getVideoMimetype(this.videosource);if(this.videotype==="swf"){if(Plugin.isInstalled("Flash")){Plugin.embed("Flash",a,this.videoview);return true;}}else{if(this.videotype==="flv"){return loadVideoplayer("video",this.videosource);}else{if(Plugin.isInstalled("Windows Media")){a.animationatStart="true";a.showstatusbar="false";a.autoStart="true";a.src=a.src.replace("http://","mms://");Plugin.embed("Windows Media",a,this.videoview);return true;}}}}return false;},showItem:function(a){this.source=Event.element(a);if(this.itemlast){Element.addClassName(this.itemlast,"lightOff");Element.removeClassName(this.source,"lightOff");}if(this.itemlast=$(this.source.id)){switch(this.options.viewmode){case"VIDEO":this.videosource=this.source.getAttribute("videosource");this.videotype=this.source.getAttribute("videotype");if(this.videosource&&this.videotype){this.startVideo();}break;default:this.showNextImage();break;}if(this.description){new Effect.Fade(this.description.id);Element.addClassName(this.description,"txthide");this.description=$(this.source.id+"t");new Effect.Appear(this.description.id,{duration:this.options.duration});Element.removeClassName(this.description,"txthide");}}if(this.source!=this.itemlast){}},showNextImage:function(){var c=this.target;var b=this.source;var a=this.options.duration;new Effect.Opacity(c,{from:1,to:0,duration:a,afterFinish:function(){c.src=b.src;c.title=b.title;new Effect.Opacity(c,{from:0,to:1,duration:a});}});},_getVideoMimetype:function(c){var a=c.replace(".gif","");var b=a.split(".");if(b&&b.length){return b[b.length-1];}return null;},lightOn:function(a){var b=Event.element(a);Element.removeClassName(b,"lightOff");},lightOff:function(a){var b=Event.element(a);if(b!=this.source){Element.addClassName(b,"lightOff");}}};function startVideo(f,b,c,j,a,d){if(Plugin.isInstalled("QuickTime")){var g=Plugin.getInfo("QuickTime");if(parseInt(g.version)==6&&g.version.indexOf("6.5")==0||parseInt(g.version)>=7){Plugin.embed("QuickTime",{width:b,height:c,src:j,autoplay:"true",controller:"true",scale:"aspect",type:"audio/3gpp",activeXType:"audio/3gpp"},f);return false;}else{if(parseInt(g.version)>=6){Plugin.embed("QuickTime",{width:b,height:c,src:a,autoplay:"true",controller:"true"},f);document.getElementById("videoInfo").innerHTML='<p style="background-color: #FFCC33; padding: 3px;">Please install Quicktime 7 for playing this video at original quality. <a href="'+g.pluginsPage+'">download</a></p>';return false;}else{document.getElementById("videoInfo").innerHTML='<p style="background-color: #FFCC33; padding: 3px;">Please install a newer Quicktime Plugin for playing this video. <a href="'+g.pluginsPage+'">download</a></p>';return false;}}}else{if(Plugin.isInstalled("Windows Media")){Plugin.embed("Windows Media",{width:b,height:c,src:d,autoplay:"true"},f);return false;}}return false;}function printlog(){try{var b=new Image();strValues="?printlog=up";strValues+="&url="+escape(location.pathname);strValues+="&ts="+new Date().getTime();b.src="/dlib/log/simple.php"+strValues;}catch(a){}}function fixOutOfMemoryError(){if(Prototype.Browser.IE){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};}}Event.observe(window,"load",init);try{window.onerror=doError;}catch(er){}window.onbeforeprint=printlog;if(Prototype.Browser.IE){window.attachEvent("onbeforeunload",fixOutOfMemoryError);}
