var slideshowRoot=slideshow=slideElement=slideDurationParameter=slideAppear=slideFade=null;
var slideIndex=previousSlideIndex=slideDelay=slideDuration=0;
var expiryHandler=null;
var _zoomImage=(Prototype.Browser.IE&&!window.XMLHttpRequest)?"/icons/ie6zoom.png":"/icons/zoom.png";
var _zoomImageClass="zoom";
var _zoomImageSize=35;
var debugging=true;
var Cmsbox={version:"2.2",copyright:"(c) Copyright 2007-2010 cmsbox GmbH. All Rights Reserved.",setup:function(){},debug:function(c,b){if(!debugging){return true
}try{if(console){if(c){console.log(c)
}if(b){console.log(b)
}}}catch(a){alert(c+": "+b)
}return false
},crop:function(a){a=$(a);
var c=a.down("img");
var b=Position.cumulativeOffset(a);
if(c){a.observe("mousemove",function(e){var d=(Event.pointerX(e)-b[0])/a.offsetWidth;
var f=(Event.pointerY(e)-b[1])/a.offsetHeight;
c.style.left=-1*(c.offsetWidth-a.offsetWidth)*d+"px";
c.style.top=-1*(c.offsetHeight-a.offsetHeight)*f+"px"
}.bindAsEventListener(this))
}},zoom:function(a){var a=$(a);
if(a){Event.observe(a,"mouseover",function(c){var b=Event.element(c);
if(a){if(!a.hasClassName(_zoomImageClass)&&b&&(c.relatedTarget!=a)&&!(a.descendants().detect(function(d){return d==c.relatedTarget
}))){Cmsbox._zoomOn(a)
}}});
Event.observe(a,"mouseout",function(c){var b=Event.element(c);
if(a){if(a.hasClassName(_zoomImageClass)&&b&&(c.relatedTarget!=a)&&!(a.descendants().detect(function(d){return d==c.relatedTarget
}))){Cmsbox._zoomOff(a)
}}})
}},_zoomOn:function(c){var c=$(c);
if(!c){return false
}c.addClassName(_zoomImageClass);
var o=document.createElement("img");
if(Prototype.Browser.IE){Element.extend(o)
}var b=c.descendants().detect(function(r){return(/img/i.test(r.tagName))
});
var h=b?b.getDimensions().width:c.getDimensions().width;
var e=b?b.getDimensions().height:c.getDimensions().height;
var l=h<_zoomImageSize?h:_zoomImageSize;
var m=e<_zoomImageSize?e:_zoomImageSize;
var q=l<m?l:m;
var p=(/absolute/i.test(c.getStyle("position")));
var k=p?0:b.positionedOffset()[0];
var g=p?0:b.positionedOffset()[1];
var j=!p||(Prototype.Browser.IE&&!window.XMLHttpRequest);
var f=j?b.getDimensions().width:c.getDimensions().width;
var d=j?b.getDimensions().height:c.getDimensions().height;
var a=k+((f-q)*(1/2));
var n=g+((d-q)*(1/4));
o.setStyle({position:"absolute",display:"block",width:q+"px",height:q+"px",left:a+"px",top:n+"px"});
if(Prototype.Browser.IE&&!window.XMLHttpRequest){o.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=65)"
}o.src=_zoomImage;
o.addClassName(_zoomImageClass);
c.appendChild(o);
return true
},_zoomOff:function(a){var a=$(a);
if(!a){return false
}a.removeClassName(_zoomImageClass);
a.descendants().each(function(b){if(/img|div/i.test(b.tagName)&&b.hasClassName(_zoomImageClass)){a.removeChild(b)
}});
return true
},lightbox:function(d,a){d=$(d);
a=$(a);
var c=Position.pageBounds(),b=Position.windowBounds();
a.style.height=(c[1]>b[1]?c[1]:b[1])+"px";
d.style.marginTop=Position.windowOffset()[1]+"px";
$$("#desk input","#desk select","#desk textarea").each(function(e){if(Prototype.Browser.IE){e.style.visibility="hidden"
}e.disabled="true"
});
d.style.display=a.style.display="block"
},lightboxCloseHandler:function(b,a){document.onkeyup=function(c){if(c.keyCode==Event.KEY_ESC){window.location=b
}}.bindAsEventListener(this);
$(a).onclick=function(){window.location=b
}
},decode:function(d){var c=0;
var b="";
var l,j,g;
var k,h,f,e;
var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
d=d.replace(/[^A-Za-z0-9\+\/\=]/g,"");
do{k=a.indexOf(d.charAt(c++));
h=a.indexOf(d.charAt(c++));
f=a.indexOf(d.charAt(c++));
e=a.indexOf(d.charAt(c++));
l=(k<<2)|(h>>4);
j=((h&15)<<4)|(f>>2);
g=((f&3)<<6)|e;
b+=String.fromCharCode(l);
if(f!=64){b+=String.fromCharCode(j)
}if(e!=64){b+=String.fromCharCode(g)
}}while(c<d.length);
return b
},encode_utf8:function(a){a=a.replace(/\r\n/g,"\n");
var b="";
for(var e=0;
e<a.length;
e++){var d=a.charCodeAt(e);
if(d<128){b+=String.fromCharCode(d)
}else{if((d>127)&&(d<2048)){b+=String.fromCharCode((d>>6)|192);
b+=String.fromCharCode((d&63)|128)
}else{b+=String.fromCharCode((d>>12)|224);
b+=String.fromCharCode(((d>>6)&63)|128);
b+=String.fromCharCode((d&63)|128)
}}}return b
},decode_utf8:function(d){var b="";
var a=0;
var e=c1=c2=0;
while(a<d.length){e=d.charCodeAt(a);
if(e<128){b+=String.fromCharCode(e);
a++
}else{if((e>191)&&(e<224)){c2=d.charCodeAt(a+1);
b+=String.fromCharCode(((e&31)<<6)|(c2&63));
a+=2
}else{c2=d.charCodeAt(a+1);
c3=d.charCodeAt(a+2);
b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));
a+=3
}}}return b
},navigation:function(a){a=$(a);
if(a){a.observe("mouseover",function(b){a.childElements().select(function(c){return c.hasClassName("navi")
}).each(function(c){c.addClassName("hover");
c.removeClassName("cb-invisible")
})
}.bindAsEventListener(this));
a.observe("mouseout",function(b){a.childElements().select(function(c){return c.hasClassName("navi")
}).each(function(c){marked=c.descendants().detect(function(d){return d.hasClassName("mark")||d.hasClassName("grow")
});
if(!marked){c.removeClassName("hover");
c.addClassName("cb-invisible")
}})
}.bindAsEventListener(this));
return true
}return false
},fadeInOut:function(b,c,a){clicked=$(b);
if(!clicked){return false
}clicked=clicked.up();
if(!clicked){return false
}listContainer=$(c);
if(!listContainer){return false
}elementContainer=$(a);
if(!elementContainer){return false
}listChildren=listContainer.childElements();
elementChildren=elementContainer.childElements();
clickedIndex=listChildren.indexOf(clicked);
element=elementChildren[clickedIndex];
if(!element){return false
}closing=clicked.hasClassName("cb-selected");
listChildren.each(function(d){d.removeClassName("cb-selected")
});
elementChildren.each(function(d){d.style.display="none"
});
if(!closing){clicked.addClassName("cb-selected");
element.style.display="block"
}return true
},moveUp:function(a){var a=$(a);
if(!a){return false
}var b=a.previous();
if(!b){return false
}b.insert({before:a});
return true
},moveDown:function(a){var a=$(a);
if(!a){return false
}var b=a.next();
if(!b){return false
}b.insert({after:a});
return true
},slideshow:function(b,a,c){slideDelay=a;
slideDuration=c;
slideDurationParameter={duration:(slideDuration/1000)};
if(slideshow){clearTimeout(slideshow)
}slideElement=$(b);
if(slideElement){slideChildren=slideElement.childElements();
if(slideChildren){if(slideDelay){if(slideDelay>0){slideshow=setTimeout("Cmsbox._slideshow()",slideDelay+slideDuration+50);
return true
}}}}return false
},nextSlide:function(a){return Cmsbox._slide(a,slideIndex+1)
},previousSlide:function(a){return Cmsbox._slide(a,slideIndex-1)
},slide:function(b,a){return Cmsbox._slide(b,a)
},_slideshow:function(){previousSlideIndex=slideIndex;
slideIndex=(slideIndex+1>=slideChildren.length)?0:slideIndex+1;
if(slideDuration==0){slideChildren[slideIndex].style.display="block";
slideChildren[previousSlideIndex].style.display="none"
}else{slideAppear=Effect.Appear(slideChildren[slideIndex],slideDurationParameter);
slideFade=Effect.Fade(slideChildren[previousSlideIndex],slideDurationParameter)
}Cmsbox._slideLink(slideIndex);
slideshow=setTimeout("Cmsbox._slideshow();",slideDelay+slideDuration+10);
return true
},_slideLink:function(c){var e,b;
var a=$$("#"+slideElement.up().id+" div table tbody tr");
if(a){if(a.length>0){if(a[0]){e=a[0].childElements();
e.each(function(f){f.removeClassName("this")
});
if(e.length>c){b=e[c];
b.addClassName("this")
}}}if(b&&a.length>1){if(a[1]){e=a[1].childElements();
if(e&&e.length>0){var d=e[0];
d.innerHTML=b.innerHTML
}}}}},_slide:function(element,index){if(slideshow){clearTimeout(slideshow)
}if(slideAppear){slideAppear.cancel()
}if(slideFade){slideFade.cancel()
}slideElement=$(element);
slideshowRoot=slideElement.up();
slideLinkElement=$$("#"+slideshowRoot.id+" table tbody tr")[0];
if(slideElement&&slideLinkElement){slideChildren=slideElement.childElements();
if(slideChildren){slideChildren.each(function(each){each.style.opacity=null;
each.style.display="none";
/*@cc_on
					each.style.filter = 'alpha()';
					@*/
});
slideIndex=index;
if(index>=slideChildren.length){slideIndex=0
}else{if(index<0){slideIndex=slideChildren.length-1
}}slideChildren[slideIndex].style.display="block";
Cmsbox._slideLink(slideIndex);
if(slideDelay){if(slideDelay>0){slideshow=setTimeout("Cmsbox._slideshow()",slideDelay+slideDuration+50)
}}}}return false
},_loadableImage_id_values:null,_loadableImage_callback:null,registerImages:function(a,b){this._loadableImage_id_values=a;
this._loadableImage_callback=b;
this._loadableImage_callback()
},loadableImages:function(){var b=new Array();
for(var a in this._loadableImage_id_values){b.push(a)
}return b
},loadImages:function(h){var d;
if(h){for(var c=0;
c<h.length;
c++){var g=h[c];
if(g){var b=$(h[c]);
if(b){var a=this._loadableImage_id_values[g];
for(d in a){if(a[d]){if(d!="style"){b[d]=a[d]
}}}if(b.src&&(!(/glass.gif/i.test(b.src)))){b.removeClassName("cb-loading");
if(_loadedSlides){_loadedSlides[g]=true
}this._loadableImage_id_values[g]=null
}}}}}var f=new Object();
var e=0;
for(d in this._loadableImage_id_values){if(this._loadableImage_id_values[d]){f[d]=this._loadableImage_id_values[d];
e++
}}this._loadableImage_id_values=f;
if(e>0){setTimeout("Cmsbox._loadableImage_callback();",1000)
}},hybrid:function(){$$(".cb-hybrid").each(function(a){if(/button/i.test(a.tagName)){a.type="button"
}})
}};
Object.extend(Cmsbox,{plugins:function(){var a={};
for(i=0;
i<navigator.plugins.length;
i++){var c=description=null;
try{c=navigator.plugins[i].name
}catch(b){}try{description=navigator.plugins[i].description
}catch(b){}a[c]=description
}return Object.toJSON(a)
}});
var LazyRequest=Class.create();
LazyRequest.prototype={initialize:function(){this._initializeArguments(arguments);
this._element=$(this._lazyOptions.id);
this._interval=$(this._lazyOptions.frequency);
if(this._interval){new Form.Element.Observer(this._element.id,this._interval,this._update.bind(this))
}},_initializeArguments:function(a){this._url=a[0];
this._lazyOptions=a[1]
},_getParams:function(){var params={parameters:eval(this._lazyOptions.parameters)};
for(key in this._lazyOptions){if(!params[key]){params[key]=this._lazyOptions[key]
}}return params
}};
var LazyEvaluator=Class.create();
Object.extend(LazyEvaluator.prototype,LazyRequest.prototype);
Object.extend(LazyEvaluator.prototype,{_update:function(a,b){return new Ajax.Request(this._url,this._getParams())
}});
var LazyUpdater=Class.create();
Object.extend(LazyUpdater.prototype,LazyRequest.prototype);
Object.extend(LazyUpdater.prototype,{_initializeArguments:function(a){this._target=a[0];
this._url=a[1];
this._lazyOptions=a[2]
},_update:function(a,b){return new Ajax.Updater(this._target,this._url,this._getParams())
}});
Position.windowBounds=function(){var a=window.innerWidth||self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;
var b=window.innerHeight||self.innerHeigth||document.documentElement.clientHeight||document.body.clientHeight||0;
return[a,b]
};
Position.windowOffset=function(){var a=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
var b=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
return[a,b]
};
Position.pageBounds=function(){var a=document.body.scrollWidth||0;
var b=(window.innerHeight&&window.scrollMaxY?window.innerHeight+window.scrollMaxY:document.body.scrollHeight)||0;
return[a,b]
};
Object.extend(Element.Methods,{getPosition:function(element){var pos={x:0,y:0};
var obj=element;
do{pos.x+=obj.offsetLeft;
pos.y+=obj.offsetTop
}while(obj=obj.offsetParent);
/*@cc_on
			@if (@_jscript_version < 5.7)
				pos = { x:0, y:0 };
			@end
		@*/
return Object.toJSON(pos)
}});
Object.extend(Event,{isRightClick:function(a){return(((a.which)&&(a.which==3))||((a.button)&&(a.button==2)))
},isMiddleClick:function(a){return(((a.which)&&(a.which==4))||((a.button)&&(a.button==1)))
}});
Element.Methods.setStyle=function(a,c,b){a=$(a);
var e=a.style;
for(var d in c){if(d=="opacity"){a.setOpacity(c[d])
}else{e[(d=="float"||d=="cssFloat")?(e.styleFloat===undefined?"cssFloat":"styleFloat"):(b?d:d.camelize())]=c[d]
}}return a
};
Object.extend(Cmsbox,{menu:function(a){if(Prototype.Browser.IE){if(!window.XMLHttpRequest){a=$(a);
if(a){a.observe("mouseover",function(b){a.childElements().select(function(c){return c.tagName=="dd"|c.tagName=="DD"
}).each(function(c){c.addClassName("hover");
c.removeClassName("cb-invisible");
c.style.display="block"
})
}.bindAsEventListener(this));
a.observe("mouseout",function(b){a.childElements().select(function(c){return c.tagName=="dd"|c.tagName=="DD"
}).each(function(c){c.removeClassName("hover");
c.addClassName("cb-invisible");
c.style.display="none"
})
}.bindAsEventListener(this));
return true
}return false
}}return true
}});