
var VSK_VERSION='0.1.4';var VSK_I={name:null};if(window.opera){VSK_I.name='Opera';}else if(navigator.userAgent){var str=navigator.userAgent;if(str.indexOf("Firefox")!=-1){VSK_I.name='Firefox';}else if(str.indexOf("Netscape")!=-1){VSK_I.name='Netscape';}else if(str.indexOf("MSIE")!=-1){VSK_I.name='MSIE';}else if(str.indexOf("Gecko")!=-1){VSK_I.name='Mozilla';}}
function v(node){return new VSK_Node(node);}
function V(id){var n=document.getElementById(id);return(n?v(n):null);}
vsk_html_node=vsk_h=function(nodeName,className,parentNode,id){var n=document.createElement(nodeName);if(className)
n.className=className;if(parentNode){v(n).dock(parentNode);}
if(id)
n.id=id;return n;};vsk_txt_node=vsk_t=function(text,parentNode){var n=document.createTextNode(text);v(n).dock(parentNode);return n;};function vsk_get_mouse(e){if(e.pageX||e.pageY){vskX=e.pageX;vskY=e.pageY;}
else if(e.clientX||e.clientY){vskX=e.clientX+document.documentElement.scrollLeft;vskY=e.clientY+document.documentElement.scrollTop;}}
function vsk_rel_target(e){if(!e)
var e=event;return(e.relatedTarget?e.relatedTarget:(e.type=='mouseover'?e.fromElement:e.toElement));}
function pi(str){return parseInt(str);}
function in_array(arr,value){var i;for(i=0;i<arr.length;i++){if(arr[i]==value)
return true}
return false;}
function vsk_rand(min,max){return(Math.round(Math.random()*max)+min);}
function VSK_Node(node){this.control(node);}
VSK_Node.prototype.abs_x=function(Parent){if(!this.b)
return null;var n=this.b,x=0,o;while(n&&n.parentNode&&n.parentNode.style&&(!Parent||Parent!=n)){x+=n.offsetLeft;if(v(n).s.left==='')
n=n.offsetParent;else
n=n.parentNode;}
return x;};VSK_Node.prototype.abs_y=function(Parent){if(!this.b)
return null;var n=this.b,y=0;while(n&&n.parentNode&&n.parentNode.style&&(!Parent||Parent!=n)){y+=n.offsetTop;if(v(n).s.top==='')
n=n.offsetParent;else
n=n.parentNode;}
return y;};VSK_Node.prototype.clear=function(node){if(!this.b)
return;while(this.b.childNodes[0])
this.b.removeChild(this.b.childNodes[0]);if(node)
this.b.appendChild(node);return this;};VSK_Node.prototype.control=function(node){if(!node)
return;this.b=node;this.s=node.style;return this;};VSK_Node.prototype.dock=function(toNode){if(this.b&&toNode){toNode.appendChild(this.b);this.vsk_event_fire('dock');}
return this;};VSK_Node.prototype.event_add=function(eventName,func){if(!this.b)
return;if(this.b.addEventListener)
this.b.addEventListener(eventName,func,false);else if(this.b.attachEvent)
this.b.attachEvent('on'+eventName,func);return this;};VSK_Node.prototype.fade=function(n){if(!this.s)
return;if(n>100)
var n=100;else if(n<1)
var n=1;this.s.filter='alpha(opacity='+n+')';this.s.opacity=n/100;this.s.MozOpacity=n/100;return this;};VSK_Node.prototype.h=function(o){if(!this.s)
return;return(this.s.height&&!o?pi(this.s.height):this.b.offsetHeight);};VSK_Node.prototype.has_parent=function(parentNode){var _p=this.b;if(!_p)return false;while((_p=_p.parentNode)){if(_p==parentNode)
return true;}
return false;};VSK_Node.prototype.hide=function(hide){if(this.s){this.s.visibility=(hide?'hidden':'');this.vsk_event_fire('hide');}
return this;};VSK_Node.prototype.html_append=function(){if(!this.b)
return;var i;for(i=0;i<arguments.length;i++){v(arguments[i]).dock(this.b);}
return this.b;};VSK_Node.prototype.html_a=VSK_Node.prototype.html_append;VSK_Node.prototype.html_insert_after=function(){if(!this.b||!this.b.parentNode)
return this;var i,node=this.b,p=this.b.parentNode;for(i=0;i<arguments.length;i++){if(node.nextSibling)
p.insertBefore(arguments[i],node.nextSibling);else
p.appendChild(arguments[i]);node=arguments[i];}
return this;};VSK_Node.prototype.html_ia=VSK_Node.prototype.html_insert_after;VSK_Node.prototype.html_insert_before=function(){if(!this.b||!this.b.parentNode)
return this;var i;for(i=0;i<arguments.length;i++)
this.b.parentNode.insertBefore(arguments[i],this.b);return this;};VSK_Node.prototype.html_ib=VSK_Node.prototype.html_insert_before;VSK_Node.prototype.move=function(x,y,x2,y2){if(!this.s)
return;if((isNaN(x2)||x2===null)&&!isNaN(x)&&x!==null)
this.s.left=x+'px';else if(!isNaN(x2)&&x2!==null)
this.s.right=x2+'px';if((isNaN(y2)||y2===null)&&!isNaN(y)&&y!==null)
this.s.top=y+'px';else if(!isNaN(y2)&&y2!==null)
this.s.bottom=y2+'px';this.vsk_event_fire('move');return this;};VSK_Node.prototype.resize=function(w,h){if(!this.s)
return;if(w)
this.s.width=w+'px';if(h)
this.s.height=h+'px';this.vsk_event_fire('resize');return this;};VSK_Node.prototype.set_pos=function(pos,zIndex){if(pos)
this.s.position=pos;if(!isNaN(zIndex))
this.s.zIndex=zIndex;return this;};VSK_Node.prototype.t=function(){if(!this.s||this.s.opacity==='')
return 100;return(this.s.opacity*100);};VSK_Node.prototype.trim=function(length,reverse){if(!this.b)
return;while(this.b.childNodes.length>length){if(!reverse)
v(this.b.firstChild).undock();else
v(this.b.lastChild).undock();}};VSK_Node.prototype.undock=function(){if(!this.b||!this.b.parentNode)
return this;this.b.parentNode.removeChild(this.b);this.vsk_event_fire('undock');return this;};VSK_Node.prototype.v=function(){if(!this.s)
return;return(this.s.visibility=='hidden'?false:true);};VSK_Node.prototype.vsk_event_add=function(name,func,id){if(!this.b)
return this;if(!this.b['vsk_on'+name])
this.b['vsk_on'+name]=new VegUIDynFunc();var F=this.b['vsk_on'+name];F.add(func,id);return this;};VSK_Node.prototype.vsk_event_fire=function(name){if(!this.b||!this.b['vsk_on'+name])
return this;this.b['vsk_on'+name].execute(this.b);return this;};VSK_Node.prototype.vsk_event_unset=function(name,id){if(!this.b||!this.b['vsk_on'+name])
return this;this.b['vsk_on'+name].free(id);return this;};VSK_Node.prototype.w=function(o){if(!this.s)
return;return(this.s.width&&!o?pi(this.s.width):this.b.offsetWidth);};VSK_Node.prototype.x=function(){if(!this.s)
return;return(this.s.left!==''?pi(this.s.left):this.b.offsetLeft);};VSK_Node.prototype.x2=function(){if(!this.s)
return;return(this.w()+this.x());};VSK_Node.prototype.y=function(){if(!this.s)
return;return(this.s.top!==''?pi(this.s.top):this.b.offsetTop);};VSK_Node.prototype.y2=function(){if(!this.s)
return;return this.h()+this.y();};VSK_Node.prototype.z=function(){if(!this.s)
return;return this.s.zIndex;};function VegUIDynFunc(returnVal){this.Funcs={_l:0,_p:function(fn){this[this._l]=fn;this._l++;}};this.returnVal=returnVal||false;this.add=function(fn,id){if(id){this.Funcs[id]=fn;}
else
this.Funcs._p(fn);};this.execute=function(argArr){var i,returnVal=this.returnVal;for(i in this.Funcs){if(typeof this.Funcs[i]!='function'||i=='_p')
continue;this.Funcs[i](argArr);}
return returnVal;};this.free=function(id){delete this.Funcs[id];};}
var vsk_fxInterval;var vsk_Effects=[];var VSK_FX_INTERVAL=25;function vsk_fx_poll(){var i,n;for(i=0;i<vsk_Effects.length;i++){v(vsk_Effects[i]).fx_process();}}
VSK_Node.prototype.fx_process=function(){if(!this.b||!this.b.vsk_effects)
return null;var i,e;for(i in this.b.vsk_effects){if(typeof this.b.vsk_effects[i].main=='function')
this.b.vsk_effects[i].main();}
return this;};VSK_Node.prototype.fx_clear=function(clearEffects){if(clearEffects&&clearEffects.length){var i;for(i=0;i<clearEffects.length;i++)
this.fx_halt(clearEffects[i],true);}};VSK_Node.prototype.fx_start=function(){this.fx_stop();vsk_fxInterval=setInterval(vsk_fx_poll,VSK_FX_INTERVAL);return this;};VSK_Node.prototype.fx_stop=function(){vsk_fxInterval=clearInterval(vsk_fxInterval);return this;};VSK_Node.prototype.fx_init=function(id,effect,collision){if(this.b){if(!this.b.vsk_effects)
this.b.vsk_effects={};this.b.vsk_effects[id]=effect;if(!in_array(vsk_Effects,this.b)){vsk_Effects.push(this.b);}
if(collision){var i=0;for(i=0;i<collision.length;i++)
this.fx_halt(collision[i]);}
this.fx_start();}
return this;};VSK_Node.prototype.fx_halt=function(id,silent){if(this.b&&this.b.vsk_effects&&this.b.vsk_effects[id]){var E=this.b.vsk_effects[id];delete this.b.vsk_effects[id];if(E.onhalt&&!silent)
E.onhalt(this);if(E.sequence&&!silent)
E.sequence.loop();if(E._onhalt&&!silent)
E._onhalt(this);}
return this;};VSK_Node.prototype.fx_active=function(id){if(!this.b||!this.b.vsk_effects)
return false;if(this.b.vsk_effects[id])
return true;return false;};function VSK_FX_Sequence(n){this.n=n;this.loopMax=0;this.loopCount=0;}
VSK_FX_Sequence.prototype.loop=function(n){if(typeof n!='undefined'){this.loopMax=n;this.loopCount=0;}
if(this.loopMax&&this.loopCount==this.loopMax)
return;else if(this.loopMax)
this.loopCount++;if(typeof this.body=='function'&&this.n)
this.body(this.n);};VSK_FX_Sequence.prototype.halt=function(clearEffects){this.n.fx_clear(clearEffects);};VSK_Node.prototype.fx_morph=function(w,h,x,y,t){if(!this.b)
return{};var N=this;var E={type_w:(w<this.w()),type_h:(h<this.h()),type_x:(x<this.x()),type_y:(y<this.y()),w:w,h:h,x:x,y:y,oW:this.w(),oH:this.h(),oX:this.x(),oY:this.y(),iW:0,iH:0,iX:0,iY:0,interval:(t/VSK_FX_INTERVAL),main:function(){this.iW+=(Math.abs(this.w-this.oW)/this.interval);this.iH+=(Math.abs(this.h-this.oH)/this.interval);var w=(N.w()==this.w);var h=(N.h()==this.h);var _iw=Math.floor(this.iW);var _ih=Math.floor(this.iH);if((!w&&this.iW>=1)||(!h&&this.iH>=1)){var _uw=(!w?(!this.type_w?N.w()+_iw:N.w()-_iw):null);var _uh=(!h?(!this.type_h?N.h()+_ih:N.h()-_ih):null);N.resize((_uw>-1?_uw:1),(_uh>-1?_uh:1));}
if(this.iW>=1)
this.iW=(this.iW-_iw);if(this.iH>=1)
this.iH=(this.iH-_ih);var _w=(!this.type_w?(N.w()>this.w):(N.w()<this.w));var _h=(!this.type_h?(N.h()>this.h):(N.h()<this.h));if(_w||_h){N.resize((_w?this.w:null),(_h?this.h:null));}
if(this.x!==null&&this.y!==null){this.iX+=(Math.abs(this.x-this.oX)/this.interval);this.iY+=(Math.abs(this.y-this.oY)/this.interval);var _ix=Math.floor(this.iX);var _iy=Math.floor(this.iY);var x=(N.x()==this.x);var y=(N.y()==this.y);if((!x&&this.iX>=1)||(!y&&this.iY>=1)){N.move((!x?(this.x>N.x()?N.x()+_ix:N.x()-_ix):null),(!y?(this.y>N.y()?N.y()+_iy:N.y()-_iy):null));}
if(this.iX>=1)
this.iX-=_ix;if(this.iY>=1)
this.iY-=_iy;var _x=(Math.abs(N.x()-this.x)<=(Math.abs(this.oX-this.x)/this.interval));var _y=(Math.abs(N.y()-this.y)<=(Math.abs(this.oY-this.y)/this.interval));if(_x||_y){N.move((_x?this.x:null),(_y?this.y:null));}}else{var x=true,y=true;}
if(w&&h&&x&&y)
N.fx_halt('morph');}};this.fx_init('morph',E);return E;};VSK_Node.prototype.fx_fade_in=function(n,limit){if(!this.b)
return;var N=this.b;var t=(100-this.t());if(!limit)
var limit=100;var E={main:function(){var interval=t/(n/VSK_FX_INTERVAL);if(v(N).t()<limit)
v(N).fade(v(N).t()+interval);else
v(N).fx_halt('fade_in');}};this.fx_init('fade_in',E,['fade_out']);return E;};VSK_Node.prototype.fx_fade_out=function(n,limit){if(!this.b)
return;var N=this.b;var t=this.t();if(!limit)
var limit=1;var E={main:function(){var interval=t/(n/VSK_FX_INTERVAL);if(v(N).t()>limit)
v(N).fade(v(N).t()-interval);else
v(N).fx_halt('fade_out');}};this.fx_init('fade_out',E,['fade_in']);return E;};VSK_Node.prototype.fx_shadow_adjust=function(){if(!this.b||!this.fx_active('shadow'))
return this;var E=this.b.vsk_effects['shadow'];var n=v(E.node);n.resize(this.w(1),this.h(1)).move(this.x()+E.oX,this.y()+E.oY);if(!n.b.parentNode){n.set_pos('absolute',this.s.zIndex-1);n.hide(1).dock(this.b.parentNode).hide(0);}
n.hide(this.v()^1);return this;};VSK_Node.prototype.fx_shadow=function(t,c,oX,oY){if(!this.b)
return{};var n=this.b;if(!this.s.zIndex)
this.s.zIndex=1;this.vsk_event_add('move',function(b){v(b).fx_shadow_adjust();});this.vsk_event_add('resize',function(b){v(b).fx_shadow_adjust();});this.vsk_event_add('undock',function(b){v(b).fx_halt('shadow');});this.vsk_event_add('hide',function(b){v(b).fx_shadow_adjust();});var E={oX:oX,oY:oY,t:t,c:c,node:vsk_h('div'),main:function(){},_onhalt:function(){v(this.node).undock();}};v(E.node).fade(t).s.backgroundColor=c;this.fx_init('shadow',E);this.fx_shadow_adjust();return E;};var VSK_MENU_TIMER=0;var VSK_MENU_CLOSE_TIME=200;function ddmnu_init(menus,nMarg,useFx,fxTime,shad,shadX,shadY,shadC,shadT){var i,m,O,o,n;for(i=0;i<menus.length;i++){if(!(m=V(menus[i])))
continue;m.s.visibility='hidden';m.s.display='inline';m.set_pos('absolute',1000);m.b.vskMenuFriends=menus;m.b.onmouseout=function(e){var m=v(this),rt=vsk_rel_target(e||event);if(v(rt).has_parent(m.b)||rt==this)
return;m.b.vskMenuFocus=false;if(this.vskParentMenu&&(rt==this.vskParentMenu.b||v(rt).has_parent(this.vskParentMenu.b)))
this.vskParentMenu.b.vskMenuFocus=true;if(this.vskOpenMenu&&(v(rt).has_parent(this.vskOpenMenu.b)||rt==this.vskOpenMenu.b))
return;VSK_MENU_TIMER=clearTimeout(VSK_MENU_TIMER);VSK_MENU_TIMER=setTimeout(function(){m.ddmenu_close()},VSK_MENU_CLOSE_TIME);};m.b.onmouseover=function(e){var m=v(this);m.b.vskMenuFocus=true;};m.b.vskUseFx=useFx;m.b.vskFxTime=fxTime;m.dock(document.body);if(shad){m.fx_shadow(shadT,shadC,shadX,shadY);}
O=m.b.getElementsByTagName('a');for(n=0;n<O.length;n++){o=v(O[n]),c=m.b.className;o.b.vskParentMenu=m;o.s.cursor='pointer';o.s.display='block';o.s.whiteSpace='nowrap';o.b.className=c+'_item';if(o.b.getAttribute('vsk_nested')){o.b.onmouseover=function(){this.className=c+'_item_hover';var M=this.getAttribute('vsk_nested');var y=v(this).y();var a=this.getAttribute('vsk_align')||'r';V(M).b.vskParentMenu=this.vskParentMenu;if(this.vskParentMenu.b.vskOpenMenu){if(this.vskParentMenu.b.vskOpenMenu.b!=V(M).b)
this.vskParentMenu.b.vskOpenMenu.ddmenu_close();else
return;}
if(a=='r')
this.vskParentMenu.ddmenu_open(M,'r',-nMarg,y);else
this.vskParentMenu.ddmenu_open(M,'l',nMarg,y);this.vskParentMenu.b.vskOpenMenu=V(M);}}else{o.b.onmouseover=function(){this.className=c+'_item_hover';};}
o.b.onmouseout=function(){this.className=c+'_item';};}}}
VSK_Node.prototype.ddmenu_open=function(id,align,x,y){var m=V(id);if(!m.b)
return this;if(m.fx_active('morph'))
return this;VSK_MENU_TIMER=clearTimeout(VSK_MENU_TIMER);if(!m.b.vskParentMenu&&m.b.vskMenuFriends){var i;for(i=0;i<m.b.vskMenuFriends.length;i++){if(i==id||V(m.b.vskMenuFriends[i]).b.vskParentMenu)
continue;V(m.b.vskMenuFriends[i]).ddmenu_close(1);}}
var par=m.b.vskParentMenu;while(par){if(!par.v())
return this;par=par.b.vskParentMenu;}
if(!x)
var x=0;if(!y)
var y=0;switch(align){case'b':m.move(this.abs_x()+x,this.abs_y()+this.h()+y);break;case'r':m.move(this.abs_x()+this.w()+x,this.abs_y()+y);break;case'l':m.move((this.abs_x()-m.w())+x,this.abs_y()+y);break;case't':m.move(this.abs_x()+x,(this.abs_y()-m.h())+y);break;}
m.s.visibility='visible';if(m.b.vskUseFx){if(m.b.vskUseFx=='fade'){m.fade(1).fx_fade_in(m.b.vskFxTime);}else if(m.b.vskUseFx=='morph'){m.s.overflow='hidden';m.s.padding='0px';var w=m.w(),h=m.h(),oX=m.x(),oY=m.y();m.resize(1,1).fx_morph(w,h,oX,oY,m.b.vskFxTime).onhalt=function(){m.s.height='';m.s.padding='';};}}
return this;};VSK_Node.prototype.ddmenu_close=function(force){VSK_MENU_TIMER=clearTimeout(VSK_MENU_TIMER);var m=this;while(m.b.vskOpenMenu)
m=m.b.vskOpenMenu;if(!m)
return this;while(m){if(m.b.vskMenuFocus&&!force)
break;m.hide(1);if((m=m.b.vskParentMenu))
m.b.vskOpenMenu=null;}
return this;};
var liveSearchReq=false;var t=null;var liveSearchLast="";var isIE=false;if(window.XMLHttpRequest){liveSearchReq=new XMLHttpRequest();}
function liveSearchInit(){if(navigator.userAgent.indexOf("Safari")>0){document.getElementById('ctl00_Schnellsuche1_tbSuche').addEventListener("keydown",liveSearchKeyPress,false);document.getElementById('ctl00_Schnellsuche1_tbSuche').addEventListener("click",liveSearchShow,false);}
else if(navigator.product=="Gecko"){document.getElementById('ctl00_Schnellsuche1_tbSuche').addEventListener("keypress",liveSearchKeyPress,false);document.getElementById('ctl00_Schnellsuche1_tbSuche').addEventListener("click",liveSearchShow,false);}
else{document.getElementById('ctl00_Schnellsuche1_tbSuche').attachEvent('onkeydown',liveSearchKeyPress);document.getElementById('ctl00_Schnellsuche1_tbSuche').attachEvent('onclick',liveSearchShow,false);isIE=true;}}
function liveSearchHideDelayed(){window.setTimeout("liveSearchHide()",200);}
function liveSearchHide(){document.getElementById("LSResult").style.display="none";document.getElementById("PrevImg").style.display="none";var highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id");}}
function liveSearchShow()
{if(document.forms.aspnetForm.ctl00$Schnellsuche1$tbSuche.value.length>0&&document.getElementById("LSHeader").innerHTML.indexOf('werden geladen')==-1)
document.getElementById("LSResult").style.display="block";}
function liveSearchKeyPress(event){var target=event.target?event.target:event.srcElement;var livesearchform=target.form;if(event.keyCode==40){highlight=document.getElementById("LSHighlight");if(!highlight){highlight=document.getElementById("LSShadow").firstChild.childNodes[1];}
else{highlight.removeAttribute("id");if(highlight==document.getElementById("LSShadow").firstChild.lastChild)
highlight=document.getElementById("LSShadow").firstChild.childNodes[1];else
highlight=highlight.nextSibling;}
if(highlight){highlight.setAttribute("id","LSHighlight");}
if(!isIE){event.preventDefault();}}
else if(event.keyCode==38){highlight=document.getElementById("LSHighlight");if(!highlight){highlight=document.getElementById("LSResult").firstChild.firstChild.lastChild.previousSibling;}
else{highlight.removeAttribute("id");if(highlight==document.getElementById("LSShadow").firstChild.childNodes[1])
highlight=document.getElementById("LSShadow").firstChild.lastChild;else
highlight=highlight.previousSibling;}
if(highlight){highlight.setAttribute("id","LSHighlight");}
if(!isIE){event.preventDefault();}}
else if(event.keyCode==27){highlight=document.getElementById("LSHighlight");if(highlight){highlight.removeAttribute("id");}
document.getElementById("LSResult").style.display="none";document.getElementById("PrevImg").style.display="none";}
else if(event.keyCode==8&&isIE){liveSearchStart();}
if(document.getElementById("LSHighlight")&&document.getElementById("LSResult").style.display!="none")
{window.status=highlight.firstChild.href;var start=highlight.firstChild.href.indexOf("__sca")+5;var ende=highlight.firstChild.href.indexOf(".aspx");ShowPreview("http://www.pianoladen.de/shop/wgimg.ashx?n="+highlight.firstChild.href.substring(start,ende),highlight);}}
function ShowPreview(image,element)
{document.getElementById("PrevImg").style.display="none";document.getElementById("PrevImg").style.top=(absTop(element)-27)+"px";document.getElementById("PrevImg").style.left=(absLeft(element)+250)+"px";document.getElementById("PrevImg").src=image;document.getElementById("PrevImg").style.display="block";}
function liveSearchStart(){if(t){window.clearTimeout(t);}
t=window.setTimeout("liveSearchDoSearch()",200);}
function createXMLHttpRequest(){var req=null;try{req=new ActiveXObject("MSXML2.XMLHTTP");}
catch(err_MSXML2){try{req=new ActiveXObject("Microsoft.XMLHTTP");}
catch(err_Microsoft){if(typeof XMLHttpRequest!="undefined")
req=new XMLHttpRequest;}}
return req;}
function liveSearchDoSearch(){if(typeof liveSearchRoot=="undefined"){liveSearchRoot="/";}
if(liveSearchLast!=document.forms.aspnetForm.ctl00$Schnellsuche1$tbSuche.value){if(liveSearchReq&&liveSearchReq.readyState<4){liveSearchReq.abort();}
if(document.forms.aspnetForm.ctl00$Schnellsuche1$tbSuche.value==""){liveSearchHide();liveSearchLast="";return false;}
liveSearchReq=createXMLHttpRequest();liveSearchReq.onreadystatechange=liveSearchProcessReqChange;liveSearchReq.open("GET",liveSearchRoot+"LiveSearchResult.ashx?q="+document.forms.aspnetForm.ctl00$Schnellsuche1$tbSuche.value);liveSearchLast=document.forms.aspnetForm.ctl00$Schnellsuche1$tbSuche.value;liveSearchReq.send(null);}}
function liveSearchProcessReqChange()
{switch(liveSearchReq.readyState){case 0:break;case 1:document.getElementById("ctl00_Schnellsuche1_btnSuche").style.visibility="hidden";document.getElementById("ctl00_Schnellsuche1_tbSuche").style.width="140px";document.getElementById("ctl00_Schnellsuche1_tbSuche").style.background="#F8FEC2 url(/App_Themes/mhk-design2009/images/loading.gif) no-repeat right center";break;case 2:break;case 3:break;case 4:document.getElementById("ctl00_Schnellsuche1_tbSuche").style.width="112px";document.getElementById("ctl00_Schnellsuche1_tbSuche").style.background="#F8FEC2 none";document.getElementById("ctl00_Schnellsuche1_btnSuche").style.visibility="visible";var res=document.getElementById("LSResult");if(liveSearchReq.responseText.length>0)
{var sh=document.getElementById("LSShadow");res.style.display="block";sh.innerHTML=liveSearchReq.responseText;}
else
res.style.display="none";break;default:;}}
function liveSearchSubmit(){var highlight=document.getElementById("LSHighlight");if(highlight&&highlight.firstChild)
{window.location=highlight.firstChild.href;return false;}
else{return true;}}
function absLeft(el)
{return(el.offsetParent)?el.offsetLeft+absLeft(el.offsetParent):el.offsetLeft;}
function absTop(el)
{return(el.offsetParent)?el.offsetTop+absTop(el.offsetParent):el.offsetTop;}
var CLupeObj=null;var CLHidden=0;var CLLoading=1;var CLZoomIn=2;var CLZoomed=3;var CLZoomOut=4;function CLupe()
{if(CLupeObj)return;this.DebugOn=false;this.EnableInitOnClick=false;this.EnableDblClick=true;this.BorderColor='black';this.BorderWidth=1;this.BaseZIndex=1;this.ZIndex=100;this.TimeSpan=500;this.TimerInterval=40;this.HideSmall=false;this.TimeModifyFunc=null;this.Enabled=true;this.VAlign='ToMiddle';this.HAlign='ToCenter';this.VMargin=0;this.HMargin=0;this.TargetOffsetX=0;this.TargetOffsetY=0;this.TargetElement='';this.LoadText='Lade...';this.ErrorText='Zoom-Fehler!';this.ErrMsg='';this.AddPosX=1;this.AddPosY=1;this.SmallPosX=0;this.SmallPosY=0;this.SmallWidth=0;this.SmallHeight=0;this.BigPosX=0;this.BigPosY=0;this.BigWidth=0;this.BigHeight=0;this.CurrVAlign=this.VAlign;this.CurrHAlign=this.HAlign;this.CurrTargetEle=null;this.CurrTargetOffX=0;this.CurrTargetOffY=0;this.StartTime=0;this.Timer=null;this.BigImgID=-1;this.SmallImg=null;this.WaitObj=null;this.ErrObj=null;this.ZoomImg=null;this.State=CLHidden;this.InitExecuted=false;this.PreloadExecuted=false;this.InitForced=false,this.HtmlWritten=false;this.DebugDisplayed=false;CLupeObj=this;}
function CLupeInit(){CLupeObj.Init(CLupeInit.arguments);}
function CLupePics(){CLupeObj.LoadPicsOnPageLoad(CLupePics.arguments);}
function CLupeDebug(){CLupeObj.DebugOn=true;}
function CLupeHTML(){CLupeObj.HTML();}
function CLupePreload(){CLupeObj.Preload(CLupePreload.arguments);}
function CLupePreloadList(aUrlList){CLupeObj.Preload(aUrlList);}
function CLupeZoom(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID){CLupeObj.Zoom(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID);}
function CLupeUnZoom(){CLupeObj.UnZoom();}
function CLupeEnable(){CLupeObj.Enable();}
function CLupeDisable(){CLupeObj.Disable();}
CLupe.prototype.Init=function(aImgUrlList){function AfterPageLoad(){me.CreateHtmlObjects();if(aImgUrlList.length>0)me.Preload(aImgUrlList);me.InitExecuted=true;}
if(this.InitExecuted)return;var me=this;xOnLoad(AfterPageLoad);}
CLupe.prototype.ForceInit=function(){if(this.InitExecuted)return;this.CreateHtmlObjects();this.InitExecuted=true;this.InitForced=true;}
CLupe.prototype.LoadPicsOnPageLoad=function(aImgUrlList){function AfterPageLoad(){if(aImgUrlList.length>0)me.Preload(aImgUrlList);}
var me=this;xOnLoad(AfterPageLoad);}
CLupe.prototype.Preload=function(aImgUrlList){IC.PreloadImages(aImgUrlList);this.PreloadExecuted=true;}
CLupe.prototype.Diagnose=function(){var ics=IC.GetStatus();var s='';if(this.ErrMsg!=''){s+='Errors:\n';s+=this.ErrMsg+'\n';}
if(!this.PreloadExecuted){s+='Warning: no images preloaded!\nUse CLupeInit or CLupePics to preload the zoom images.'
this.PreloadExecuted=true;}
if(s==''){if(ics!=''){s='CLupe Status: ok\nbut problems with some images detected.\ncheck url\'s in CLupeInit and CLupeZoom!';}}else{s='CLupe Status:\n\n'+s;}
if(ics!=''){s+='\n\nIC Status (Image Caching and Preload):\n'+ics+'\n'+IC.ErrorMsg;IC.ResetStatus();}
if(s!=''||!this.DebugDisplayed){if(s=='')s='CLupe Status: all fine!';alert(s);}
this.ErrMsg='';this.DebugDisplayed=true;}
CLupe.prototype.AddError=function(aMsg){this.ErrMsg+=aMsg+'\n';}
CLupe.prototype.CreateHtmlObjects=function()
{function OnClick(){me.UnZoom();}
function OnDblClick(){me.NewWindow();}
var me=this;var oImg=xCreateElement('img');if(!oImg||!oImg.style){this.AddError('CLupe.CreateHtmlObjects: creating CLupe HTML failed (xCreateElement)');return;}
oImg.id='ZoomPic';oImg.style.position='absolute';oImg.style.visibility='hidden';oImg.style.zIndex=this.ZIndex;if(this.BorderWidth>0){oImg.style.border=this.BorderWidth+'px solid '+this.BorderColor;}
oImg.onclick=OnClick;if(this.EnableDblClick)oImg.ondblclick=OnDblClick;var oDivWait=xCreateElement('div');var oDivError=xCreateElement('div');var oTextWait=xCreateTextNode(this.LoadText);var oTextError=xCreateTextNode(this.ErrorText);if(!oDivWait||!oDivError||!oTextWait||!oTextError){this.AddError('CLupe.CreateHtmlObjects: creating CLupe HTML failed (xCreateTextNode)');return;}
xAppendChild(oDivWait,oTextWait);xAppendChild(oDivError,oTextError);oDivWait.id='ZoomPicWait';oDivWait.style.position='absolute';oDivWait.style.visibility='hidden';oDivWait.style.zIndex=this.BaseZIndex+1;oDivWait.style.backgroundColor='white';oDivWait.style.color='black';oDivWait.style.padding='0 4px';oDivWait.style.fontSize='10pt';oDivWait.style.border='1px solid black';oDivError.id='ZoomPicError';oDivError.style.position='absolute';oDivError.style.visibility='hidden';oDivError.style.zIndex=this.BaseZIndex+1;oDivError.style.backgroundColor='white';oDivError.style.color='black';oDivError.style.padding='0 4px';oDivError.style.fontSize='10pt';oDivError.style.border='1px solid black';var oElements=xGetElementsByTagName('body');if(!oElements||oElements.length<1){this.AddError('CLupe.CreateHtmlObjects: creating CLupe HTML failed (no body tag found)');return;}
var oBody=oElements[0];if(!xHasChildNodes(oBody)){this.AddError('CLupe.CreateHtmlObjects: creating CLupe HTML failed (no html elements in body tag found)');return;}
oElements=xChildNodes(oBody);xInsertBefore(oBody,oDivError,oElements[0]);xInsertBefore(oBody,oDivWait,oDivError);xInsertBefore(oBody,oImg,oDivWait);this.WaitObj=oDivWait;this.ErrObj=oDivError;this.ZoomImg=oImg;this.HtmlWritten=true;}
CLupe.prototype.HTML=function()
{if(this.HtmlWritten)return;var s='<img id="ZoomPic" src="" style="position:absolute;visibility:hidden;z-index:'+this.ZIndex+';';if(this.BorderWidth>0)s+='border:'+this.BorderWidth+'px solid '+this.BorderColor+';';s+='" onclick="CLupeObj.UnZoom()" ondblclick="CLupeObj.NewWindow()">'
document.writeln(s);document.writeln('<div id="ZoomPicWait" '+'style="position:absolute;visibility:hidden;z-index:'+(this.BaseZIndex+1)+';background-color:white;color:black;padding:0 4px;font-size:10pt;border:1px solid black;">'+
this.LoadText+'</div>');document.writeln('<div id="ZoomPicError" '+'style="position:absolute;visibility:hidden;z-index:'+(this.BaseZIndex+1)+';background-color:white;color:black;padding:0 4px;font-size:10pt;border:1px solid black;">'+
this.ErrorText+'</div>');this.HtmlWritten=true;this.InitExecuted=true;}
CLupe.prototype.Zoom=function(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID)
{if(!this.InitExecuted){if(this.EnableInitOnClick){this.AddError('CLupeZoom: CLupe not initialized - forcing init now!\nCheck CLupeInit and ensure no onload is in body tag!');this.ForceInit();if(!this.HtmlWritten){this.AddError('CLupeZoom: forced Init failed, give up here.');return;}}else{if(this.DebugOn){this.AddError('CLupeZoom: CLupe not initialized!\nCheck CLupeInit and ensure no onload is in body tag\nor set CLupeObj.EnableInitOnClick = true;');this.Diagnose();}
return;}}
if(this.DebugOn)this.Diagnose();if(!this.Enabled)return;if(!this.WaitObj)this.WaitObj=xGetElementById('ZoomPicWait');if(!this.ErrObj)this.ErrObj=xGetElementById('ZoomPicError');if(!this.ZoomImg)this.ZoomImg=xGetElementById('ZoomPic');var bigImgID=IC.FindImage(aBigImgUrl);this.CurrVAlign=this.VAlign;this.CurrHAlign=this.HAlign;this.CurrTargetEle=null;this.CurrTargetOffX=this.TargetOffsetX;this.CurrTargetOffY=this.TargetOffsetY;if(this.TargetElement!=''){var relEle=xGetElementById(this.TargetElement);if(relEle)this.CurrTargetEle=relEle;}
if(xNum(aXOffset)||xNum(aYOffset)||xStr(aRelEleID)){this.CurrVAlign='Relative';this.CurrHAlign='Relative';this.CurrTargetEle=null;this.CurrTargetOffX=0;this.CurrTargetOffY=0;}
if(xNum(aXOffset))this.CurrTargetOffX=aXOffset;if(xNum(aYOffset))this.CurrTargetOffY=aYOffset;if(xStr(aRelEleID)){var relEle=xGetElementById(aRelEleID);if(relEle)this.CurrTargetEle=relEle;}
if((this.State!=CLHidden)&&(bigImgID!=-1)&&(bigImgID==this.BigImgID)){if(this.State==CLLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CLHidden;return;}
if(this.State==CLZoomIn||this.State==CLZoomed){this.UnZoom();return;}
if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
this.StartTime=xTimeMS()-this.TimeSpan+(xTimeMS()-this.StartTime);this.State=CLZoomIn;var me=this;this.Timer=setTimeout(function(){me.Enlarge();},this.TimerInterval);return;}
if(this.State==CLLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CLHidden;}
else if(this.State!=CLHidden){if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
this.HideZoomImg();}
this.SmallImg=xGetElementById(aImgName);if((bigImgID!=-1)&&IC.IsLoaded(bigImgID)){this.BigImgID=bigImgID;this.StartZoom();}
else{this.GetSmallImgData();var y=(this.SmallHeight-xHeight(this.WaitObj)-5);xMoveTo(this.WaitObj,this.SmallPosX+3,this.SmallPosY+y);xMoveTo(this.ErrObj,this.SmallPosX+3,this.SmallPosY+y);xShow(this.WaitObj);this.State=CLLoading;var me=this;this.BigImgID=IC.LoadImage(aBigImgUrl,function(aImgID){me.OnLoad(aImgID);});}}
CLupe.prototype.Enable=function(){this.Enabled=true;}
CLupe.prototype.Disable=function(){this.Enabled=false;}
CLupe.prototype.GetSmallImgData=function()
{this.SmallWidth=xWidth(this.SmallImg)+2*this.BorderWidth;this.SmallHeight=xHeight(this.SmallImg)+2*this.BorderWidth;this.SmallPosX=xPageX(this.SmallImg)+(xWidth(this.SmallImg)-this.SmallWidth)/2+this.AddPosX;this.SmallPosY=xPageY(this.SmallImg)+(xHeight(this.SmallImg)-this.SmallHeight)/2+this.AddPosY;}
CLupe.prototype.OnLoad=function(aImgID)
{if((this.State==CLLoading)&&(this.BigImgID==aImgID)){var imgState=IC.Image(aImgID).CacheState
if(imgState==ICLoaded){this.StartZoom();}
else if(imgState==ICError||imgState==ICAbort){this.State=CLHidden;xHide(this.WaitObj);xShow(this.ErrObj);var me=this;setTimeout(function(){xHide(me.ErrObj);},2500);}}}
CLupe.prototype.Range=function(aValue,aMin,aMax){return aMin+(aMax-aMin)*aValue;}
CLupe.prototype.StartZoom=function()
{this.BigImg=IC.Image(this.BigImgID);this.ZoomImg.src=this.BigImg.src;this.GetSmallImgData();this.BigWidth=this.BigImg.width+2*this.BorderWidth;this.BigHeight=this.BigImg.height+2*this.BorderWidth;if((this.SmallWidth>=this.BigWidth)||(this.SmallHeight>=this.BigHeight))return;var clW=xClientWidth();var clX=xScrollLeft();if(this.CurrHAlign=='Left'){this.BigPosX=this.HMargin;if((this.BigPosX+this.BigWidth)>(clX+clW))this.BigPosX=(clX+clW)-this.BigWidth;if((this.BigPosX)<(clX))this.BigPosX=clX;}else if(this.CurrHAlign=='Right'){this.BigPosX=(clX+clW)-this.BigWidth-this.HMargin;if((this.BigPosX)<(clX))this.BigPosX=clX;}else if(this.CurrHAlign=='Relative'){var ref=this.SmallImg;if(this.CurrTargetEle)ref=this.CurrTargetEle;this.BigPosX=xPageX(ref)+this.CurrTargetOffX;}else{var dxCenter=1;if(this.BigWidth<=clW){dxCenter=(this.BigWidth-this.SmallWidth)/(clW-this.SmallWidth);if(dxCenter<0)dxCenter=0;}
if(this.CurrHAlign=='Center')dxCenter=1;var cxBig=clW/2;var cxSmall=this.SmallPosX-clX+(this.SmallWidth/2);var cx=dxCenter*(cxBig-cxSmall)+cxSmall;this.BigPosX=clX+cx-this.BigWidth/2;if(this.BigPosX<0)this.BigPosX=0;if(this.BigWidth<=clW){if((this.BigPosX+this.BigWidth)>(clX+clW))this.BigPosX=(clX+clW)-this.BigWidth;if((this.BigPosX)<(clX))this.BigPosX=clX;}}
var clH=xClientHeight();var clY=xScrollTop();if(this.CurrVAlign=='Top'){this.BigPosY=this.VMargin;if((this.BigPosY+this.BigHeight)>(clY+clH))this.BigPosY=(clY+clH)-this.BigHeight;if((this.BigPosY)<(clY))this.BigPosY=clY;}else if(this.CurrVAlign=='Bottom'){this.BigPosY=(clY+clH)-this.BigHeight-this.VMargin;if((this.BigPosY)<(clY))this.BigPosY=clY;}else if(this.CurrVAlign=='Relative'){var ref=this.SmallImg;if(this.CurrTargetEle)ref=this.CurrTargetEle;this.BigPosY=xPageY(ref)+this.CurrTargetOffY;}else{var dyCenter=1;if(this.BigHeight<=clH){dyCenter=(this.BigHeight-this.SmallHeight)/(clH-this.SmallHeight);if(dyCenter<0)dyCenter=0;}
if(this.CurrVAlign=='Middle')dyCenter=1;var cyBig=clH/2;var cySmall=this.SmallPosY-clY+(this.SmallHeight/2);var cy=dyCenter*(cyBig-cySmall)+cySmall;this.BigPosY=clY+cy-this.BigHeight/2;if(this.BigPosY<0)this.BigPosY=0;if(this.BigHeight<=clH){if((this.BigPosY+this.BigHeight)>(clY+clH))this.BigPosY=(clY+clH)-this.BigHeight;if((this.BigPosY)<(clY))this.BigPosY=clY;}}
this.StartTime=xTimeMS();var me=this;this.Timer=setTimeout(function(){me.Enlarge();},this.TimerInterval);}
CLupe.prototype.Enlarge=function()
{if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
var param=(xTimeMS()-this.StartTime)/this.TimeSpan;var eom=param>=1;if(param>1)param=1;if(this.TimeModifyFunc)param=this.TimeModifyFunc(param);if(param<0)param=0;if(param>1)param=1;var x=this.Range(param,this.SmallPosX,this.BigPosX);var y=this.Range(param,this.SmallPosY,this.BigPosY);var w=this.Range(param,this.SmallWidth,this.BigWidth);var h=this.Range(param,this.SmallHeight,this.BigHeight);xMoveTo(this.ZoomImg,x,y);xResizeTo(this.ZoomImg,w,h);if(this.State!=CLZoomIn){xHide(this.WaitObj);xHide(this.ErrObj);xShow(this.ZoomImg);if(this.HideSmall)xHide(this.SmallImg);this.State=CLZoomIn;}
var me=this;if(eom)
{this.State=CLZoomed;this.Timer=setTimeout(function(){me.CheckOutOfWindow();},200);}
else
{this.Timer=setTimeout(function(){me.Enlarge();},this.TimerInterval);}}
CLupe.prototype.CheckOutOfWindow=function()
{var space=(xClientHeight()-this.BigHeight)/2;var newY=xScrollTop()+space;var toleranz;if(space>0){toleranz=space+(this.BigHeight*2/3);}else{toleranz=-space+(xClientHeight()*2/3);}
if(Math.abs(newY-this.BigPosY)>toleranz){this.UnZoom();return;}
var me=this;this.Timer=setTimeout(function(){me.CheckOutOfWindow();},200);}
CLupe.prototype.NewWindow=function()
{if(!this.HtmlWritten)return;if(this.HideSmall)xShow(this.SmallImg);xHide(this.ZoomImg);xMoveTo(this.ZoomImg,0,0);xResizeTo(this.ZoomImg,0,0);this.State=CLHidden;location.href=IC.ImageUrl(this.BigImgID);}
CLupe.prototype.UnZoom=function()
{if(!this.HtmlWritten)return;if(this.State==CLHidden||this.State==CLZoomOut)return;if(this.State==CLLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CLHidden;return;}
if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
this.SmallPosX=xPageX(this.SmallImg)+(xWidth(this.SmallImg)-this.SmallWidth)/2+this.AddPosX;this.SmallPosY=xPageY(this.SmallImg)+(xHeight(this.SmallImg)-this.SmallHeight)/2+this.AddPosY;if(this.State==CLZoomIn){this.StartTime=xTimeMS()-this.TimeSpan+(xTimeMS()-this.StartTime);}else{this.StartTime=xTimeMS();}
this.State=CLZoomOut;var me=this;this.Timer=setTimeout(function(){me.Shrink();},this.TimerInterval);}
CLupe.prototype.HideZoomImg=function()
{if(this.HideSmall)xShow(this.SmallImg);xHide(this.ZoomImg);xMoveTo(this.ZoomImg,0,0);xResizeTo(this.ZoomImg,0,0);this.State=CLHidden;}
CLupe.prototype.Shrink=function()
{if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
var param=(xTimeMS()-this.StartTime)/this.TimeSpan;var eom=param>=1;if(param>1)param=1;if(this.TimeModifyFunc)param=this.TimeModifyFunc(param);if(param<0)param=0;if(param>1)param=1;var x=this.Range(param,this.BigPosX,this.SmallPosX);var y=this.Range(param,this.BigPosY,this.SmallPosY);var w=this.Range(param,this.BigWidth,this.SmallWidth);var h=this.Range(param,this.BigHeight,this.SmallHeight);xMoveTo(this.ZoomImg,x,y);xResizeTo(this.ZoomImg,w,h);if(eom)
{this.HideZoomImg();}
else
{xMoveTo(this.ZoomImg,x,y);xResizeTo(this.ZoomImg,w,h);var me=this;this.Timer=setTimeout(function(){me.Shrink();},this.TimerInterval);}}
CLupeObj=new CLupe();CLupeObj.TimeModifyFunc=function(aValue){return(0.5-0.5*Math.cos(Math.PI*aValue));}
var IC=new CImgCache();var ICLoadPending=0;var ICLoading=1;var ICLoaded=2;var ICError=3;var ICAbort=4;function CImgCache(){this.CheckLoadInterval=100;this.MaxNLoading=1;this.MaxNPrioLoading=1;this.LoadDelay=0;this.EnableStatusDisplay=true;this.NImages=0;this.NLoading=0;this.NUnloaded=0;this.NError=0;this.NAbort=0;this.NLoaded=0;this.Images=new Array();this.ErrorMsg='';this.OnAllLoaded=new xCallbackChain();this.OnImgLoaded=new xCallbackChain();this.OnLoadCalling=false;this.LoadNextCalling=false;this.PrioList=new Array();this.Timer=null;var me=this;this.OnCheckLoaded=function(){me.CheckLoaded();}}
CImgCache.prototype.AddOnAllLoaded=function(aFunc){this.OnAllLoaded.Add(aFunc);}
CImgCache.prototype.AddOnImgLoaded=function(aFunc){this.OnImgLoaded.Add(aFunc);}
CImgCache.prototype.IsValid=function(aImageID){return((aImageID>=0)&&(aImageID<this.NImages));}
CImgCache.prototype.PreloadImages=function(aUrls,aRoot)
{if(!xDef(aRoot))aRoot='';for(i=0;i<aUrls.length;i++){if(aUrls[i])this.PreloadImage(aRoot+aUrls[i]);}}
CImgCache.prototype.PreloadImage=function(aUrl,aOnLoadFunc)
{var id=this.FindImage(aUrl);if(id>=0){var img=this.Images[id];if(!xDef(aOnLoadFunc))aOnLoadFunc=this.Images[id].OnLoadFunc;if(img.CacheState==ICError||img.CacheState==ICAbort){this.ReloadImage(id,aOnLoadFunc);}else{this.Images[id].OnLoadFunc=aOnLoadFunc;}}else{if(!xDef(aOnLoadFunc))aOnLoadFunc=null;id=this.AddImage(aUrl,aOnLoadFunc);}
this.LoadNext();return id;}
CImgCache.prototype.LoadImage=function(aUrl,aOnLoadFunc)
{var id=this.FindImage(aUrl);if(id>=0){var img=this.Images[id];if(!xDef(aOnLoadFunc))aOnLoadFunc=this.Images[id].OnLoadFunc;if(img.CacheState==ICError||img.CacheState==ICAbort){this.ReloadImage(id,aOnLoadFunc);}else{this.Images[id].OnLoadFunc=aOnLoadFunc;}}else{if(!xDef(aOnLoadFunc))aOnLoadFunc=null;id=this.AddImage(aUrl,aOnLoadFunc);}
if(this.Images[id].CacheState==ICLoadPending&&!this.InPrioList(id))
this.PrioList[this.PrioList.length]=id;this.LoadNext();return id;}
CImgCache.prototype.ReloadImage=function(aImgID,aOnLoadFunc)
{var img=this.Images[aImgID];img.OnLoadFunc=aOnLoadFunc;if(img.CacheState!=ICLoadPending){img.CacheState=ICLoadPending;this.NUnloaded++;this.DisplayStatus();}}
CImgCache.prototype.FindImage=function(aUrl){for(var i=0;i<this.NImages;i++){if(this.Images[i].CacheUrl==aUrl)return i;}
return-1;}
CImgCache.prototype.Image=function(aImageID){return this.Images[aImageID];}
CImgCache.prototype.ImageByUrl=function(aUrl){var imgID=this.FindImage(aUrl);return(imgID>=0)?this.Image(imgID):null;}
CImgCache.prototype.GetNUnloaded=function(){this.CheckLoaded();return this.NUnloaded;}
CImgCache.prototype.IsLoaded=function(aImageID){return(this.IsValid(aImageID)&&(this.Images[aImageID].CacheState==ICLoaded));}
CImgCache.prototype.IsLoadedByUrl=function(aUrl){var imgID=this.FindImage(aUrl);if(imgID>=0)return this.IsLoaded(imgID);return false;}
CImgCache.prototype.ImageState=function(aImageID){return(this.Images[aImageID].CacheState);}
CImgCache.prototype.ImageStateByUrl=function(aUrl){var imgID=this.FindImage(aUrl);if(imgID>=0)return this.ImageState(imgID);return-1;}
CImgCache.prototype.ImageUrl=function(aImageID){return this.Image(aImageID).CacheUrl;}
CImgCache.prototype.GetStatus=function()
{var s='';if(this.NUnloaded>0||this.NError>0||this.NAbort>0){s+='Bilder zu laden: noch '+this.NUnloaded+' von '+this.NImages+'. ';if(this.NError>0||this.NAbort>0){s+='(Geladen: '+this.NLoaded+'; ';s+='Fehler: '+this.NError+'; ';s+='Abbruch: '+this.NAbort+')';}}
return s;}
CImgCache.prototype.ResetStatus=function(){this.ErrorMsg='';this.NError=0;this.NAbort=0;}
CImgCache.prototype.DisplayStatus=function()
{if(this.EnableStatusDisplay)window.status=this.GetStatus();}
CImgCache.prototype.AddImage=function(aUrl,aOnLoadFunc)
{var id=this.NImages;var img=new Image();img.CacheUrl=aUrl;img.CacheState=ICLoadPending;img.OnLoadFunc=aOnLoadFunc;img.WasLoaded=false;img.WasError=false;img.WasAbort=false;img.onload=function(){this.WasLoaded=true;}
img.onerror=function(){this.WasError=true;}
img.onabort=function(){this.WasAbrort=true;}
this.Images[id]=img;this.NUnloaded++;this.NImages++;this.DisplayStatus();return id;}
CImgCache.prototype.InPrioList=function(aImageID){for(var i=0;i<this.PrioList.length;i++){if(this.PrioList[i]==aImageID)return true;}
return false;}
CImgCache.prototype.LoadNext=function()
{if(this.NUnloaded==0||this.LoadNextCalling)return;this.LoadNextCalling=true;while((this.NUnloaded>0)&&(this.PrioList.length>0)&&(this.NLoading<this.MaxNPrioLoading)){var id=this.PrioList.shift();this.StartLoading(id);}
while((this.NUnloaded>0)&&(this.NLoading<this.MaxNLoading)){var id=this.FindLoadPending();this.StartLoading(id);}
this.LoadNextCalling=false;}
CImgCache.prototype.FindLoadPending=function(){for(var id=0;id<this.Images.length;id++){if(this.Images[id].CacheState==ICLoadPending)return id;}
return-1;}
CImgCache.prototype.StartLoading=function(aImageID){if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
var img=this.Images[aImageID];if(img.CacheState==ICLoadPending||img.CacheState==ICAbort){this.NLoading++;this.DisplayStatus();img.CacheState=ICLoading;if(this.LoadDelay>0){setTimeout(function(){img.src=img.CacheUrl;},this.LoadDelay);}else{img.src=img.CacheUrl;}}
if(this.NLoading>0&&this.Timer==null){this.Timer=setTimeout(this.OnCheckLoaded,this.CheckLoadInterval);}}
CImgCache.prototype.CheckLoaded=function()
{if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
for(var id=0;id<this.NImages;id++){var img=this.Images[id];if(img.CacheState==ICLoading){if(img.complete||img.WasLoaded){this.OnLoad(id);}
if(img.WasError){this.OnError(id);}
if(img.WasAbort){this.OnAbort(id);}}}
if(this.NLoading>0&&this.Timer==null){this.Timer=setTimeout(this.OnCheckLoaded,this.CheckLoadInterval);}}
CImgCache.prototype.OnImage=function(aImageID)
{this.NLoading--;this.NUnloaded--;this.DisplayStatus();this.CallLoadedFunc(aImageID);this.OnImgLoaded.Call(aImageID);if(this.NUnloaded==0){this.OnAllLoaded.Call();}else{this.LoadNext();}}
CImgCache.prototype.OnLoad=function(aImageID)
{if(this.Images[aImageID].CacheState!=ICLoading)return;this.NLoaded++;this.DisplayStatus();this.Images[aImageID].CacheState=ICLoaded;this.OnImage(aImageID);}
CImgCache.prototype.OnError=function(aImageID)
{if(this.Images[aImageID].CacheState!=ICLoading)return;this.NError++;this.ErrorMsg+=' Error loading '+this.Images[aImageID].src;this.DisplayStatus();this.Images[aImageID].CacheState=ICError;this.OnImage(aImageID);}
CImgCache.prototype.OnAbort=function(aImageID)
{if(this.Images[aImageID].CacheState!=ICLoading)return;this.NAbort++;this.DisplayStatus();this.Images[aImageID].CacheState=ICAbort;this.OnImage(aImageID);}
CImgCache.prototype.CallLoadedFunc=function(aImageID){var img=this.Images[aImageID];if(!this.OnLoadCalling&&img.OnLoadFunc){this.OnLoadCalling=true;try{img.OnLoadFunc(aImageID);}catch(e){this.OnLoadCalling=false;return;}
this.OnLoadCalling=false;}}
var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase();if(window.opera){var i=xUA.indexOf('opera');if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7;}}
else if(navigator.vendor!='KDE'&&document.all&&xUA.indexOf('msie')!=-1){xIE4Up=parseFloat(navigator.appVersion)>=4;xIE4=xUA.indexOf('msie 4')!=-1;xIE5=xUA.indexOf('msie 5')!=-1;}
else if(document.layers){xNN4=true;}
xMac=xUA.indexOf('mac')!=-1;function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}
return true;}
function xFunc(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='function')return false;}
return true;}
function xStr(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}
return true;}
function xNum(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='number')return false;}
return true;}
function xGetElementById(e){if(typeof(e)!='string')return e;if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;return e;}
function xInnerHTML(e,t){if(!(e=xGetElementById(e)))return'';if(xDef(e.innerHTML)){if(xStr(t))e.innerHTML=t;else t=e.innerHTML;}
return t;}
function xTagName(e){if(!(e=xGetElementById(e)))return;return xDef(e.tagName)?e.tagName.toLowerCase():'undefined';}
function xShow(e){xVisibility(e,1);}
function xHide(e){xVisibility(e,0);}
function xVisibility(e,bShow)
{if(!(e=xGetElementById(e)))return;if(e.style&&xDef(e.style.visibility)){if(xDef(bShow))e.style.visibility=bShow?'visible':'hidden';return e.style.visibility;}
return null;}
function xMoveTo(e,iX,iY){xLeft(e,iX);xTop(e,iY);}
function xLeft(e,iX){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=0;}}
else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}
return iX;}
function xTop(e,iY){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=0;}}
else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}
return iY;}
function xOpacity(e,uO){if(!(e=xGetElementById(e)))return 100;if(xDef(e.filters)&&xDef(e.filters.alpha)&&xDef(e.filters.alpha.opacity)){if(xNum(uO))e.filters.alpha.opacity=uO;else uO=e.filters.aplha.opacity;}else uO=100;return uO;}
function xResizeTo(e,uW,uH){xWidth(e,uW);xHeight(e,uH);}
function xWidth(e,uW){if(!(e=xGetElementById(e)))return 0;if(xNum(uW)){if(uW<0)uW=0;else uW=Math.round(uW);}
else uW=-1;var css=xDef(e.style);if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(uW>=0)xSetCW(e,uW);uW=e.offsetWidth;}
else if(css&&xDef(e.style.pixelWidth)){if(uW>=0)e.style.pixelWidth=uW;uW=e.style.pixelWidth;}
return uW;}
function xHeight(e,uH){if(!(e=xGetElementById(e)))return 0;if(xNum(uH)){if(uH<0)uH=0;else uH=Math.round(uH);}
else uH=-1;var css=xDef(e.style);if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(uH>=0)xSetCH(e,uH);uH=e.offsetHeight;}
else if(css&&xDef(e.style.pixelHeight)){if(uH>=0)e.style.pixelHeight=uH;uH=e.style.pixelHeight;}
return uH;}
function xGetCS(ele,sP){return parseInt(document.defaultView.getComputedStyle(ele,'').getPropertyValue(sP));}
function xSetCW(ele,uW){var pl=0,pr=0,bl=0,br=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pl=xGetCS(ele,'padding-left');pr=xGetCS(ele,'padding-right');bl=xGetCS(ele,'border-left-width');br=xGetCS(ele,'border-right-width');}
else if(xDef(ele.currentStyle,document.compatMode)&&(document.compatMode=='CSS1Compat')){pl=parseInt(ele.currentStyle.paddingLeft);pr=parseInt(ele.currentStyle.paddingRight);bl=parseInt(ele.currentStyle.borderLeftWidth);br=parseInt(ele.currentStyle.borderRightWidth);}
else if(xDef(ele.offsetWidth,ele.style.width)){ele.style.width=uW+'px';pl=ele.offsetWidth-uW;}
if(isNaN(pl))pl=0;if(isNaN(pr))pr=0;if(isNaN(bl))bl=0;if(isNaN(br))br=0;var cssW=uW-(pl+pr+bl+br);if(isNaN(cssW)||cssW<0)return;else ele.style.width=cssW+'px';}
function xSetCH(ele,uH){var pt=0,pb=0,bt=0,bb=0;if(xDef(document.defaultView)&&xDef(document.defaultView.getComputedStyle)){pt=xGetCS(ele,'padding-top');pb=xGetCS(ele,'padding-bottom');bt=xGetCS(ele,'border-top-width');bb=xGetCS(ele,'border-bottom-width');}
else if(xDef(ele.currentStyle,document.compatMode)&&(document.compatMode=='CSS1Compat')){pt=parseInt(ele.currentStyle.paddingTop);pb=parseInt(ele.currentStyle.paddingBottom);bt=parseInt(ele.currentStyle.borderTopWidth);bb=parseInt(ele.currentStyle.borderBottomWidth);}
else if(xDef(ele.offsetHeight,ele.style.height)){ele.style.height=uH+'px';pt=ele.offsetHeight-uH;}
if(isNaN(pt))pt=0;if(isNaN(pb))pb=0;if(isNaN(bt))bt=0;if(isNaN(bb))bb=0;var cssH=uH-(pt+pb+bt+bb);if(isNaN(cssH)||cssH<0)return;else ele.style.height=cssH+'px';}
function xClientWidth()
{var w=0;if(xOp6Dn)w=window.innerWidth;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)
w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)
w=document.body.clientWidth;else if(xDef(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w-=16;}
return w;}
function xClientHeight()
{var h=0;if(xOp6Dn)h=window.innerHeight;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)
h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)
h=document.body.clientHeight;else if(xDef(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h-=16;}
return h;}
function xPageX(e){if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}
return x;}
function xPageY(e){if(!(e=xGetElementById(e)))return 0;var y=0;while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}
return y;}
function xScrollLeft(e,bWin)
{var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft)offset=w.document.documentElement.scrollLeft;else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft;}
return offset;}
function xScrollTop(e,bWin)
{var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop)offset=w.document.documentElement.scrollTop;else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop;}
else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop;}
return offset;}
function xZIndex(e,uZ)
{if(!(e=xGetElementById(e)))return 0;if(e.style&&xDef(e.style.zIndex)){if(xNum(uZ))e.style.zIndex=uZ;uZ=parseInt(e.style.zIndex);}
return uZ;}
function xCursor(e,c)
{if(!(e=xGetElementById(e)))return'';if(e.style&&xDef(e.style.cursor)){if(xStr(c))e.style.cursor=c;c=e.style.cursor;}
return c;}
function xStyle(e,sStyle,sVal){if(!(e=xGetElementById(e)))return'';if(e.style&&xStr(sStyle)&&xDef(e.style[sStyle])){if(xDef(sVal))e.style[sStyle]=sVal;else sVal=e.style[sStyle];}
return sVal;}
function xParent(e,bNode){if(!(e=xGetElementById(e)))return null;var p=null;if(!bNode&&xDef(e.offsetParent))p=e.offsetParent;else if(xDef(e.parentNode))p=e.parentNode;else if(xDef(e.parentElement))p=e.parentElement;return p;}
function xCreateElement(sTag){if(document.createElement)return document.createElement(sTag);else return null;}
function xCreateTextNode(s){if(document.createTextNode)return document.createTextNode(s);else return null;}
function xHasChildNodes(oParent){if(oParent.hasChildNodes)return oParent.hasChildNodes();else return false;}
function xChildNodes(oParent){if(oParent.childNodes)return oParent.childNodes;else return[];}
function xAppendChild(oParent,oChild){if(oParent.appendChild)return oParent.appendChild(oChild);else return null;}
function xInsertBefore(oParent,oChild,oRef){if(oParent.insertBefore)return oParent.insertBefore(oChild,oRef);else return oChild;}
function xRemoveChild(oParent,oChild){if(oParent.removeChild)return oParent.removeChild(oChild);else return oChild;}
function xGetElementsByTagName(t,p)
{var list=null;t=t||'*';p=p||document;if(xIE4||xIE5){if(t=='*')list=p.all;else list=p.all.tags(t);}
else if(p.getElementsByTagName)list=p.getElementsByTagName(t);return list||new Array();}
function xAddEventListener(e,eT,eL,cap)
{if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=eL;xResizeEvent();return;}
if(eT=='scroll'){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=eL;xScrollEvent();return;}}
var eh='e.on'+eT+'=eL';if(e.addEventListener)e.addEventListener(eT,eL,cap);else if(e.attachEvent)e.attachEvent('on'+eT,eL);else eval(eh);}
function xResizeEvent()
{if(window.xREL)setTimeout('xResizeEvent()',250);var cw=xClientWidth(),ch=xClientHeight();if(window.xPCW!=cw||window.xPCH!=ch){window.xPCW=cw;window.xPCH=ch;if(window.xREL)window.xREL();}}
function xScrollEvent()
{if(window.xSEL)setTimeout('xScrollEvent()',250);var sl=xScrollLeft(),st=xScrollTop();if(window.xPSL!=sl||window.xPST!=st){window.xPSL=sl;window.xPST=st;if(window.xSEL)window.xSEL();}}
function xRemoveEventListener(e,eT,eL,cap)
{if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xREL=null;return;}
if(eT=='scroll'){window.xSEL=null;return;}}
var eh='e.on'+eT+'=null';if(e.removeEventListener)e.removeEventListener(eT,eL,cap);else if(e.detachEvent)e.detachEvent('on'+eT,eL);else eval(eh);}
function xEvent(evt)
{this.Init(evt);}
xEvent.prototype.Init=function(evt)
{var e=evt||window.event;this.event=e;if(!e)return;if(e.type)this.type=e.type;if(e.target)this.target=e.target;else if(e.srcElement)this.target=e.srcElement;if(e.relatedTarget)this.relatedTarget=e.relatedTarget;else if(e.type=='mouseover'&&e.fromElement)this.relatedTarget=e.fromElement;else if(e.type=='mouseout')this.relatedTarget=e.toElement;if(xOp6Dn){this.pageX=e.clientX;this.pageY=e.clientY;}
else if(xDef(e.pageX,e.pageY)){this.pageX=e.pageX;this.pageY=e.pageY;}
else if(xDef(e.clientX,e.clientY)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop();}
if(xDef(e.offsetX,e.offsetY)){this.offsetX=e.offsetX;this.offsetY=e.offsetY;}
else if(xDef(e.layerX,e.layerY)){this.offsetX=e.layerX;this.offsetY=e.layerY;}
else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target);}
if(e.keyCode){this.keyCode=e.keyCode;}
else if(xDef(e.which)&&e.type.indexOf('key')!=-1){this.keyCode=e.which;}
this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;return this;}
xEvent.prototype.PreventDefault=function(){if(!event)return;if(this.event.preventDefault)this.event.preventDefault();this.event.returnValue=false;}
xEvent.prototype.StopPropagation=function(){if(!event)return;if(this.event.stopPropagation)this.event.stopPropagation();this.event.cancelBubble=true;}
function xCallbackChain(){this.Callback=null;this.Active=false;}
xCallbackChain.prototype.Add=function(aFunc){aFunc.NextCallback=this.Callback;this.Callback=aFunc;}
xCallbackChain.prototype.Call=function(aArg){if(this.Active)return;this.Active=true;var cb=this.Callback;while(cb){cb(aArg);cb=cb.NextCallback;}
this.Active=false;}
function xOnLoad(aFunc){var oldLoadFunc=window.onload;window.onload=function(){if(oldLoadFunc)oldLoadFunc();aFunc();}}
function xOnUnload(aFunc){var oldUnloadFunc=window.onunload;window.onunload=function(){if(oldUnloadFunc)oldUnloadFunc();aFunc();}}
function xClipboard(text){if(xDef(window.clipboardData)){if(xStr(text))window.clipboardData.setData('Text',text);else text=window.clipboardData.getData('Text');}
return text;}
function xTimeMS(){var date=new Date();return date.getTime();}
function xImage(aImgFilename){var img=new Image;img.src=aImgFilename;return img;}
function xChangeImage(aImgID,aImg){var img=xGetElementById(aImgID);if(img)img.src=aImg.src;}
function xMultiImage(aImgID){this.ImgID=aImgID;this.Images=new Array();var a=xMultiImage.arguments;for(var i=1;i<a.length;i++){this.Images[i-1]=xImage(a[i]);}}
xMultiImage.prototype.Show=function(aImageNumber){xChangeImage(this.ImgID,this.Images[aImageNumber]);}
var xDbgMess='';var xDbgSep='\n';function xDbg(aMess){if(aMess)xDbgMess+=aMess+xDbgSep;else alert(xDbgMess);}
function xDbgOut(x){var o=xGetElementById('xdbgout');if(o)o.value=x;}
function xDbgApp(x){var o=xGetElementById('xdbgout');if(o)o.value+=x+'\n';}
function htmlString(aStr){var s=aStr;s=s.replace(/</g,'&lt;');s=s.replace(/>/g,'&gt;');return s;}
tooltipp=null;var marginX=90;var marginY=10;function updateToolTipp(e){if(window!=null&&window.event!=null)
{if(document!=null&&document.body!=null)
{var scrollY;var scrollX;if(typeof window.pageYOffset!='undefined')
{scrollY=window.pageYOffset;scrollX=window.pageXOffset;}
else if(typeof document.compatMode!='undefined'&&document.compatMode!='BackCompat')
{scrollY=document.documentElement.scrollTop;scrollX=document.documentElement.scrollLeft;}
else if(typeof document.body!='undefined')
{scrollY=document.body.scrollTop;scrollX=document.body.scrollLeft;}
if(navigator.userAgent.toLowerCase().indexOf('msie 8')>-1)
{x=window.event.x;y=window.event.y;}
else
{x=window.event.x+scrollX;y=window.event.y+scrollY;}}
else
{x=0;y=0;}}
else
{if(e!=null)
{x=e.pageX;y=e.pageY;}
else
{x=0;y=0;}}
if(tooltipp!=null)
{tooltipp.style.left=(x+marginX)+"px";tooltipp.style.top=(y+marginY)+"px";}}
function showToolTipp(id)
{tooltipp=document.getElementById(id);tooltipp.style.display="block";}
function showToolTipp(id,MarginX,MarginY)
{marginX=MarginX;marginY=MarginY;tooltipp=document.getElementById(id);tooltipp.style.display="block";}
function hideToolTipp()
{if(tooltipp!=null)
tooltipp.style.display="none";}
document.onclick=updateToolTipp;document.onmousemove=updateToolTipp;