var Prototype={Version:"1.5.0",BrowserFeatures:{XPath:!!document.evaluate},ScriptFragment:"(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)",emptyFunction:function(){},K:function(a){return a}},Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},Abstract={};Object.extend=function(a,b){for(var c in b)a[c]=b[c];return a};
Object.extend(Object,{inspect:function(a){try{if(a===undefined)return"undefined";if(a===null)return"null";return a.inspect?a.inspect():a.toString()}catch(b){if(b instanceof RangeError)return"...";throw b;}},keys:function(a){var b=[];for(var c in a)b.push(c);return b},values:function(a){var b=[];for(var c in a)b.push(a[c]);return b},clone:function(a){return Object.extend({},a)}});Function.prototype.bind=function(){var a=this,b=$A(arguments),c=b.shift();return function(){return a.apply(c,b.concat($A(arguments)))}};
Function.prototype.bindAsEventListener=function(a){var b=this,c=$A(arguments);a=c.shift();return function(d){return b.apply(a,[d||window.event].concat(c).concat($A(arguments)))}};Object.extend(Number.prototype,{toColorPart:function(){var a=this.toString(16);if(this<16)return"0"+a;return a},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this}});
var Try={these:function(){for(var a,b=0,c=arguments.length;b<c;b++){var d=arguments[b];try{a=d();break}catch(e){}}return a}},PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},stop:function(){if(this.timer){clearInterval(this.timer);this.timer=null}},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=true;this.callback(this)}finally{this.currentlyExecuting=false}}};
String.interpret=function(a){return a==null?"":String(a)};
Object.extend(String.prototype,{gsub:function(a,b){var c="",d=this,e;for(b=arguments.callee.prepareReplacement(b);d.length>0;)if(e=d.match(a)){c+=d.slice(0,e.index);c+=String.interpret(b(e));d=d.slice(e.index+e[0].length)}else{c+=d;d=""}return c},sub:function(a,b,c){b=this.gsub.prepareReplacement(b);c=c===undefined?1:c;return this.gsub(a,function(d){if(--c<0)return d[0];return b(d)})},scan:function(a,b){this.gsub(a,b);return this},truncate:function(a,b){a=a||30;b=b===undefined?"...":b;return this.length>
a?this.slice(0,a-b.length)+b:this},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var a=new RegExp(Prototype.ScriptFragment,"img"),b=new RegExp(Prototype.ScriptFragment,"im");return(this.match(a)||[]).map(function(c){return(c.match(b)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(a){return eval(a)})},
escapeHTML:function(){var a=document.createElement("div"),b=document.createTextNode(this);a.appendChild(b);return a.innerHTML},unescapeHTML:function(){var a=document.createElement("div");a.innerHTML=this.stripTags();return a.childNodes[0]?a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue:""},toQueryParams:function(a){var b=this.strip().match(/([^?#]*)(#.*)?$/);if(!b)return{};return b[1].split(a||"&").inject({},function(c,d){if((d=d.split("="))[0]){var e=
decodeURIComponent(d[0]);d=d[1]?decodeURIComponent(d[1]):undefined;if(c[e]!==undefined){if(c[e].constructor!=Array)c[e]=[c[e]];d&&c[e].push(d)}else c[e]=d}return c})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},camelize:function(){var a=this.split("-"),b=a.length;if(b==1)return a[0];for(var c=this.charAt(0)=="-"?a[0].charAt(0).toUpperCase()+a[0].substring(1):a[0],d=1;d<b;d++)c+=a[d].charAt(0).toUpperCase()+
a[d].substring(1);return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(a){var b=this.replace(/\\/g,"\\\\");return a?'"'+b.replace(/"/g,'\\"')+'"':"'"+b.replace(/'/g,"\\'")+"'"}});
String.prototype.gsub.prepareReplacement=function(a){if(typeof a=="function")return a;var b=new Template(a);return function(c){return b.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;var Template=Class.create();Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){return this.template.gsub(this.pattern,function(b){var c=b[1];if(c=="\\")return b[2];return c+String.interpret(a[b[3]])})}};
var $break={},$continue={},Enumerable={each:function(a){var b=0;try{this._each(function(d){try{a(d,b++)}catch(e){if(e!=$continue)throw e;}})}catch(c){if(c!=$break)throw c;}return this},eachSlice:function(a,b){for(var c=-a,d=[],e=this.toArray();(c+=a)<e.length;)d.push(e.slice(c,c+a));return d.map(b)},all:function(a){var b=true;this.each(function(c,d){b=b&&!!(a||Prototype.K)(c,d);if(!b)throw $break;});return b},any:function(a){var b=false;this.each(function(c,d){if(b=!!(a||Prototype.K)(c,d))throw $break;
});return b},collect:function(a){var b=[];this.each(function(c,d){b.push((a||Prototype.K)(c,d))});return b},detect:function(a){var b;this.each(function(c,d){if(a(c,d)){b=c;throw $break;}});return b},findAll:function(a){var b=[];this.each(function(c,d){a(c,d)&&b.push(c)});return b},grep:function(a,b){var c=[];this.each(function(d,e){var f=d.toString();if(f.match(a))c.push((b||Prototype.K)(d,e))});return c},include:function(a){var b=false;this.each(function(c){if(c==a){b=true;throw $break;}});return b},
inGroupsOf:function(a,b){b=b===undefined?null:b;return this.eachSlice(a,function(c){for(;c.length<a;)c.push(b);return c})},inject:function(a,b){this.each(function(c,d){a=b(a,c,d)});return a},invoke:function(a){var b=$A(arguments).slice(1);return this.map(function(c){return c[a].apply(c,b)})},max:function(a){var b;this.each(function(c,d){c=(a||Prototype.K)(c,d);if(b==undefined||c>=b)b=c});return b},min:function(a){var b;this.each(function(c,d){c=(a||Prototype.K)(c,d);if(b==undefined||c<b)b=c});return b},
partition:function(a){var b=[],c=[];this.each(function(d,e){((a||Prototype.K)(d,e)?b:c).push(d)});return[b,c]},pluck:function(a){var b=[];this.each(function(c){b.push(c[a])});return b},reject:function(a){var b=[];this.each(function(c,d){a(c,d)||b.push(c)});return b},sortBy:function(a){return this.map(function(b,c){return{value:b,criteria:a(b,c)}}).sort(function(b,c){b=b.criteria;c=c.criteria;return b<c?-1:b>c?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var a=Prototype.K,
b=$A(arguments);if(typeof b.last()=="function")a=b.pop();var c=[this].concat(b).map($A);return this.map(function(d,e){return a(c.pluck(e))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});
var $A=Array.from=function(a){if(!a)return[];if(a.toArray)return a.toArray();else{for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b}};Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse)Array.prototype._reverse=Array.prototype.reverse;
Object.extend(Array.prototype,{_each:function(a){for(var b=0,c=this.length;b<c;b++)a(this[b])},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(a,b){return a.concat(b&&b.constructor==Array?b.flatten():[b])})},without:function(){var a=$A(arguments);return this.select(function(b){return!a.include(b)})},indexOf:function(a){for(var b=
0,c=this.length;b<c;b++)if(this[b]==a)return b;return-1},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(){return this.inject([],function(a,b){return a.include(b)?a:a.concat([b])})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"}});Array.prototype.toArray=Array.prototype.clone;
function $w(a){return(a=a.strip())?a.split(/\s+/):[]}if(window.opera)Array.prototype.concat=function(){for(var a=[],b=0,c=this.length;b<c;b++)a.push(this[b]);b=0;for(c=arguments.length;b<c;b++)if(arguments[b].constructor==Array)for(var d=0,e=arguments[b].length;d<e;d++)a.push(arguments[b][d]);else a.push(arguments[b]);return a};var Hash=function(a){Object.extend(this,a||{})};
Object.extend(Hash,{toQueryString:function(a){var b=[];this.prototype._each.call(a,function(c){if(c.key){if(c.value&&c.value.constructor==Array){var d=c.value.compact();if(d.length<2)c.value=d.reduce();else{key=encodeURIComponent(c.key);d.each(function(e){e=e!=undefined?encodeURIComponent(e):"";b.push(key+"="+encodeURIComponent(e))});return}}if(c.value==undefined)c[1]="";b.push(c.map(encodeURIComponent).join("="))}});return b.join("&")}});Object.extend(Hash.prototype,Enumerable);
Object.extend(Hash.prototype,{_each:function(a){for(var b in this){var c=this[b];if(!(c&&c==Hash.prototype[b])){var d=[b,c];d.key=b;d.value=c;a(d)}}},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},merge:function(a){return $H(a).inject(this,function(b,c){b[c.key]=c.value;return b})},remove:function(){for(var a,b=0,c=arguments.length;b<c;b++){var d=this[arguments[b]];if(d!==undefined)if(a===undefined)a=d;else{if(a.constructor!=Array)a=[a];a.push(d)}delete this[arguments[b]]}return a},
toQueryString:function(){return Hash.toQueryString(this)},inspect:function(){return"#<Hash:{"+this.map(function(a){return a.map(Object.inspect).join(": ")}).join(", ")+"}>"}});function $H(a){if(a&&a.constructor==Hash)return a;return new Hash(a)}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(a,b,c){this.start=a;this.end=b;this.exclusive=c},_each:function(a){for(var b=this.start;this.include(b);){a(b);b=b.succ()}},include:function(a){if(a<this.start)return false;if(this.exclusive)return a<this.end;return a<=this.end}});
var $R=function(a,b,c){return new ObjectRange(a,b,c)},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){this.include(a)||this.responders.push(a)},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(a,b,c,d){this.each(function(e){if(typeof e[a]=="function")try{e[a].apply(e,[b,c,d])}catch(f){}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};
Ajax.Base.prototype={setOptions:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(typeof this.options.parameters=="string")this.options.parameters=this.options.parameters.toQueryParams()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base,{_complete:false,initialize:function(a,b){this.transport=Ajax.getTransport();this.setOptions(b);this.request(a)},request:function(a){this.url=a;this.method=this.options.method;a=this.options.parameters;if(!["get","post"].include(this.method)){a._method=this.method;this.method="post"}if((a=Hash.toQueryString(a))&&/Konqueror|Safari|KHTML/.test(navigator.userAgent))a+="&_=";if(this.method=="get"&&a)this.url+=(this.url.indexOf("?")>-1?"&":"?")+a;try{Ajax.Responders.dispatch("onCreate",
this,this.transport);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);this.options.asynchronous&&setTimeout(function(){this.respondToReadyState(1)}.bind(this),10);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();var b=this.method=="post"?this.options.postBody||a:null;this.transport.send(b);!this.options.asynchronous&&this.transport.overrideMimeType&&this.onStateChange()}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=
this.transport.readyState;a>1&&!(a==4&&this._complete)&&this.respondToReadyState(this.transport.readyState)},setRequestHeaders:function(){var a={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){a["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)a.Connection="close"}if(typeof this.options.requestHeaders=="object"){var b=this.options.requestHeaders;if(typeof b.push=="function")for(var c=0,d=b.length;c<d;c+=2)a[b[c]]=b[c+1];else $H(b).each(function(f){a[f.key]=f.value})}for(var e in a)this.transport.setRequestHeader(e,a[e])},success:function(){return!this.transport.status||this.transport.status>=200&&this.transport.status<300},respondToReadyState:function(a){a=Ajax.Request.Events[a];var b=this.transport,c=this.evalJSON();
if(a=="Complete"){try{this._complete=true;(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,c)}catch(d){this.dispatchException(d)}if((this.getHeader("Content-type")||"text/javascript").strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))this.evalResponse()}try{(this.options["on"+a]||Prototype.emptyFunction)(b,c);Ajax.Responders.dispatch("on"+a,this,b,c)}catch(e){this.dispatchException(e)}if(a=="Complete")this.transport.onreadystatechange=
Prototype.emptyFunction},getHeader:function(a){try{return this.transport.getResponseHeader(a)}catch(b){return null}},evalJSON:function(){try{var a=this.getHeader("X-JSON");return a?eval("("+a+")"):null}catch(b){return null}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(a){this.dispatchException(a)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(a,b,c){this.container={success:a.success||a,failure:a.failure||(a.success?null:a)};this.transport=Ajax.getTransport();this.setOptions(c);var d=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=function(e,f){this.updateContent();d(e,f)}.bind(this);this.request(b)},updateContent:function(){var a=this.container[this.success()?"success":"failure"],b=this.transport.responseText;this.options.evalScripts||
(b=b.stripScripts());if(a=$(a))if(this.options.insertion)new this.options.insertion(a,b);else a.update(b);this.success()&&this.onComplete&&setTimeout(this.onComplete.bind(this),10)}});Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base,{initialize:function(a,b,c){this.setOptions(c);this.onComplete=this.options.onComplete;this.frequency=this.options.frequency||2;this.decay=this.options.decay||1;this.updater={};this.container=a;this.url=b;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=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1E3)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});
function $(a){if(arguments.length>1){for(var b=0,c=[],d=arguments.length;b<d;b++)c.push($(arguments[b]));return c}if(typeof a=="string")a=document.getElementById(a);return Element.extend(a)}if(Prototype.BrowserFeatures.XPath)document._getElementsByXPath=function(a,b){var c=[];a=document.evaluate(a,$(b)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);b=0;for(var d=a.snapshotLength;b<d;b++)c.push(a.snapshotItem(b));return c};
document.getElementsByClassName=function(a,b){if(Prototype.BrowserFeatures.XPath){a=".//*[contains(concat(' ', @class, ' '), ' "+a+" ')]";return document._getElementsByXPath(a,b)}else{b=($(b)||document.body).getElementsByTagName("*");for(var c=[],d,e=0,f=b.length;e<f;e++){d=b[e];Element.hasClassName(d,a)&&c.push(Element.extend(d))}return c}};if(!window.Element)var Element={};
Element.extend=function(a){if(!a||_nativeExtensions||a.nodeType==3)return a;if(!a._extended&&a.tagName&&a!=window){var b=Object.clone(Element.Methods),c=Element.extend.cache;a.tagName=="FORM"&&Object.extend(b,Form.Methods);["INPUT","TEXTAREA","SELECT"].include(a.tagName)&&Object.extend(b,Form.Element.Methods);Object.extend(b,Element.Methods.Simulated);for(var d in b){var e=b[d];if(typeof e=="function"&&!(d in a))a[d]=c.findOrStore(e)}}a._extended=true;return a};
Element.extend.cache={findOrStore:function(a){return this[a]=this[a]||function(){return a.apply(null,[this].concat($A(arguments)))}}};
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).style.display="none";return a},show:function(a){$(a).style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){b=typeof b=="undefined"?"":b.toString();$(a).innerHTML=b.stripScripts();setTimeout(function(){b.evalScripts()},10);return a},replace:function(a,b){a=$(a);b=typeof b==
"undefined"?"":b.toString();if(a.outerHTML)a.outerHTML=b.stripScripts();else{var c=a.ownerDocument.createRange();c.selectNodeContents(a);a.parentNode.replaceChild(c.createContextualFragment(b.stripScripts()),a)}setTimeout(function(){b.evalScripts()},10);return a},inspect:function(a){a=$(a);var b="<"+a.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(c){var d=c.first();c=c.last();if(d=(a[d]||"").toString())b+=" "+c+"="+d.inspect(true)});return b+">"},recursivelyCollect:function(a,
b){a=$(a);for(var c=[];a=a[b];)a.nodeType==1&&c.push(Element.extend(a));return c},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $A($(a).getElementsByTagName("*"))},immediateDescendants:function(a){if(!(a=$(a).firstChild))return[];for(;a&&a.nodeType!=1;)a=a.nextSibling;if(a)return[a].concat($(a).nextSiblings());return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},
siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(a,b){if(typeof b=="string")b=new Selector(b);return b.match($(a))},up:function(a,b,c){return Selector.findElement($(a).ancestors(),b,c)},down:function(a,b,c){return Selector.findElement($(a).descendants(),b,c)},previous:function(a,b,c){return Selector.findElement($(a).previousSiblings(),b,c)},next:function(a,b,c){return Selector.findElement($(a).nextSiblings(),b,c)},getElementsBySelector:function(){var a=
$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},getElementsByClassName:function(a,b){return document.getElementsByClassName(b,a)},readAttribute:function(a,b){a=$(a);if(document.all&&!window.opera){var c=Element._attributeTranslations;if(c.values[b])return c.values[b](a,b);if(c.names[b])b=c.names[b];if(c=a.attributes[b])return c.nodeValue}return a.getAttribute(b)},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},
classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(a=$(a)){a=a.className;if(a.length==0)return false;if(a==b||a.match(new RegExp("(^|\\s)"+b+"(\\s|$)")))return true;return false}},addClassName:function(a,b){if(a=$(a)){Element.classNames(a).add(b);return a}},removeClassName:function(a,b){if(a=$(a)){Element.classNames(a).remove(b);return a}},toggleClassName:function(a,b){if(a=$(a)){Element.classNames(a)[a.hasClassName(b)?"remove":"add"](b);return a}},observe:function(){Event.observe.apply(Event,
arguments);return $A(arguments).first()},stopObserving:function(){Event.stopObserving.apply(Event,arguments);return $A(arguments).first()},cleanWhitespace:function(a){a=$(a);for(var b=a.firstChild;b;){var c=b.nextSibling;b.nodeType==3&&!/\S/.test(b.nodeValue)&&a.removeChild(b);b=c}return a},empty:function(a){return $(a).innerHTML.match(/^\s*$/)},descendantOf:function(a,b){a=$(a);for(b=$(b);a=a.parentNode;)if(a==b)return true;return false},scrollTo:function(a){a=$(a);var b=Position.cumulativeOffset(a);
window.scrollTo(b[0],b[1]);return a},getStyle:function(a,b){a=$(a);if(["float","cssFloat"].include(b))b=typeof a.style.styleFloat!="undefined"?"styleFloat":"cssFloat";b=b.camelize();var c=a.style[b];if(!c)if(document.defaultView&&document.defaultView.getComputedStyle)c=(c=document.defaultView.getComputedStyle(a,null))?c[b]:null;else if(a.currentStyle)c=a.currentStyle[b];if(c=="auto"&&["width","height"].include(b)&&a.getStyle("display")!="none")c=a["offset"+b.capitalize()]+"px";if(window.opera&&["left",
"top","right","bottom"].include(b))if(Element.getStyle(a,"position")=="static")c="auto";if(b=="opacity"){if(c)return parseFloat(c);if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/))if(c[1])return parseFloat(c[1])/100;return 1}return c=="auto"?null:c},setStyle:function(a,b){a=$(a);for(var c in b){var d=b[c];if(c=="opacity")if(d==1){d=/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent)?0.999999:1;if(/MSIE/.test(navigator.userAgent)&&!window.opera)a.style.filter=
a.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}else if(d==""){if(/MSIE/.test(navigator.userAgent)&&!window.opera)a.style.filter=a.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")}else{if(d<1.0E-5)d=0;if(/MSIE/.test(navigator.userAgent)&&!window.opera)a.style.filter=a.getStyle("filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+d*100+")"}else if(["float","cssFloat"].include(c))c=typeof a.style.styleFloat!="undefined"?"styleFloat":"cssFloat";a.style[c.camelize()]=d}return a},getDimensions:function(a){a=
$(a);var b=$(a).getStyle("display");if(b!="none"&&b!=null)return{width:a.offsetWidth,height:a.offsetHeight};b=a.style;var c=b.visibility,d=b.position,e=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var f=a.clientWidth;a=a.clientHeight;b.display=e;b.position=d;b.visibility=c;return{width:f,height:a}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(window.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=a.style.overflow||"auto";if((Element.getStyle(a,"overflow")||"visible")!="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}};
Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf});Element._attributeTranslations={};Element._attributeTranslations.names={colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"};
Element._attributeTranslations.values={_getAttr:function(a,b){return a.getAttribute(b,2)},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){a=a.getAttributeNode("title");return a.specified?a.nodeValue:null}};
Object.extend(Element._attributeTranslations.values,{href:Element._attributeTranslations.values._getAttr,src:Element._attributeTranslations.values._getAttr,disabled:Element._attributeTranslations.values._flag,checked:Element._attributeTranslations.values._flag,readonly:Element._attributeTranslations.values._flag,multiple:Element._attributeTranslations.values._flag});Element.Methods.Simulated={hasAttribute:function(a,b){var c=Element._attributeTranslations;b=c.names[b]||b;return $(a).getAttributeNode(b).specified}};
if(document.all&&!window.opera)Element.Methods.update=function(a,b){a=$(a);b=typeof b=="undefined"?"":b.toString();var c=a.tagName.toUpperCase();if(["THEAD","TBODY","TR","TD"].include(c)){var d=document.createElement("div");switch(c){case "THEAD":case "TBODY":d.innerHTML="<table><tbody>"+b.stripScripts()+"</tbody></table>";depth=2;break;case "TR":d.innerHTML="<table><tbody><tr>"+b.stripScripts()+"</tr></tbody></table>";depth=3;break;case "TD":d.innerHTML="<table><tbody><tr><td>"+b.stripScripts()+
"</td></tr></tbody></table>";depth=4}$A(a.childNodes).each(function(e){a.removeChild(e)});depth.times(function(){d=d.firstChild});$A(d.childNodes).each(function(e){a.appendChild(e)})}else a.innerHTML=b.stripScripts();setTimeout(function(){b.evalScripts()},10);return a};Object.extend(Element,Element.Methods);var _nativeExtensions=false;
/Konqueror|Safari|KHTML/.test(navigator.userAgent)&&["","Form","Input","TextArea","Select"].each(function(a){var b="HTML"+a+"Element";if(!window[b]){b=window[b]={};b.prototype=document.createElement(a?a.toLowerCase():"div").__proto__}});
Element.addMethods=function(a){function b(c,d,e){e=e||false;var f=Element.extend.cache;for(var g in c){var j=c[g];if(!e||!(g in d))d[g]=f.findOrStore(j)}}Object.extend(Element.Methods,a||{});if(typeof HTMLElement!="undefined"){b(Element.Methods,HTMLElement.prototype);b(Element.Methods.Simulated,HTMLElement.prototype,true);b(Form.Methods,HTMLFormElement.prototype);[HTMLInputElement,HTMLTextAreaElement,HTMLSelectElement].each(function(c){b(Form.Element.Methods,c.prototype)});_nativeExtensions=true}};
var Toggle={};Toggle.display=Element.toggle;Abstract.Insertion=function(a){this.adjacency=a};
Abstract.Insertion.prototype={initialize:function(a,b){this.element=$(a);this.content=b.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML)try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(c){a=this.element.tagName.toUpperCase();if(["TBODY","TR"].include(a))this.insertContent(this.contentFromAnonymousTable());else throw c;}else{this.range=this.element.ownerDocument.createRange();this.initializeRange&&this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){b.evalScripts()},
10)},contentFromAnonymousTable:function(){var a=document.createElement("div");a.innerHTML="<table><tbody>"+this.content+"</tbody></table>";return $A(a.childNodes[0].childNodes[0].childNodes)}};var Insertion={};Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(a){a.each(function(b){this.element.parentNode.insertBefore(b,this.element)}.bind(this))}});
Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(a){a.reverse(false).each(function(b){this.element.insertBefore(b,this.element.firstChild)}.bind(this))}});Insertion.Bottom=Class.create();
Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(a){a.each(function(b){this.element.appendChild(b)}.bind(this))}});Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(a){a.each(function(b){this.element.parentNode.insertBefore(b,this.element.nextSibling)}.bind(this))}});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){this.include(a)||this.set($A(this).concat(a).join(" "))},remove:function(a){this.include(a)&&this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);var Selector=Class.create();
Selector.prototype={initialize:function(a){this.params={classNames:[]};this.expression=a.toString().strip();this.parseExpression();this.compileMatcher()},parseExpression:function(){function a(g){throw"Parse error in selector: "+g;}this.expression==""&&a("empty expression");for(var b=this.params,c=this.expression,d,e,f;d=c.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i);){b.attributes=b.attributes||[];b.attributes.push({name:d[2],operator:d[3],value:d[4]||d[5]||""});c=d[1]}if(c==
"*")return this.params.wildcard=true;for(;d=c.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i);){e=d[1];f=d[2];d=d[3];switch(e){case "#":b.id=f;break;case ".":b.classNames.push(f);break;case "":case undefined:b.tagName=f.toUpperCase();break;default:a(c.inspect())}c=d}c.length>0&&a(c.inspect())},buildMatchExpression:function(){var a=this.params,b=[],c;a.wildcard&&b.push("true");if(c=a.id)b.push('element.readAttribute("id") == '+c.inspect());if(c=a.tagName)b.push("element.tagName.toUpperCase() == "+c.inspect());
if((c=a.classNames).length>0)for(var d=0,e=c.length;d<e;d++)b.push("element.hasClassName("+c[d].inspect()+")");if(c=a.attributes)c.each(function(f){var g="element.readAttribute("+f.name.inspect()+")",j=function(k){return g+" && "+g+".split("+k.inspect()+")"};switch(f.operator){case "=":b.push(g+" == "+f.value.inspect());break;case "~=":b.push(j(" ")+".include("+f.value.inspect()+")");break;case "|=":b.push(j("-")+".first().toUpperCase() == "+f.value.toUpperCase().inspect());break;case "!=":b.push(g+
" != "+f.value.inspect());break;case "":case undefined:b.push("element.hasAttribute("+f.name.inspect()+")");break;default:throw"Unknown operator "+f.operator+" in selector";}});return b.join(" && ")},compileMatcher:function(){this.match=new Function("element","if (!element.tagName) return false;       element = $(element);       return "+this.buildMatchExpression())},findElements:function(a){var b;if(b=$(this.params.id))if(this.match(b))if(!a||Element.childOf(b,a))return[b];a=(a||document).getElementsByTagName(this.params.tagName||
"*");for(var c=[],d=0,e=a.length;d<e;d++)if(this.match(b=a[d]))c.push(Element.extend(b));return c},toString:function(){return this.expression}};
Object.extend(Selector,{matchElements:function(a,b){b=new Selector(b);return a.select(b.match.bind(b)).map(Element.extend)},findElement:function(a,b,c){if(typeof b=="number"){c=b;b=false}return Selector.matchElements(a,b||"*")[c||0]},findChildElements:function(a,b){return b.map(function(c){return c.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null],function(d,e){var f=new Selector(e);return d.inject([],function(g,j){return g.concat(f.findElements(j||a))})})}).flatten()}});
function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(a,b){a=a.inject({},function(c,d){if(!d.disabled&&d.name){var e=d.name;d=$(d).getValue();if(d!=undefined)if(c[e]){if(c[e].constructor!=Array)c[e]=[c[e]];c[e].push(d)}else c[e]=d}return c});return b?a:Hash.toQueryString(a)}};
Form.Methods={serialize:function(a,b){return Form.serializeElements(Form.getElements(a),b)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(b,c){Form.Element.Serializers[c.tagName.toLowerCase()]&&b.push(Element.extend(c));return b})},getInputs:function(a,b,c){a=$(a);a=a.getElementsByTagName("input");if(!b&&!c)return $A(a).map(Element.extend);for(var d=0,e=[],f=a.length;d<f;d++){var g=a[d];b&&g.type!=b||c&&g.name!=c||e.push(Element.extend(g))}return e},disable:function(a){a=
$(a);a.getElements().each(function(b){b.blur();b.disabled="true"});return a},enable:function(a){a=$(a);a.getElements().each(function(b){b.disabled=""});return a},findFirstElement:function(a){return $(a).getElements().find(function(b){return b.type!="hidden"&&!b.disabled&&["input","select","textarea"].include(b.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a}};Object.extend(Form,Form.Methods);
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 Hash.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type)))a.select();return a},
disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.blur();a.disabled=false;return a}};Object.extend(Form.Element,Form.Element.Methods);var Field=Form.Element,$F=Form.Element.getValue;
Form.Element.Serializers={input:function(a){switch(a.type.toLowerCase()){case "checkbox":case "radio":return Form.Element.Serializers.inputSelector(a);default:return Form.Element.Serializers.textarea(a)}},inputSelector:function(a){return a.checked?a.value:null},textarea:function(a){return a.value},select:function(a){return this[a.type=="select-one"?"selectOne":"selectMany"](a)},selectOne:function(a){var b=a.selectedIndex;return b>=0?this.optionValue(a.options[b]):null},selectMany:function(a){var b,
c=a.length;if(!c)return null;var d=0;for(b=[];d<c;d++){var e=a.options[d];e.selected&&b.push(this.optionValue(e))}return b},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};Abstract.TimedObserver=function(){};
Abstract.TimedObserver.prototype={initialize:function(a,b,c){this.frequency=b;this.element=$(a);this.callback=c;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1E3)},onTimerEvent:function(){var a=this.getValue(),b="string"==typeof this.lastValue&&"string"==typeof a?this.lastValue!=a:String(this.lastValue)!=String(a);if(b){this.callback(this.element,a);this.lastValue=a}}};Form.Element.Observer=Class.create();
Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};
Abstract.EventObserver.prototype={initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();this.element.tagName.toLowerCase()=="form"?this.registerFormCallbacks():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.bind(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();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event)var Event={};
Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return a.which&&a.which==1||a.button&&a.button==1},pointerX:function(a){return a.pageX||a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)},pointerY:function(a){return a.pageY||a.clientY+(document.documentElement.scrollTop||
document.body.scrollTop)},stop:function(a){if(a.preventDefault){a.preventDefault();a.stopPropagation()}else{a.returnValue=false;a.cancelBubble=true}},findElement:function(a,b){for(a=Event.element(a);a.parentNode&&(!a.tagName||a.tagName.toUpperCase()!=b.toUpperCase());)a=a.parentNode;return a},observers:false,_observeAndCache:function(a,b,c,d){if(!this.observers)this.observers=[];if(a.addEventListener){this.observers.push([a,b,c,d]);a.addEventListener(b,c,d)}else if(a.attachEvent){this.observers.push([a,
b,c,d]);a.attachEvent("on"+b,c)}},unloadCache:function(){if(Event.observers){for(var a=0,b=Event.observers.length;a<b;a++){Event.stopObserving.apply(this,Event.observers[a]);Event.observers[a][0]=null}Event.observers=false}},observe:function(a,b,c,d){a=$(a);d=d||false;if(b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||a.attachEvent))b="keydown";Event._observeAndCache(a,b,c,d)},stopObserving:function(a,b,c,d){a=$(a);d=d||false;if(b=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||
a.detachEvent))b="keydown";if(a.removeEventListener)a.removeEventListener(b,c,d);else if(a.detachEvent)try{a.detachEvent("on"+b,c)}catch(e){}}});navigator.appVersion.match(/\bMSIE\b/)&&Event.observe(window,"unload",Event.unloadCache,false);
var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(a){var b=0,c=0;do{b+=a.scrollTop||0;c+=a.scrollLeft||0;a=a.parentNode}while(a);return[c,b]},cumulativeOffset:function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;a=a.offsetParent}while(a);return[c,b]},positionedOffset:function(a){var b=
0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;if(a=a.offsetParent){if(a.tagName=="BODY")break;var d=Element.getStyle(a,"position");if(d=="relative"||d=="absolute")break}}while(a);return[c,b]},offsetParent:function(a){if(a.offsetParent)return a.offsetParent;if(a==document.body)return a;for(;(a=a.parentNode)&&a!=document.body;)if(Element.getStyle(a,"position")!="static")return a;return document.body},within:function(a,b,c){if(this.includeScrollOffsets)return this.withinIncludingScrolloffsets(a,b,c);
this.xcomp=b;this.ycomp=c;this.offset=this.cumulativeOffset(a);return c>=this.offset[1]&&c<this.offset[1]+a.offsetHeight&&b>=this.offset[0]&&b<this.offset[0]+a.offsetWidth},withinIncludingScrolloffsets:function(a,b,c){var d=this.realOffset(a);this.xcomp=b+d[0]-this.deltaX;this.ycomp=c+d[1]-this.deltaY;this.offset=this.cumulativeOffset(a);return this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+a.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+a.offsetWidth},overlap:function(a,
b){if(!a)return 0;if(a=="vertical")return(this.offset[1]+b.offsetHeight-this.ycomp)/b.offsetHeight;if(a=="horizontal")return(this.offset[0]+b.offsetWidth-this.xcomp)/b.offsetWidth},page:function(a){var b=0,c=0,d=a;do{b+=d.offsetTop||0;c+=d.offsetLeft||0;if(d.offsetParent==document.body)if(Element.getStyle(d,"position")=="absolute")break}while(d=d.offsetParent);d=a;do if(!window.opera||d.tagName=="BODY"){b-=d.scrollTop||0;c-=d.scrollLeft||0}while(d=d.parentNode);return[c,b]},clone:function(a,b,c){c=
Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},c||{});a=$(a);var d=Position.page(a);b=$(b);var e=[0,0],f=null;if(Element.getStyle(b,"position")=="absolute"){f=Position.offsetParent(b);e=Position.page(f)}if(f==document.body){e[0]-=document.body.offsetLeft;e[1]-=document.body.offsetTop}if(c.setLeft)b.style.left=d[0]-e[0]+c.offsetLeft+"px";if(c.setTop)b.style.top=d[1]-e[1]+c.offsetTop+"px";if(c.setWidth)b.style.width=a.offsetWidth+"px";if(c.setHeight)b.style.height=
a.offsetHeight+"px"},absolutize:function(a){a=$(a);if(a.style.position!="absolute"){Position.prepare();var b=Position.positionedOffset(a),c=b[1];b=b[0];var d=a.clientWidth,e=a.clientHeight;a._originalLeft=b-parseFloat(a.style.left||0);a._originalTop=c-parseFloat(a.style.top||0);a._originalWidth=a.style.width;a._originalHeight=a.style.height;a.style.position="absolute";a.style.top=c+"px";a.style.left=b+"px";a.style.width=d+"px";a.style.height=e+"px"}},relativize:function(a){a=$(a);if(a.style.position!=
"relative"){Position.prepare();a.style.position="relative";var b=parseFloat(a.style.top||0)-(a._originalTop||0),c=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=b+"px";a.style.left=c+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth}}};
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))Position.cumulativeOffset=function(a){var b=0,c=0;do{b+=a.offsetTop||0;c+=a.offsetLeft||0;if(a.offsetParent==document.body)if(Element.getStyle(a,"position")=="absolute")break;a=a.offsetParent}while(a);return[c,b]};Element.addMethods();var ProductImages={},ProductImagesPosition={};function del_Toggle(a){try{var b=document.getElementById(a);b.style.display=b.style.display=="none"?"inline":"none"}catch(c){window.status=c}}function popup(a){Popfenster=window.open(a,"Pop","width=600,height=400,resizable=no,scrollbars=no");Popfenster.focus()}function popup2(a){Pop2fenster=window.open(a,"Pop2","width=400,height=600,resizable=no,scrollbars=no");Pop2fenster.focus()}
function popupklein(a){Popfenster=window.open(a,"Popklein","width=357,height=230,resizable=no,scrollbars=no");Popfenster.focus()}var CartInfo=true;
function CartAdd(a,b){$("wkb_load").show();var c=document.getElementById("color_option"),d=document.getElementById("color_option_id");if(d!=null&&c!=null){c=c.value;d=d.value}else d=c=0;new Ajax.Updater({success:"cart",failure:"notice"},"/ajax/cart.ajax.php",{method:"post",parameters:{PHPSESSID:SID,product:a,quantity:b,color_option_id:d,color_option:c},evalScripts:true,onSuccess:function(e){$("wkb_load").hide();$("wkb_link").show();if(typeof pageTracker=="object"){e=$("name_"+a).value;pageTracker._trackPageview("/wkb/"+
e)}CartInfo&&ShowMsgBar("Der Artikel wurde in den Warenkorb gelegt",true)},onFailure:function(){alert("Der Artikel konnte nicht hinzugef\ufffdgt werden!")}});return false}function NLAbo(){$("newsletter_response").update('<div align="center" style="font:normal 10px Verdana;color:#cccccc;">Bitte warten - please wait</div>');new Ajax.Updater("newsletter_response","/ajax/newsletter.ajax.php",{method:"get",parameters:{email:$("nl_email").value,PHPSESSID:SID}});return false}
function PerformLogin(){$("LoginBox").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("LoginBox","/login.ajax.php?PHPSESSID="+SID,{method:"post",parametrs:{email_address:$("fld_user").value,password:$("fld_pass").value}})}
function TogglePaymentType(a){if(a.id=="cc_payment")new Effect.SlideDown("container_cc_payment",{duration:0.5});else $("container_cc_payment").visible()&&new Effect.SlideUp("container_cc_payment",{duration:0.5})}
function ShowCvvInfo(){if($("cvv_info_data").style.visibility=="hidden")$("cvv_info_data").style.visibility="visible";$("cvv_info_data").visible()||new Effect.SlideDown("cvv_info_data");$("cvv_info_data").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("cvv_info_data","/cvv",{method:"get"})}
function UpdateImgBox(a,b){$("img_box").update('<div align="center" style="padding:10px;"><img src="/images/loading.gif" border="0" alt="...loading" /></div>');new Ajax.Updater("img_box","/ajax/imgbox.ajax.php",{method:"get",parameters:{pID:a,imgID:b},onComplete:initLightbox})}
function WriteProductReview(a){$("product_review_area").update('<div align="center" style="padding:10px;"><img src="/images/loading.gif" border="0" alt="...loading" /></div>');new Ajax.Updater("product_review_area","/ajax/review.ajax.php",{method:"get",parameters:{products_id:a}})}
function SubmitProductReview(a){if($("review_ta").value.length>2&&($("rating_1").checked||$("rating_2").checked||$("rating_3").checked||$("rating_4").checked||$("rating_5").checked)){var b=0;if($("rating_1").checked)b=1;if($("rating_2").checked)b=2;if($("rating_3").checked)b=3;if($("rating_4").checked)b=4;if($("rating_5").checked)b=5;var c=$("review_ta").value,d=$("hide_author").checked?"true":"false",s=$('ipt_review_summery').value;$("product_review_area").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');
new Ajax.Updater("product_review_area","/ajax/review.ajax.php",{method:"post",parameters:{products_id:a,review_ta:c,review_summery:s,rating:b,action:"process",hide_author:d}})}else alert("Bitte geben Sie Ihre Meinung ab!")}
function WriteProductSuggestion(a){$("product_suggestion_area").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("product_suggestion_area","/ajax/suggestion.ajax.php",{method:"get",parameters:{product_id:a}})}
function SubmitProductSuggestion(){var a=$("product_id").value,b=$("sender_name").value,c=$("sender_email").value,d=$("recipient_name").value,e=$("recipient_email").value,f=$("subject").value,g=$("message").value;if(b.length>2&&c.length>2&&d.length>2&&e.length>2&&f.length>2&&g.length>2){$("product_suggestion_area").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("product_suggestion_area","/ajax/suggestion.ajax.php",
{method:"post",parameters:{product_id:a,sender_name:b,sender_email:c,recipient_name:d,recipient_email:e,subject:f,message:g,action:"send"}})}else alert("Bitte f\ufffdllen Sie alle Felder aus!")}function ShowHumidor(a){$("humidor_area").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("humidor_area","/ajax/humidor.ajax.php",{method:"get",parameters:{products_id:a,action:"add"}})}
function RemoveHumidor(a){$("humidor_area").update('<div align="center" style="padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /></div>');new Ajax.Updater("humidor_area","/ajax/humidor.ajax.php",{method:"get",parameters:{products_id:a,action:"remove"}})}
function RateProduct(a,b,c){$(c).update('<div align="center" style="font:normal 10px Verdana;">RATING...</div>');new Ajax.Updater(c,"/ajax/humidor.ajax.php",{method:"get",parameters:{rate_products_id:b,rating:a}})}
function doSearch(a){var b=$("ipt_search_str").value,c=$("select_search_length").value,d=$("select_search_length_opt").value,e=$("select_search_diameter").value,f=$("select_search_diameter_opt").value,g=$("select_search_strongness").value,j=$("select_search_aroma").value,k=$("select_search_brand").value,l=$("select_search_format").value,n=1;if(b.length<2&&c==-1&&e==-1&&g==0&&j==0&&k<1&&l<1){$("search_result").update('<div align="center" style="font:normal 10px Verdana;padding:10px;"><br/>Bitte geben Sie einen Suchbegriff ein oder w&auml;hlen Sie eine Eigenschaft.<br/></div>');
return false}$("search_result").update('<div align="center" style="font:normal 10px Verdana;padding:10px;"><img src="https://shop.casadelhabano.de/global/images/loading.gif" border=0 /><br/>SUCHE ...</div>');new Ajax.Updater("search_result","/ajax/isearch.ajax.php",{method:"post",parameters:{search_str:b,search_length:c,search_length_opt:d,search_diameter:e,search_diameter_opt:f,search_description:n,search_strongness:g,search_aroma:j,search_brand:k,search_format:l,search_position:a}});return false}
function autocomplete(a){if(!a)a=window.event;if(a.which)kcode=a.which;else if(a.keyCode)kcode=a.keyCode;if(kcode<49)return acs(a);$("isearch_ac").hide();a=$("ipt_search_str").value;new Ajax.Updater("isearch_ac","/ajax/autocomplete.ajax.php",{method:"get",parameters:{search_str:a},onComplete:function(b){$("isearch_ac").show()}})}
function acs(a){if(!a)a=window.event;if(a.which)kcode=a.which;else if(a.keyCode)kcode=a.keyCode;if($("isearch_ac").style.display!="none"){a=$("acsc").childNodes;if(kcode==38)for(a=$("acsc").firstChild;a!=null;){if(a.nodeType==1&&a.className=="sel"){$("acsc").scrollTop-=18;a.className="unsel";for(a=a.previousSibling;a!=null;){if(a.nodeType==1){a.className="sel";$("ipt_search_str").value=a.title;return}a=a.previousSibling}return}a=a.nextSibling}else if(kcode==40){for(a=$("acsc").firstChild;a!=null;){if(a.nodeType==
1&&a.className=="sel"){$("acsc").scrollTop+=18;a.className="unsel";for(a=a.nextSibling;a!=null;){if(a.nodeType==1){a.className="sel";$("ipt_search_str").value=a.title;return}a=a.nextSibling}return}a=a.nextSibling}for(a=$("acsc").firstChild;a!=null;){if(a.nodeType==1){a.className="sel";$("ipt_search_str").value=a.title;return}a=a.nextSibling}}}return true}function SelectKeyWord(a,b){$("ipt_search_str").value=a;b&&$("isearch_ac").hide()}
function LoadProductInfo(a){document.location.href="/shop.go/P"+a;return true}
function ToggleSearchBox(){if($("search_container").visible()){$("s_minmax").src="https://shop.casadelhabano.de/global/images/maximized.png";$("s_minmax").title="show";$("search_container").hide();new Ajax.Request("/ajax/settings.ajax.php",{method:"post",parameters:{key:"search_box_visible",val:"false"},onSuccess:function(a){}})}else{$("s_minmax").src="https://shop.casadelhabano.de/global/images/minimized.png";$("s_minmax").title="hide";$("search_container").show();new Ajax.Request("/ajax/settings.ajax.php",
{method:"post",parameters:{key:"search_box_visible",val:"true"},onSuccess:function(a){}})}}function ShowTopProducts(a,b){new Ajax.Updater("top_products","/ajax/products.ajax.php",{method:"post",parameters:{position:a,cats:b}})}var LoginBoxFixed=false;function setZoom(a,b,c,d,e,f,g){setTimeout(function(){if(a.dir==b){a.style.width=c;a.style.height=d;a.style.margin=e;a.style.zIndex=f;a.parentNode.parentNode.style.zIndex=f}},g)}
function larger(a,b,c){a.dir="rtl";now=parseInt(a.style.zIndex);for(i=now+1;i<=10;i++){w=b*(10+i)/20+"px";h=c*(10+i)/20+"px";m=-i+"px 0 0 "+-b*i/40+"px";setZoom(a,"rtl",w,h,m,i,20*(i-now))}}function smaller(a,b,c){a.dir="ltr";now=parseInt(a.style.zIndex);for(i=now-1;i>=0;i--){w=b*(10+i)/20+"px";h=c*(10+i)/20+"px";m=-i+"px 0 0 "+-b*i/40+"px";setZoom(a,"ltr",w,h,m,i,20*(now-i))}}
function PostIt(a,b){b="";new Ajax.Request("/ajax/postit.ajax.php?PHPSESSID="+SID,{method:"post",parameters:{pid:a,notice:b},onSuccess:function(c){alert(c.responseText)}})}
function ProductImageMoveNext(a){var b="P"+String(a);if(ProductImages[b]!=null&&ProductImagesPosition[b]!=null){var c=ProductImagesPosition[b],d=ProductImages[b][c][0],e=ProductImages[b][c][1];$("pimg_"+a).style.backgroundImage="url("+d+")";$("pimgbig_"+a).href=e;c+=1;if(c>=ProductImages[b].length)c=0;ProductImagesPosition[b]=c}}
function UpdateNewsletterStatus(){if($("NL_Status").checked)new Ajax.Request("/ajax/updatenls.ajax.php",{method:"post",parameters:{status:"true"},onSuccess:function(a){if(a.responseText=="1")alert("Der Newsletter wurde abonniert!");else $("NL_Status").checked=false}});else new Ajax.Request("/ajax/updatenls.ajax.php",{method:"post",parameters:{status:"false"},onSuccess:function(a){if(a.responseText=="0")alert("Der Newsletter wurde abbestellt!");else $("NL_Status").checked=true}});return false}
function CheckTextField(a){var b=$(a).value.length;b>2&&b<64?Effect.Appear("img_"+a,"{duration: 0.5}"):Effect.Fade("img_"+a,"{duration: 0.5}")}function CheckPassField(a){var b=$(a).value.length;b>5&&b<64?Effect.Appear("img_"+a,"{duration: 0.5}"):Effect.Fade("img_"+a,"{duration: 0.5}")}function CheckConfirmField(a,b){var c=$(b).value.length;c>5&&c<64&&$(a).value==$(b).value?Effect.Appear("img_"+b,"{duration: 0.5}"):Effect.Fade("img_"+b,"{duration: 0.5}")}
function CheckDoBField(a){var b=false,c=false;c=$(a).value;if(typeof RegExp=="function"){var d=/abc/;if(d.test("abc")==true)b=true}if(b==true){reg=/^([0-9]{2})(\.)([0-9]{2})(\.)([0-9]{4})$/;c=reg.test(c)}else c=c.lastIndexOf(".")==2&&c.lastIndexOf(".")==5;c?Effect.Appear("img_"+a,"{duration: 0.5}"):Effect.Fade("img_"+a,"{duration: 0.5}")}
function CheckEmailField(a){var b=false,c=false;c=$(a).value;if(typeof RegExp=="function"){var d=/abc/;if(d.test("abc")==true)b=true}if(b==true){reg=/^([a-zA-Z0-9\-\.\_]+)(\@)([a-zA-Z0-9\-\.]+)(\.)([a-zA-Z]{2,4})$/;c=reg.test(c)}else c=c.search("@")>=1&&c.lastIndexOf(".")>c.search("@")&&c.lastIndexOf(".")>=c.length-5;c?Effect.Appear("img_"+a,"{duration: 0.5}"):Effect.Fade("img_"+a,"{duration: 0.5}")}
function SelectAddress(a,b,c){$(a+"_selected_address").update(c.innerHTML);$(a).value=b;$(a+"_addresses").hide();new Ajax.Request("/ajax/checkout.ajax.php",{method:"post",parameters:{cmd:a,arg:b}})}function check_form(){return true}
function ShowMsgBar(a,b){var c=0;if(document.body&&document.body.scrollTop)c=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)c=document.documentElement.scrollTop;$("msg_bar").setAttribute("style","top:"+c+"px;display:block;");if(a)$("msg_bar_content").innerHTML=a;b&&window.setTimeout("HideMsgBar()",5E3)}function HideMsgBar(){Effect.Fade("msg_bar","{duration: 0.5}")}
function FeedBackForm(){ShowOverlay("_msgbox_");$("msgbox-content").innerHTML="<div align='center' style='padding:100px;'><img src='/images/loading.gif' border='0' alt='...' /></div>";new Ajax.Updater("msgbox-content","/ajax/feedback.ajax.php",{method:"post",parameters:{form:""}})}function HideOverlay(a){Element.hide(a);Element.hide("_overlay_")}
function ShowOverlay(a){var b=getPageSize(),c=getPageScroll();c=c[1]+b[3]/10;var d=b[2]/2-250;Element.setHeight("_overlay_",b[1]);Element.show("_overlay_");Element.setTop(a,c);Element.setLeft(a,d);Element.show(a)};var fileLoadingImage="/images/loading.gif",fileBottomNavCloseImage="/images/icons/close.gif",resizeSpeed=9,borderSize=10,imageArray=[],activeImage;if(resizeSpeed>10)resizeSpeed=10;if(resizeSpeed<1)resizeSpeed=1;resizeDuration=(11-resizeSpeed)*0.15;
Object.extend(Element,{getWidth:function(a){a=$(a);return a.offsetWidth},setWidth:function(a,b){a=$(a);a.style.width=b+"px"},setHeight:function(a,b){a=$(a);a.style.height=b+"px"},setLeft:function(a,b){a=$(a);a.style.left=b+"px"},setTop:function(a,b){a=$(a);a.style.top=b+"px"},setSrc:function(a,b){a=$(a);a.src=b},setHref:function(a,b){a=$(a);a.href=b},setInnerHTML:function(a,b){a=$(a);a.innerHTML=b}});
Array.prototype.removeDuplicates=function(){for(i=1;i<this.length;i++)this[i][0]==this[i-1][0]&&this.splice(i,1)};Array.prototype.empty=function(){for(i=0;i<=this.length;i++)this.shift()};var Lightbox=Class.create();
Lightbox.prototype={initialize:function(){if(document.getElementsByTagName){for(var a=document.getElementsByTagName("a"),b=0;b<a.length;b++){var c=a[b],d=String(c.getAttribute("rel"));if(c.getAttribute("href")&&d.toLowerCase().match("lightbox"))c.onclick=function(){myLightbox.start(this);return false}}b=document.getElementsByTagName("body").item(0);a=document.createElement("div");a.setAttribute("id","overlay");a.style.display="none";a.onclick=function(){myLightbox.end();return false};b.appendChild(a);
a=document.createElement("div");a.setAttribute("id","lightbox");a.style.display="none";b.appendChild(a);c=document.createElement("div");c.setAttribute("id","outerImageContainer");a.appendChild(c);b=document.createElement("div");b.setAttribute("id","imageContainer");c.appendChild(b);c=document.createElement("img");c.setAttribute("id","lightboxImage");b.appendChild(c);c=document.createElement("div");c.setAttribute("id","hoverNav");b.appendChild(c);d=document.createElement("a");d.setAttribute("id","prevLink");
d.setAttribute("href","#");c.appendChild(d);d=document.createElement("a");d.setAttribute("id","nextLink");d.setAttribute("href","#");c.appendChild(d);c=document.createElement("div");c.setAttribute("id","loading");b.appendChild(c);b=document.createElement("a");b.setAttribute("id","loadingLink");b.setAttribute("href","#");b.onclick=function(){myLightbox.end();return false};c.appendChild(b);c=document.createElement("img");c.setAttribute("src",fileLoadingImage);b.appendChild(c);b=document.createElement("div");
b.setAttribute("id","imageDataContainer");b.className="clearfix";a.appendChild(b);a=document.createElement("div");a.setAttribute("id","imageData");b.appendChild(a);b=document.createElement("div");b.setAttribute("id","imageDetails");a.appendChild(b);c=document.createElement("span");c.setAttribute("id","caption");b.appendChild(c);c=document.createElement("span");c.setAttribute("id","numberDisplay");b.appendChild(c);b=document.createElement("div");b.setAttribute("id","bottomNav");a.appendChild(b);a=
document.createElement("a");a.setAttribute("id","bottomNavClose");a.setAttribute("href","#");a.onclick=function(){myLightbox.end();return false};b.appendChild(a);b=document.createElement("img");b.setAttribute("src",fileBottomNavCloseImage);a.appendChild(b)}},start:function(a){hideSelectBoxes();hideFlashMovies();var b=getPageSize();Element.setHeight("overlay",b[1]);new Effect.Appear("overlay",{duration:0.2,from:0,to:0.8});imageArray=[];imageNum=0;if(document.getElementsByTagName){b=document.getElementsByTagName("a");
if(a.getAttribute("rel")=="lightbox")imageArray.push(new Array(a.getAttribute("href"),a.getAttribute("title")));else{for(var c=0;c<b.length;c++){var d=b[c];d.getAttribute("href")&&d.getAttribute("rel")==a.getAttribute("rel")&&imageArray.push(new Array(d.getAttribute("href"),d.getAttribute("title")))}for(imageArray.removeDuplicates();imageArray[imageNum][0]!=a.getAttribute("href");)imageNum++}b=getPageSize();a=getPageScroll();a=a[1]+b[3]/15;Element.setTop("lightbox",a);Element.show("lightbox");this.changeImage(imageNum)}},
changeImage:function(a){activeImage=a;Element.show("loading");Element.hide("lightboxImage");Element.hide("hoverNav");Element.hide("prevLink");Element.hide("nextLink");Element.hide("imageDataContainer");Element.hide("numberDisplay");imgPreloader=new Image;imgPreloader.onload=function(){Element.setSrc("lightboxImage",imageArray[activeImage][0]);myLightbox.resizeImageContainer(imgPreloader.width,imgPreloader.height)};imgPreloader.src=imageArray[activeImage][0]},resizeImageContainer:function(a,b){this.wCur=
Element.getWidth("outerImageContainer");this.hCur=Element.getHeight("outerImageContainer");this.xScale=(a+borderSize*2)/this.wCur*100;this.yScale=(b+borderSize*2)/this.hCur*100;wDiff=this.wCur-borderSize*2-a;hDiff=this.hCur-borderSize*2-b;hDiff!=0&&new Effect.Scale("outerImageContainer",this.yScale,{scaleX:false,duration:resizeDuration,queue:"front"});wDiff!=0&&new Effect.Scale("outerImageContainer",this.xScale,{scaleY:false,delay:resizeDuration,duration:resizeDuration});if(hDiff==0&&wDiff==0)navigator.appVersion.indexOf("MSIE")!=
-1?pause(250):pause(100);Element.setHeight("prevLink",b);Element.setHeight("nextLink",b);Element.setWidth("imageDataContainer",a+borderSize*2);this.showImage()},showImage:function(){Element.hide("loading");new Effect.Appear("lightboxImage",{duration:0.5,queue:"end",afterFinish:function(){myLightbox.updateDetails()}});this.preloadNeighborImages()},updateDetails:function(){Element.show("caption");Element.setInnerHTML("caption",imageArray[activeImage][1]);if(imageArray.length>1){Element.show("numberDisplay");
Element.setInnerHTML("numberDisplay","Bild "+eval(activeImage+1)+" von "+imageArray.length)}new Effect.Parallel([new Effect.SlideDown("imageDataContainer",{sync:true,duration:resizeDuration+0.25,from:0,to:1}),new Effect.Appear("imageDataContainer",{sync:true,duration:1})],{duration:0.65,afterFinish:function(){myLightbox.updateNav()}})},updateNav:function(){Element.show("hoverNav");if(activeImage!=0){Element.show("prevLink");document.getElementById("prevLink").onclick=function(){myLightbox.changeImage(activeImage-
1);return false}}if(activeImage!=imageArray.length-1){Element.show("nextLink");document.getElementById("nextLink").onclick=function(){myLightbox.changeImage(activeImage+1);return false}}this.enableKeyboardNav()},enableKeyboardNav:function(){document.onkeydown=this.keyboardAction},disableKeyboardNav:function(){document.onkeydown=""},keyboardAction:function(a){keycode=a==null?event.keyCode:a.which;key=String.fromCharCode(keycode).toLowerCase();if(key=="x"||key=="o"||key=="c")myLightbox.end();else if(key==
"p"){if(activeImage!=0){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage-1)}}else if(key=="n")if(activeImage!=imageArray.length-1){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage+1)}},preloadNeighborImages:function(){if(imageArray.length-1>activeImage){preloadNextImage=new Image;preloadNextImage.src=imageArray[activeImage+1][0]}if(activeImage>0){preloadPrevImage=new Image;preloadPrevImage.src=imageArray[activeImage-1][0]}},end:function(){this.disableKeyboardNav();
Element.hide("lightbox");new Effect.Fade("overlay",{duration:0.2});showSelectBoxes();showFlashMovies()}};function getPageScroll(){var a;if(self.pageYOffset)a=self.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;else if(document.body)a=document.body.scrollTop;return arrayPageScroll=new Array("",a)}
function getPageSize(){var a,b;if(window.innerHeight&&window.scrollMaxY){a=document.body.scrollWidth;b=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;b=document.body.scrollHeight}else{a=document.body.offsetWidth;b=document.body.offsetHeight}var c,d;if(self.innerHeight){c=self.innerWidth;d=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;d=
document.documentElement.clientHeight}else if(document.body){c=document.body.clientWidth;d=document.body.clientHeight}pageHeight=b<d?d:b;pageWidth=a<c?c:a;return arrayPageSize=new Array(pageWidth,pageHeight,c,d)}function getKey(a){keycode=a==null?event.keyCode:a.which;key=String.fromCharCode(keycode).toLowerCase()}function listenKey(){document.onkeypress=getKey}
function showSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++)selects[i].style.visibility="visible"}function hideSelectBoxes(){selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++)selects[i].style.visibility="hidden"}
function showFlashMovies(){objects=document.getElementsByTagName("object");for(i=0;i!=objects.length;i++)if(objects[i].getAttribute("classid")=="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000")objects[i].style.visibility="visible"}function hideFlashMovies(){objects=document.getElementsByTagName("object");for(i=0;i!=objects.length;i++)if(objects[i].getAttribute("classid")=="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000")objects[i].style.visibility="hidden"}
function pause(a){var b=new Date;for(a=b.getTime()+a;1;){b=new Date;if(b.getTime()>a)return}}function initLightbox(){myLightbox=new Lightbox}Event.observe(window,"load",initLightbox,false);