// (C) walter.bislins.ch

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),10);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 xInnerText(e,defaultText){if(!(e=xGetElementById(e))){return defaultText;}
if(xDef(e.innerText)){return e.innerText;}
if(xDef(e.textContent)){return e.textContent;}
return defaultText;}
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 xDisplay(e,val){if(!(e=xGetElementById(e))){return;}
if(e.style&&xDef(e.style.display)){if(xStr(val)){var oldDisplay=e.style.display;e.style.display=val;if(oldDisplay!=val){xDisplayChanged(e);}}
return e.style.display;}
return null;}
function xIsDisplayed(e){if(!(e=xGetElementById(e))){return false;}
while(e&&!xIsRoot(e)){if(e.style&&xDef(e.style.display)){if(e.style.display=='none'){return false;}}
e=xParent(e,true);}
return true;}
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,10);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,10);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),10);}
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,10);pr=parseInt(ele.currentStyle.paddingRight,10);bl=parseInt(ele.currentStyle.borderLeftWidth,10);br=parseInt(ele.currentStyle.borderRightWidth,10);}
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,10);pb=parseInt(ele.currentStyle.paddingBottom,10);bt=parseInt(ele.currentStyle.borderTopWidth,10);bb=parseInt(ele.currentStyle.borderBottomWidth,10);}
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;var n=e;while(e&&!xIsRoot(e)){if(xDef(e.offsetLeft)){x+=e.offsetLeft;}
e=xDef(e.offsetParent)?e.offsetParent:null;}
e=n;while(e&&!xIsRoot(e)){if(xNum(e.scrollLeft)){x-=e.scrollLeft;}
e=xParent(e,true);}
return x;}
function xPageY(e){if(!(e=xGetElementById(e))){return 0;}
var y=0;var n=e;while(e&&!xIsRoot(e)){if(xDef(e.offsetTop)){y+=e.offsetTop;}
e=xDef(e.offsetParent)?e.offsetParent:null;}
e=n;while(e&&!xIsRoot(e)){if(xNum(e.scrollTop)){y-=e.scrollTop;}
e=xParent(e,true);}
return y;}
function xIsRoot(e){return(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body');}
function xScrollLeft(e,bWin)
{var offset=0;if(!xDef(e)||bWin||xIsRoot(e)){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,val)
{var offset=0;if(!xDef(e)||bWin||xIsRoot(e)){var w=window;if(bWin&&e){w=e;}
if(w.document.documentElement&&w.document.documentElement.scrollTop){offset=w.document.documentElement.scrollTop;if(xNum(val)){w.document.documentElement.scrollTop=val;}}
else if(w.document.body&&xDef(w.document.body.scrollTop)){offset=w.document.body.scrollTop;if(xNum(val)){w.document.body.scrollTop=val;}}}
else{e=xGetElementById(e);if(e&&xNum(e.scrollTop)){offset=e.scrollTop;if(xNum(val)){e.scrollTop=val;}}}
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,10);}
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||[];}
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(!this.event){return;}
if(this.event.preventDefault){this.event.preventDefault();}
this.event.returnValue=false;};xEvent.prototype.StopPropagation=function(){if(!this.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 xOnDisplay(aFunc){if(!window.onEleDisplay){window.onEleDisplay=new xCallbackChain();}
window.onEleDisplay.Add(aFunc);}
function xDisplayChanged(aEle){if(window.onEleDisplay){window.onEleDisplay.Call(aEle);}}
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=[];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;}// 

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=2;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=[];this.ErrorMsg='';this.OnAllLoaded=new xCallbackChain();this.OnImgLoaded=new xCallbackChain();this.OnLoadCalling=false;this.LoadNextCalling=false;this.PrioList=[];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.MaxNLoading)){var id=this.PrioList.shift();this.StartLoading(id);}
var found=true;while((this.NUnloaded>0)&&found&&(this.NLoading<this.MaxNLoading)){var id=this.FindLoadPending();if(id==-1){found=false;}else{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 Zoom=null;function ZoomInit(){Zoom.Init(ZoomInit.arguments);}
function ZoomPics(){Zoom.LoadPicsOnPageLoad(ZoomPics.arguments);}
function ZoomDebug(){Zoom.DebugOn=true;}
function ZoomIn(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID){Zoom.ZoomIn(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID);}
function ZoomOut(){Zoom.ZoomOut();}
function ZoomEnable(){Zoom.Enable();}
function ZoomDisable(){Zoom.Disable();}
var CZHidden=0;var CZLoading=1;var CZZoomIn=2;var CZZoomed=3;var CZZoomOut=4;function CZoom()
{if(Zoom){return;}
this.DebugOn=false;this.AutoPreload=true;this.EnableInitOnClick=false;this.EnableDblClick=true;this.ZoomWindowName='Zoom';this.ZoomWindowFeatures='';this.NewWindowOnDblClick=false;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.ZoomFunctionName='ZoomIn';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=CZHidden;this.InitExecuted=false;this.PreloadExecuted=false;this.InitForced=false;this.HtmlWritten=false;this.DblClickActive=false;this.DebugDisplayed=false;Zoom=this;}
CZoom.prototype.Init=function(aImgUrlList){var me=this;function AfterPageLoad(){me.CreateHtmlObjects();if(aImgUrlList.length>0){me.Preload(aImgUrlList);}
if(me.AutoPreload){me.FindAndPreloadImages();}
me.InitExecuted=true;}
if(this.InitExecuted){return;}
xOnLoad(AfterPageLoad);};CZoom.prototype.ForceInit=function(){if(this.InitExecuted){return;}
this.CreateHtmlObjects();this.InitExecuted=true;this.InitForced=true;};CZoom.prototype.FindAndPreloadImages=function(){var urlList=[];var callList=this.FindZoomFunctionCalls();for(var i=0;i<callList.length;i++){urlList.push(this.GetPathFromZoomFunctionCall(callList[i]));}
if(urlList.length>0){this.Preload(urlList);}}
CZoom.prototype.FindZoomFunctionCalls=function(){var callList=[];var el=xGetElementsByTagName('*');for(var i=0;i<el.length;i++){var e=el[i];if(e.onclick){var src=this.IsZoomFunctionCall(e.onclick);if(src!=''){callList.push(src);}}
if(e.tagName&&e.tagName.toLowerCase()=='a'){var href=e.href||'';if(href.indexOf('javascript:')>=0){var src=this.IsZoomFunctionCall(href);if(src!=''){callList.push(src);}}}}
return callList;}
CZoom.prototype.HasMultipleCallsWithSameId=function(){var lastId='';var callList=this.FindZoomFunctionCalls();for(var i=0;i<callList.length;i++){var id=this.GetIdFromZoomFunctionCall(callList[i]);if(id==lastId){return true;}
lastId=id;}
return false;}
CZoom.prototype.IsZoomFunctionCall=function(aHandler){var s=''+aHandler;var p=s.indexOf(this.ZoomFunctionName);return(p>=0)?s:'';}
CZoom.prototype.GetPathFromZoomFunctionCall=function(aCallStr){var p=aCallStr.indexOf(this.ZoomFunctionName);if(p<0){return'';}
p=aCallStr.indexOf(',',p);var sp=aCallStr.indexOf('\'',p);var ep=aCallStr.indexOf('\'',sp+1);return aCallStr.substring(sp+1,ep);}
CZoom.prototype.GetIdFromZoomFunctionCall=function(aCallStr){var p=aCallStr.indexOf(this.ZoomFunctionName);if(p<0){return'';}
p=aCallStr.indexOf('(',p);var sp=aCallStr.indexOf('\'',p);var ep=aCallStr.indexOf('\'',sp+1);return aCallStr.substring(sp+1,ep);}
CZoom.prototype.LoadPicsOnPageLoad=function(aImgUrlList){var me=this;function AfterPageLoad(){if(aImgUrlList.length>0){me.Preload(aImgUrlList);}}
xOnLoad(AfterPageLoad);};CZoom.prototype.Preload=function(aImgUrlList){if(aImgUrlList.length==2&&typeof(aImgUrlList[1])=='object'){IC.PreloadImages(aImgUrlList[1],aImgUrlList[0]);}
else{IC.PreloadImages(aImgUrlList);}
this.PreloadExecuted=true;};CZoom.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 ZoomInit or ZoomPics to preload the zoom images or set Zoom.AutoPreload = true.';this.PreloadExecuted=true;}
if(this.HasMultipleCallsWithSameId()){s+='Warning: Same id used in different calls of ZoomIn()!\nThis is commonly the cause for zooming in from the wrong thumbnail picture.';}
if(s==''){if(ics!=''){s='Zoom Status: ok.\nBut problems with some images detected.\nCheck url\'s in ZoomInit and ZoomIn!';}}else{s='Zoom Status:\n\n'+s;}
if(ics!=''){s+='\n\nIC Status (IC = Image Caching and Preload):\n'+ics+'\n'+IC.ErrorMsg;IC.ResetStatus();}
if(s!=''||!this.DebugDisplayed){if(s==''){s='Zoom Status: all fine!\n\nTo remove this message,\ndelete or comment the line with ZoomDebug(); from your script.';}
alert(s);}
this.ErrMsg='';this.DebugDisplayed=true;};CZoom.prototype.AddError=function(aMsg){this.ErrMsg+=aMsg+'\n';};CZoom.prototype.CreateHtmlObjects=function()
{var me=this;var msgFailed='CZoom.CreateHtmlObjects: creating Zoom HTML failed ';function OnClick(){me.ZoomOut();}
function OnDblClick(){me.NewWindow();}
var oImg=xCreateElement('img');if(!oImg||!oImg.style){this.AddError(msgFailed+'(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(msgFailed+'(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(msgFailed+'(no body tag found)');return;}
var oBody=oElements[0];if(!xHasChildNodes(oBody)){this.AddError(msgFailed+'(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;};CZoom.prototype.ZoomIn=function(aImgName,aBigImgUrl,aXOffset,aYOffset,aRelEleID)
{if(!this.InitExecuted){if(this.EnableInitOnClick){this.AddError('CZoomIn: Zoom not initialized - forcing init now!\nCheck ZoomInit and ensure no onload is in body tag!');this.ForceInit();if(!this.HtmlWritten){this.AddError('CZoomIn: forced Init failed, give up here.');return;}}else{if(this.DebugOn){this.AddError('CZoomIn: Zoom not initialized!\nCheck ZoomInit and ensure no onload is in body tag\nor set Zoom.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);if(this.EnableDblClick&&this.DblClickActive){return;}
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!=CZHidden)&&(bigImgID!=-1)&&(bigImgID==this.BigImgID)){if(this.State==CZLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CZHidden;return;}
if(this.State==CZZoomIn||this.State==CZZoomed){this.ZoomOut();return;}
if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
this.StartTime=xTimeMS()-this.TimeSpan+(xTimeMS()-this.StartTime);this.State=CZZoomIn;var me=this;this.Timer=setTimeout(function(){me.Enlarge();},this.TimerInterval);return;}
if(this.State==CZLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CZHidden;}
else if(this.State!=CZHidden){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=CZLoading;var me=this;this.BigImgID=IC.LoadImage(aBigImgUrl,function(aImgID){me.OnLoad(aImgID);});}};CZoom.prototype.Enable=function(){this.Enabled=true;};CZoom.prototype.Disable=function(){this.Enabled=false;};CZoom.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;};CZoom.prototype.OnLoad=function(aImgID)
{if((this.State==CZLoading)&&(this.BigImgID==aImgID)){var imgState=IC.Image(aImgID).CacheState;if(imgState==ICLoaded){this.StartZoom();}
else if(imgState==ICError||imgState==ICAbort){this.State=CZHidden;xHide(this.WaitObj);xShow(this.ErrObj);var me=this;setTimeout(function(){xHide(me.ErrObj);},2500);}}};CZoom.prototype.Range=function(aValue,aMin,aMax){return aMin+(aMax-aMin)*aValue;};CZoom.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);};CZoom.prototype.Enlarge=function()
{if(this.Timer){clearTimeout(this.Timer);this.Timer=null;}
if(this.DblClickActive){return;}
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!=CZZoomIn){xHide(this.WaitObj);xHide(this.ErrObj);xShow(this.ZoomImg);if(this.HideSmall){xHide(this.SmallImg);}
this.State=CZZoomIn;}
var me=this;if(eom)
{this.State=CZZoomed;this.Timer=setTimeout(function(){me.CheckOutOfWindow();},200);}
else
{this.Timer=setTimeout(function(){me.Enlarge();},this.TimerInterval);}};CZoom.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.ZoomOut();return;}
var me=this;this.Timer=setTimeout(function(){me.CheckOutOfWindow();},200);};CZoom.prototype.NewWindow=function()
{function CancelDblClick(){me.DblClickActive=false;}
if(!this.HtmlWritten){return;}
var me=this;if(!this.DblClickActive){this.DblClickActive=true;setTimeout(function(){CancelDblClick();},500);}
if(this.HideSmall){xShow(this.SmallImg);}
xHide(this.ZoomImg);xMoveTo(this.ZoomImg,0,0);xResizeTo(this.ZoomImg,0,0);this.State=CZHidden;if(this.NewWindowOnDblClick){var features=this.ZoomWindowFeatures;features=features.replace(/%w/gi,this.BigWidth.toString());features=features.replace(/%h/gi,this.BigHeight.toString());var w=window.open(IC.ImageUrl(this.BigImgID),this.ZoomWindowName,features);}else{location.href=IC.ImageUrl(this.BigImgID);}};CZoom.prototype.ZoomOut=function()
{if(!this.HtmlWritten){return;}
if(this.State==CZHidden||this.State==CZZoomOut){return;}
if(this.State==CZLoading){xHide(this.WaitObj);xHide(this.ErrObj);this.State=CZHidden;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==CZZoomIn){this.StartTime=xTimeMS()-this.TimeSpan+(xTimeMS()-this.StartTime);}else{this.StartTime=xTimeMS();}
this.State=CZZoomOut;var me=this;this.Timer=setTimeout(function(){me.Shrink();},this.TimerInterval);};CZoom.prototype.HideZoomImg=function()
{if(this.HideSmall){xShow(this.SmallImg);}
xHide(this.ZoomImg);xMoveTo(this.ZoomImg,0,0);xResizeTo(this.ZoomImg,0,0);this.State=CZHidden;};CZoom.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);}};Zoom=new CZoom();Zoom.TimeModifyFunc=function(aValue){return(0.5-0.5*Math.cos(Math.PI*aValue));};// 

var MIN_HILI_LEN=3;var MAX_HILI_ITEMS=100;var bKeyPressed=false;var oBody=null;var sRedirect=[];function EditPage(){if(PAGE_MODE==''){if(ENABLE_EDIT||ALT_ASP_PAGE!=''){var asp=ASP_PAGE;var op='&op=edit';if(!IS_LOGED_IN){op='&op=login';}
if(!ENABLE_EDIT){asp=ALT_ASP_PAGE;op='';}
location.href=asp+'?page='+UrlEncode(PAGE_NAME)+op;}}else{}}
function OnDocKeyDown(e){var ev=new xEvent(e);if(!bKeyPressed&&(ev.keyCode==13||(ev.keyCode>=49&&ev.keyCode<=57))){var i=ev.keyCode-49;if(i<0){i=0;}
if(sRedirect.length-1>=i){location.href=sRedirect[i];}}
bKeyPressed=true;if(ev.keyCode==88&&ev.ctrlKey&&!ev.altKey&&!ev.shiftKey&&!HAS_FORMS){EditPage();}}
function UrlEncode(s){var ss=s;ss=escape(ss);ss=ss.replace(/\//g,'%2F');ss=ss.replace(/\+/g,'%2B');ss=ss.replace(/\*/g,'%2A');ss=ss.replace(/@/g,'%40');ss=ss.replace(/%20/g,'+');return ss;}
function OnDblCklick(e){EditPage();}
function InitWikiJS(){oBody=xGetElementById('body');var oHtmlList=xGetElementsByTagName("html");if(oHtmlList.length>0){xAddEventListener(oHtmlList[0],'keydown',OnDocKeyDown,false);}
var topHeaderList=xGetElementsByTagName('h1');if(topHeaderList&&topHeaderList.length>0){for(var i=0;i<topHeaderList.length;i++){xAddEventListener(topHeaderList[i],'dblclick',OnDblCklick,false);}}
topHeaderList=xGetElementsByTagName('h2');if(topHeaderList&&topHeaderList.length>0){for(var i=0;i<topHeaderList.length;i++){xAddEventListener(topHeaderList[i],'dblclick',OnDblCklick,false);}}}
xOnLoad(InitWikiJS);function SEL(grp,idList){function isInList(l,ele){for(var i=0;i<l.length;i++){if(l[i]==ele){return true;}}
return false;}
var top=xScrollTop(null,true);for(var i=0;i<grp.length;i++){if(isInList(idList,grp[i])){xDisplay('SEL_ELE_'+grp[i],'');}}
for(var i=0;i<grp.length;i++){if(!isInList(idList,grp[i])){xDisplay('SEL_ELE_'+grp[i],'none');}}
xScrollTop(null,true,top);}
var HILI_COLORS=3;function SplitWords(words){if(words==''){return[];}
if(words.charAt(0)=='='){return[words.substr(1,words.length-1)];}
var pl=words.split('"');if(pl.length>1){for(var i=1;i<pl.length;i+=2){pl[i]=pl[i].replace(/ /g,'%20');pl[i]=pl[i].replace(/\|/g,'%7C');}
words='';for(var i=0;i<pl.length;i++){if(i>0){words+='"';}
words+=pl[i];}}
words=words.replace(/\|/g,' ');pl=words.split(' ');for(var i=0;i<pl.length;i++){var s=pl[i];s=s.replace(/%20/g,' ');s=s.replace(/%7C/g,'|');if(s.length>2&&s.charAt(0)=='"'&&s.charAt(s.length-1)=='"'){s=s.substr(1,s.length-2);}
pl[i]=s;}
return pl;}
function decodeHtml(s){var div=xCreateElement('div');var txt=xCreateTextNode(s);xAppendChild(div,txt);xInnerHTML(div,s);return xInnerText(div,s);}
function highlightWord(node,word,n){if(word.length<MIN_HILI_LEN||HILI_COUNT>MAX_HILI_ITEMS){return false;}
if(xHasChildNodes(node)){var hi_cn;var cnl=xChildNodes(node);for(hi_cn=0;hi_cn<cnl.length;hi_cn++){if(!highlightWord(cnl[hi_cn],word,n)){return false;}}}
if(node.nodeType==3){var tempNodeVal=node.nodeValue.toLowerCase();if(tempNodeVal.indexOf(word)!=-1){var pn=xParent(node,true);if(pn.className.substr(0,10)!='searchword'){var nv=node.nodeValue;var ni=tempNodeVal.indexOf(word);var before=xCreateTextNode(nv.substr(0,ni));if(!before){return false;}
var docWordVal=nv.substr(ni,word.length);var after=xCreateTextNode(nv.substr(ni+word.length));var hiwordtext=xCreateTextNode(docWordVal);var hiword=xCreateElement('span');if(!hiword){return false;}
hiword.className='searchword'+(n%HILI_COLORS);hiword.onclick=ToggleMarks;xAppendChild(hiword,hiwordtext);xInsertBefore(pn,before,node);xInsertBefore(pn,hiword,node);xInsertBefore(pn,after,node);xRemoveChild(pn,node);HILI_COUNT++;}}}
return true;}
function highlightRegExp(node,word,n){if(HILI_COUNT>MAX_HILI_ITEMS){return false;}
if(xHasChildNodes(node)){var hi_cn;var cnl=xChildNodes(node);for(hi_cn=0;hi_cn<cnl.length;hi_cn++){if(!highlightRegExp(cnl[hi_cn],word,n)){return false;}}}
if(node.nodeType==3){try{var re=new RegExp(word,'ig');var rematch=re.exec(node.nodeValue);if(rematch&&xDef(RegExp,RegExp.leftContext,RegExp.rightContext,RegExp.lastMatch)&&(RegExp.lastMatch!='')){var pn=xParent(node,true);if(pn.className.substr(0,10)!='searchword'){var before=xCreateTextNode(RegExp.leftContext);if(!before){return false;}
var after=xCreateTextNode(RegExp.rightContext);var hiwordtext=xCreateTextNode(RegExp.lastMatch);var hiword=xCreateElement('span');if(!hiword){return false;}
hiword.className='searchword'+(n%HILI_COLORS);hiword.onclick=ToggleMarks;xAppendChild(hiword,hiwordtext);xInsertBefore(pn,before,node);xInsertBefore(pn,hiword,node);xInsertBefore(pn,after,node);xRemoveChild(pn,node);HILI_COUNT++;}}}catch(e){alert('Ungültige Eingabe im Suche-Feld\n'+e.description+'\n\nDer Suchbegriff wird nicht markiert.');return false;}}
return true;}
var HILI_STATE_ON=false;var HILI_COUNT=0;function MarkSearch(){if(HILI_LIST.length==0){return;}
var o=xGetElementById('wikitext');if(!o){return;}
DoMarkSearch(o,HILI_LIST);o=xGetElementById('moreinfos');if(o){DoMarkSearch(o,HILI_LIST);}
HILI_STATE_ON=true;}
function DoMarkSearch(aHtmlObj,aSearchList){var n=aSearchList.length/2;var c=0;for(var i=0;i<aSearchList.length;i+=2){var pattern=aSearchList[i+1];if(aSearchList[i]==1){highlightRegExp(aHtmlObj,pattern,c);}else{highlightWord(aHtmlObj,decodeHtml(pattern).toLowerCase(),c);}
c++;}}
function ToggleMarks(){var tags=xGetElementsByTagName('span');if(tags.length>0&&xDef(tags[0].className)){if(HILI_STATE_ON){for(var i=0;i<tags.length;i++){if(xDef(tags[i].className)&&tags[i].className.substr(0,10)=='searchword'){tags[i].className='_'+tags[i].className;}}}else{for(var i=0;i<tags.length;i++){if(xDef(tags[i].className)&&tags[i].className.substr(0,11)=='_searchword'){tags[i].className=tags[i].className.substr(1,11);}}}
HILI_STATE_ON=!HILI_STATE_ON;}}
xOnLoad(MarkSearch);// 

var LTAPhSText='Angst- und Panikhilfe Schweiz';var LTSearch='Suchen';var LTContent='Inhalt';var LTWorkplace='Mitarbeiter-Bereich';var LTContact='Kontakt';var LTGift='Spenden';var LTPrint='Druckansicht';var LTMailTo='Mail an';var LTMailToAPhS='Mail an APhS';var LTPath='Pfad';var LTStartOfPage='Seitenanfang';var LTLastChange='Zuletzt geändert am';var LTDays=['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'];var LTMonths=['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];function wd(x){return x;}
function xwd(x){var s=''+x;s=s.replace(/\>/g,'&gt;');s=s.replace(/\</g,'<br>&lt;');return s;}
function w(){for(var i=0;i<w.arguments.length;i++){document.write(wd(w.arguments[i]));}}
function wl(){for(var i=0;i<wl.arguments.length;i++){document.write(wd(wl.arguments[i]));}document.writeln('');}
function CLayout()
{var level=0;if(CLayout.arguments.length>0){level=CLayout.arguments[0];}
this.SetLevel(level);this.Header='';this.SubHeader='';this.Mail='';this.VersionInfo='';this.Webmaster='Walter Bislin';this.Translator='';this.Lang='d';this.PdfUrl='';this.DefaultFile='index.html';this.ColWidth1='70%';this.ColWidth2='30%';this.WideBox=true;this.Valign='top';this.MarginLeft=24;this.Margin=12;this.PMargin=8;this.MarginRight=12;this.SmallHeader=false;this.DirWidth='';this.PathName=[];this.PathUrl=[];this.TopicName=[];this.TopicUrl=[];this.CurrentTopic=-1;this.CurrentDirItem=-1;this.HideSitemapLink=false;this.HideSearchLink=false;this.TitleWritten=false;this.NewVersionUsed=false;this.Column2Open=false;this.BodyOpen=false;this.PrinterLayout=(GetParam('dsp')=='printer');}
function GetParam(aName){var url=location.href;var p=url.indexOf('?');if(p>=0){var params=url.substr(p+1);if(params.length>0){var parList=params.split('&');for(var i=0;i<parList.length;i++){var par=parList[i];if(par.length>0){var items=par.split('=');if(items.length>=1&&items[0]==aName){return items[1];}}}}}
return'';}
function MakePrintUrl(){var url=location.href;var p=url.indexOf('?');var filename=url;var pars='';if(p>=0){filename=url.substr(0,p);pars=url.substr(p+1);p=pars.indexOf('#');if(p>=0){pars=pars.substr(0,p);}}
p=filename.lastIndexOf('/');if(p>=0){filename=filename.substr(p+1);}
if(GetParam('dsp')==''){if(pars!=''){pars+='&';}
pars+='dsp=printer';}
return filename+'?'+pars;}
function UpTo(aLevel){var s='';for(var i=aLevel;i>0;i--){s=s+'../';}
return s;}
CLayout.prototype.SetLevel=function(aLevel)
{this.Level=aLevel;this.Up=UpTo(aLevel);this.Root=this.Up;this.Home=this.Root+'index.asp';this.Stuff=this.Root+'stuff/';this.Pixel=this.Stuff+'pixel.gif';this.Pixel1='<img src="'+this.Pixel+'" width="1" height="1" alt="" border="0">';};CLayout.prototype.SetColumnWidths=function(w1,w2)
{this.ColWidth1=w1;this.ColWidth2=w2;};CLayout.prototype.PixelWH=function(w,h)
{return('<img src="'+this.Pixel+'" width="'+w+'" height="'+h+'" alt="" border="0">');};CLayout.prototype.SetPath=function()
{var a=this.SetPath.arguments;var alen=a.length;var level=alen-1;this.SetLevel(level);this.AddPath('Home',UpTo(level)+'index.asp');for(var i=0;i<alen-2;i++){level--;this.AddPath(a[i],UpTo(level)+'index.html');}
this.AddPath(a[alen-2],(a[alen-1]==this.DefaultFile)?'':this.DefaultFile);};CLayout.prototype.AddPath=function(aName,aUrl)
{var i=this.PathName.length;if(aName=='Infos'&&i==0){aName='Home';}
this.PathName[i]=aName;this.PathUrl[i]=aUrl;};CLayout.prototype.ReplacePath=function(aName,aUrl)
{var i=this.PathName.length-1;if(i<0){return;}
this.PathName[i]=aName;this.PathUrl[i]=aUrl;};CLayout.prototype.AddTopic=function(aName,aUrl)
{var i=this.TopicName.length;this.TopicName[i]=aName;this.TopicUrl[i]=aUrl;};CLayout.prototype.SetCurrentTopic=function(aTopic)
{if(typeof(aTopic)=='number'){if(aTopic>=0&&aTopic<=this.TopicUrl.length)
{this.CurrentTopic=aTopic-1;}}else{this.CurrentTopic=-1;for(var i=0;i<this.TopicName.length;i++){if(this.TopicName[i]==aTopic){this.CurrentTopic=i;return;}}}};CLayout.prototype.InitBody=function()
{if(!this.BodyOpen){wl('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');if(this.PrinterLayout){wl('<td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td>');wl('<td width="100%">',this.Pixel1,'</td>');wl('<td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td>');wl('</tr>');}else{wl('<td width="',this.MarginLeft,'">',this.PixelWH(this.MarginLeft,1),'</td>');wl('<td width="',this.ColWidth1,'">',this.Pixel1,'</td>');wl('<td width="',this.Margin,'">',this.PixelWH(this.Margin,1),'</td>');wl('<td width="',this.ColWidth2,'">',this.Pixel1,'</td>');wl('<td width="',this.MarginRight,'">',this.PixelWH(this.MarginRight,1),'</td>');wl('</tr>');}
this.BodyOpen=true;}};CLayout.prototype.BeginBody=function()
{this.WriteHeader();this.NewVersionUsed=true;};CLayout.prototype.Separator=function()
{if(this.Column2Open)
{if(this.PrinterLayout){wl('</td><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td></tr>');}else{wl('</td><td width="',this.MarginRight,'">',this.PixelWH(this.MarginRight,1),'</td></tr>');}
wl('</table>');this.BodyOpen=false;this.Column2Open=false;}
this.InitBody();wl('<tr><td colspan="5" background="',this.Stuff,'tlb.gif" align="right"><img src="',this.Stuff,'tl.gif" width="168" height="2" alt="" border="0"></td></tr>');wl('<tr><td colspan="5">',this.PixelWH(1,8),'</td></tr>');};CLayout.prototype.FirstColumn=function()
{var a=this.FirstColumn.arguments;var oAlign=' align="left"';var oValign=' valign="top"';for(var i=0;i<a.length;i++){if(a[i]=='center'){oAlign=' align="center"';}
if(a[i]=='right'){oAlign=' align="right"';}
if(a[i]=='middle'){oValign=' valign="middle"';}
if(a[i]=='bottom'){oValign=' valign="bottom"';}}
if(this.Column2Open)
{if(this.PrinterLayout){wl('</td><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td></tr>');}else{wl('</td><td width="',this.MarginRight,'">',this.PixelWH(this.MarginRight,1),'</td></tr>');}
wl('</table>');this.BodyOpen=false;this.Column2Open=false;}
this.InitBody();if(this.TitleWritten){this.WTitleEnd();wl('</td><td>',this.Pixel1,'</td></tr>');}
if(this.PrinterLayout){wl('<tr><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td><td',oValign,oAlign,' width="100%" class="maintext">');}else{wl('<tr><td width="',this.MarginLeft,'">',this.PixelWH(this.MarginLeft,1),'</td><td',oValign,oAlign,' width="',this.ColWidth1,'" class="maintext">');}};CLayout.prototype.NextColumn=function()
{var a=this.NextColumn.arguments;var oAlign=' align="left"';var oValign=' valign="'+this.Valign+'"';for(var i=0;i<a.length;i++){if(a[i]=='center'){oAlign=' align="center"';}
if(a[i]=='right'){oAlign=' align="right"';}
if(a[i]=='middle'){oValign=' valign="middle"';}
if(a[i]=='bottom'){oValign=' valign="bottom"';}}
if(this.PrinterLayout){wl('</td><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td></tr>');wl('<tr><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td><td id="layoutcol2"',oValign,oAlign,' width="100%" >');wl('<br>');}else{wl('</td><td width="',this.Margin,'">',this.PixelWH(this.Margin,1),'</td><td id="layoutcol2"',oValign,oAlign,' width="',this.ColWidth2,'">');}
this.TitleWritten=false;this.Column2Open=true;};CLayout.prototype.EndBody=function()
{if(this.BodyOpen){if(this.PrinterLayout){wl('</td><td width="',this.PMargin,'">',this.PixelWH(this.PMargin,1),'</td></tr>');}else{wl('</td><td width="',this.MarginRight,'">',this.PixelWH(this.MarginRight,1),'</td></tr>');}
wl('</table>');this.BodyOpen=false;}
this.WriteBottom();};CLayout.prototype.BeginTitle=function()
{this.InitBody();if(this.PrinterLayout){wl('<tr><td colspan="2">');}else{wl('<tr><td colspan="4">');}
this.WTitleStart();this.TitleWritten=true;};CLayout.prototype.WTitleStart=function()
{wl('<table border="0" cellspacing="0" cellpadding="0"><tr>');if(this.PrinterLayout){wl('<td>',this.PixelWH(this.PMargin,10),'</td>');}else{wl('<td>',this.PixelWH(this.MarginLeft,10),'</td>');}
wl('<td>',this.Pixel1,'</td>');wl('</tr><tr>');wl('<td>',this.Pixel1,'</td>');wl('<td valign="bottom">');};CLayout.prototype.WTitleEnd=function()
{wl('</td>');wl('</tr><tr>');wl('<td background="',this.Stuff,'tlb.gif">',this.Pixel1,'</td>');wl('<td background="',this.Stuff,'tlb.gif" align="right"><img src="',this.Stuff,'tl.gif" width="168" height="6" alt="" border="0"></td>');wl('</tr><tr>');wl('<td colspan="2">',this.PixelWH(1,20),'</td>');wl('</tr></table>');};CLayout.prototype.WriteHeader=function()
{var i,last,s,home;home=this.Home;if(this.PathName.length<=1){home=this.Root+'../index.html';}
if(this.Header==''){this.Header=LTAPhSText;}
if(this.PathName.length==0){this.AddPath('Home','');}
wl('<table border="0" cellspacing="0" cellpadding="0" width="100%">');if(!(this.SmallHeader||this.PrinterLayout)){wl('<tr>');wl('<td bgcolor="#FFFFFF" width="192" valign="top"><img src="',this.Stuff,'pixel.gif" width="192" height="16" alt="" border="0"></td>');wl('<td width="100%" align="right"><img src="',this.Stuff,'aphs.gif" width="190" height="16" alt="" border="0"></td>');wl('</tr><tr>');wl('<td colspan="2" bgcolor="#9FBCF5" background="',this.Stuff,'bg1.gif">');wl('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');wl('<td>',this.PixelWH(8,1),'</td>');wl('<td valign="middle" width="100%" class="hd1">');if(!this.PrinterLayout){i=0;if(!this.HideSearchLink){wl('<a target="_top" class="hd1" href="',this.Root,'search.html">',LTSearch,'</a>');i++;}
if(!this.HideSitemapLink){if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a target="_top" class="hd1" href="',this.Root,'sitemap.html">',LTContent,'</a>');i++;}
if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a target="_top" class="hd1" href="',this.Root,'mab/index.asp">',LTWorkplace,'</a>');i++;if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a target="_top" class="hd1" href="',this.Root,'infos/index.asp?page=Kontakt+Adressen+APhS">',LTContact,'</a>');i++;if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a target="_top" class="hd1" href="',this.Root,'infos/index.asp?page=Spendenkonto">',LTGift,'</a>');i++;if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a target="_top" class="hd1" href="',MakePrintUrl(),'">',LTPrint,'</a>');i++;if(this.PdfUrl!=''){if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
wl('<a class="hd1" target="_blank" href="',this.PdfUrl,'">PDF</a>');i++;}
if(this.Mail!=''){if(i>0){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');}
if(this.Mail=='aphs@aphs.ch'||this.Mail=='anlaufstelle@aphs.ch'){wl('<a class="hd1" href="',this.Root,'infos/index.asp?page=Keine+therapeutische+Beratung">',LTMailToAPhS,'</a>');i++;}else{wl('<a class="hd1" href="mailto:',this.Mail,'">',LTMailTo,' ',this.Mail,'</a>');i++;}}}
wl(this.PixelWH(1,13),'</td>');wl('<td valign="top"><img src="',this.Stuff,'it1.jpg" width="66" height="17" alt="" border="0"></td>');wl('</tr></table></td></tr>');}
wl('<tr>');wl('<td bgcolor="#3858F1" width="192" valign="top"><a target="_top" href="',home,'"><img src="',this.Stuff,'logo10jahre.jpg" width="192" height="49" alt="" border="0"></a></td>');wl('<td bgcolor="#3858F1" width="100%" background="',this.Stuff,'bg2.gif">');wl('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');if(this.SubHeader!=''){w('<td width="100%" class="hdh"><nobr>',this.SubHeader,'</nobr>');w('<br><span class="hdsh">',this.Header,'</span>');}else{w('<td width="100%" class="hdh"><nobr>',this.Header,'</nobr>');}
wl('</td>');wl('<td valign="top"><img src="',this.Stuff,'bgr.jpg" width="230" height="49" alt="" border="0"></td>');wl('</tr></table>');wl('</td>');wl('</tr><tr>');wl('<td colspan="2" bgcolor="#9FBCF5" background="',this.Stuff,'bg3.gif">');wl('<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr>');wl('<td>',this.PixelWH(8,1),'</td>');wl('<td valign="middle" width="100%" class="hd1">');wl(LTPath,': <a target="_top" class="hd1" href="',this.Home,'">Home</a>');last=this.PathName.length-1;s=0;if((last>=0)&&(this.PathName[0]=='Home')){s=1;}
for(i=s;i<=last;i++)
{wl('<img src="',this.Stuff,'harr.gif" width="11" height="9" alt="" border="0">');if(this.PathUrl[i]==''){wl('<span class="hd1">',htmlString(this.PathName[i]),'</span>');}else{wl('<a target="_top" class="hd1" href="',this.PathUrl[i],'">',htmlString(this.PathName[i]),'</a>');}}
if(this.PathUrl[last]!=''){wl('<img src="',this.Stuff,'harrb.gif" width="11" height="9" alt="" border="0">');}
wl(this.PixelWH(1,13),'</td>');wl('<td valign="top"><img src="',this.Stuff,'it2.jpg" width="66" height="17" alt="" border="0"></td>');wl('</tr></table></td></tr>');if(!(this.SmallHeader||this.PrinterLayout)){wl('<tr>');wl('<td bgcolor="#FFFFFF" width="192" valign="top"><img src="',this.Stuff,'logo5.jpg" width="192" height="10" alt="" border="0"></td>');wl('<td background="',this.Stuff,'bg4.gif">',this.PixelWH(1,10),'</td>');wl('</tr><tr>');last=this.TopicName.length-1;if(last<0||this.PrinterLayout){wl('<td valign="top"><img src="',this.Stuff,'logo6.jpg" width="192" height="17" alt="" border="0"></td>');wl('<td background="',this.Stuff,'bg5.gif">',this.PixelWH(1,17),'</td>');}else{wl('<td valign="top"><img src="',this.Stuff,'logo6l.jpg" width="192" height="17" alt="" border="0"></td>');wl('<td background="',this.Stuff,'bg5l.gif" align="right" valign="top">');wl('<table border="0" cellpadding="0" cellspacing="0"><tr>');for(i=0;i<=last;i++)
{if(this.CurrentTopic==i){wl('<td valign="top"><img src="',this.Stuff,'tbul.gif" width="36" height="17" alt="" border="0"></td>');wl('<td background="',this.Stuff,'tbum.gif" class="hdt">',this.TopicName[i]+this.PixelWH(1,13),'</td>');wl('<td valign="top"><img src="',this.Stuff,'tbur.gif" width="8" height="17" alt="" border="0"></td>');}else{wl('<td valign="top"><img src="',this.Stuff,'tbdl.gif" width="36" height="17" alt="" border="0"></td>');wl('<td bgcolor="#FFB640" background="',this.Stuff,'tbdm.gif"><a target="_top" class="hdt" href="',this.TopicUrl[i],'">',this.TopicName[i],'</a>',this.PixelWH(1,13),'</td>');wl('<td valign="top"><img src="',this.Stuff,'tbdr.gif" width="7" height="17" alt="" border="0"></td>');}}
wl('<td>',this.PixelWH(4,1),'</td>');wl('</tr></table>');wl('</td>');}
wl('</tr>');}
wl('</table>');};CLayout.prototype.WriteBottom=function()
{wl('<table border="0" cellspacing="0" cellpadding="0" width="100%">');if(!(this.SmallHeader||this.PrinterLayout)){wl('<tr><td>',this.PixelWH(1,24),'</td></tr>');}
wl('<tr><td bgcolor="#9FBCF5" background="',this.Stuff,'bg3.gif">');wl('<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>');wl('<td valign="top"><img src="',this.Stuff,'it1.jpg" width="66" height="17" boder="0" alt=""></td>');wl('<td align="center" valign="middle" class="hd1" width="100%">');if(!this.PrinterLayout){wl('<a class="hd1" href="#">',LTStartOfPage,'</a>');wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');wl('<a target="_top" class="hd1" href="',this.Home,'">Home</a>');wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');wl('<a target="_top" class="hd1" href="',this.Root,'search.html">',LTSearch,'</a>');wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');wl('<a target="_top" class="hd1" href="',this.Root,'sitemap.html">',LTContent,'</a>');if(this.Mail!=''){wl('<img src="',this.Stuff,'hdot.gif" width="11" height="7" alt="" border="0">');if(this.Mail=='aphs@aphs.ch'||this.Mail=='anlaufstelle@aphs.ch'){wl('<a class="hd1" href="',this.Root,'infos/index.asp?page=Keine+therapeutische+Beratung">',LTMailToAPhS,'</a>');}else{wl('<a class="hd1" href="mailto:',this.Mail,'">',LTMailTo,' ',this.Mail,'</a>');}}}
wl(this.PixelWH(1,13),'</td>');wl('<td valign="top"><img src="',this.Stuff,'it1.jpg" width="66" height="17" boder="0" alt=""></td>');wl('</tr></table></td></tr>');if(this.VersionInfo==''){var coders=this.Webmaster+((this.Translator)?(','+this.Translator):'');wl('<tr><td align="right" class="cr" background="',this.Stuff,'fbg2.gif">',MemberLink(coders,this.Root,'cr',LTLastChange+' '+GermanDate(document.lastModified)+' - '),this.PixelWH(8,13),'<br>&nbsp;</td></tr>');}else{wl('<tr><td align="right" class="cr" background="',this.Stuff,'fbg2.gif">',this.VersionInfo,this.PixelWH(8,13),'<br>&nbsp;</td></tr>');}
wl('</table>');};function MemberLink(aNicks,aRoot,aClass,aHeadText)
{var nicks=aNicks.split(',');var ret='';for(var i=0;i<nicks.length;i++){if(i>0){ret+=', ';}
ret+='<a '+((aClass)?('class="'+aClass+'" '):'')+'href="'+aRoot+'user/index.asp?page='+nicks[i]+'">'+
((i==0&&aHeadText)?aHeadText:'')+nicks[i]+'</a>';}
return ret;}
function GermanDate(aDateStr)
{var dLM=new Date(Date.parse(aDateStr));var date=dLM.getDate();var day=LTDays[dLM.getDay()];var year=dLM.getFullYear();var month=LTMonths[dLM.getMonth()];var hours=dLM.getHours();var minutes=dLM.getMinutes();if(hours<10){hours="0"+hours;}
if(minutes<10){minutes="0"+minutes;}
return day+', '+date+'. '+month+' '+year+' - '+hours+':'+minutes;}
CLayout.prototype.OpenBox=function(aWidth)
{if(aWidth&&aWidth!=''){wl('<table border="0" cellpadding="0" cellspacing="0" width="',aWidth,'" background="',this.Stuff,'tbbg.jpg">');}else{wl('<table border="0" cellpadding="0" cellspacing="0" background="',this.Stuff,'tbbg.jpg">');}
wl('<tr>');wl('<td width="2"><img src="',this.Stuff,'x11.gif" width="2" height="2" alt="" border="0"></td>');wl('<td width="20"><img src="',this.Stuff,'x11.gif" width="20" height="2" alt="" border="0"></td>');if(aWidth&&aWidth!=''){wl('<td width="100%" bgcolor="#C7CDFF" background="',this.Stuff,'x11.gif">',this.Pixel1,'</td>');}else{wl('<td bgcolor="#C7CDFF" background="',this.Stuff,'x11.gif">',this.Pixel1,'</td>');}
wl('<td width="20"><img src="',this.Stuff,'x11.gif" width="20" height="2" alt="" border="0"></td>');wl('<td width="8"><img src="',this.Stuff,'x14.gif" width="8" height="2" alt="" border="0"></td>');wl('</tr>');wl('<tr>');wl('<td background="',this.Stuff,'x11.gif">',this.Pixel1,'</td>');wl('<td colspan="3">',this.PixelWH(1,6),'</td>');wl('<td background="',this.Stuff,'x34.gif" valign="top"><img src="',this.Stuff,'x24.gif" width="8" height="6" border="0" alt=""></td>');wl('</tr>');wl('<tr>');wl('<td background="',this.Stuff,'x11.gif">',this.Pixel1,'</td>');wl('<td>',this.Pixel1,'</td>');wl('<td>');};CLayout.prototype.CloseBox=function()
{wl('</td>');wl('<td>',this.Pixel1,'</td>');wl('<td background="',this.Stuff,'x34.gif" valign="top">',this.Pixel1,'</td>');wl('</tr>');wl('<tr>');wl('<td background="',this.Stuff,'x11.gif">',this.Pixel1,'</td>');wl('<td colspan="3">',this.PixelWH(1,6),'</td>');wl('<td background="',this.Stuff,'x34.gif" valign="top">',this.Pixel1,'</td>');wl('</tr>');wl('<tr>');wl('<td><img src="',this.Stuff,'x41.gif" width="2" height="8" alt="" border="0"></td>');wl('<td colspan="3" bgcolor="#C7CDFF" background="',this.Stuff,'x43.gif" align="left"><img src="',this.Stuff,'x42.gif" width="6" height="8" border="0" alt=""></td>');wl('<td><img src="',this.Stuff,'x44.gif" width="8" height="8" alt="" border="0"></td>');wl(' </tr>');wl(' </table>');};CLayout.prototype.DirPrevNext=function()
{var plink='',ptext='',nlink='',ntext='';var mark=this.CurrentDirItem;if(mark<0){mark=0;}
var mp=(mark-1)*3;var mn=(mark+1)*3;if(mp>=0){ptext=this.DirItem[mp+1];plink=this.DirItem[mp+2];}
if(mn<this.DirItem.length){ntext=this.DirItem[mn+1];nlink=this.DirItem[mn+2];}
this.PrevNext(plink,ptext,nlink,ntext);};CLayout.prototype.PrevNext=function(plink,ptext,nlink,ntext)
{if(this.PrinterLayout){return;}
wl('<table border="0" cellspacing="0" cellpadding="0"><tr>');if(plink!=''){wl('<td align="left"><a href="',plink,'"><img src="',this.Stuff,'prev.gif" width="38" height="33" alt="',ptext,'" hspace="12px" border="0"></a></td>');}
if(nlink!=''){wl('<td align="right"><a href="',nlink,'"><img src="',this.Stuff,'next.gif" width="38" height="33" alt="',ntext,'" hspace="12px" border="0"></a></td>');}
wl('</tr></table>');};CLayout.prototype.DefDirA=function(aData)
{var mark=aData[0];if(typeof(mark)!='number'){var mn=0;for(var ii=3;ii<aData.length;ii+=3){if(aData[ii]==mark){mark=mn;break;}
mn++;}
if(mark!=mn){mark=-1;}}
this.CurrentDirItem=mark;this.DirItem=[];for(var i=1;i<aData.length;i++){this.DirItem[i-1]=aData[i];}};CLayout.prototype.DefDir=function(mark)
{this.DefDirA(this.DefDir.arguments);};CLayout.prototype.Dir=function(mark)
{this.DefDirA(this.Dir.arguments);this.WriteDir();};CLayout.prototype.WriteDir=function()
{if(this.PrinterLayout){return;}
var a=this.DirItem;var mark=this.CurrentDirItem;if(mark<0){mark=0;}
var i=0;var m=mark*3;var bgc,clss;var wd='';var sp=(mark>=0)?1:1;if(this.DirWidth==''){wd=this.NewVersionUsed?' width="100%"':' width="90%"';}else{wd=' width="'+this.DirWidth+'"';}
this.DirWidth='';if(a[1]==''){i+=3;}
wl('<table class="dir" border="0" cellpadding="0" cellspacing="',sp,'"',wd,'>');while(i<a.length)
{if((i==3)&&(mark<0)&&(a[1]=='')){wl('<tr><td bgcolor="#4060FF">',this.Pixel1,'</td></tr>');}
w('<tr>');if(mark>=0)
{w('<td width="12" valign="top">');if(i==m){w('<img src="',this.Stuff,'mark.gif" border="0" alt="" width="12" height="13">');}else{w(this.Pixel1);}
wl('</td>');}
bgc=((m==i))?'bgcolor="#DDDDFF"':'bgcolor="#EBEBFF"';if(i==0){bgc='bgcolor="#4245FF" background="'+this.Stuff+'mb.gif"';}
clss=(i==0)?'ch':'c';if((mark<0)&&(a[1]=='')){clss=clss+'b';}
if(a[i+1]==''){wl('<td background="',this.Stuff,'ddt.gif">',this.Pixel1,'</td>');}else{wl('<td valign="top" ',bgc,' class="pad',a[i],'">');wl('<a target="_top" class="',clss,'" href="',a[i+2],'">',a[i+1],'</a>');}
wl('</td></tr>');i+=3;}
if(mark>=0){wl('<tr><td>',this.Pixel1,'</td><td bgcolor="#4060FF">',this.Pixel1,'</td></tr>');wl('<tr><td>',this.Pixel1,'</td><td>&nbsp;</td></tr>');}else{wl('<tr><td bgcolor="#4060FF">',this.Pixel1,'</td></tr>');}
wl('</table>');};CLayout.prototype.PopupDict=function(keyword)
{PopupDict(this.Root+'dict/'+keyword+'.html');};function PopupDict(link)
{Popup('dict',link,512,312);}
CLayout.prototype.PopupSrc=function(nr)
{PopupSrc('src_'+nr+'.html');};CLayout.prototype.PopupName=function(nam)
{PopupSrc(nam+'.html');};function PopupSrc(link)
{Popup('src',link,472,312);}
CLayout.prototype.PopupPic=function(link,w,h)
{Popup('pic',link,w+16,h+48);};function Popup(wnam,link,w,h)
{var left=(screen.width-w)/2;if(left<0){left=0;}
var top=(screen.height-h)/2;if(top<0){top=0;}
var parameter='width='+w+',height='+h+',left='+left+',top='+top+',scrollbars=auto,resizable=yes,status=no,menubar=no';fenster=window.open(link,wnam,parameter);fenster.focus();}
CLayout.prototype.BoxStart=function(aHead)
{if(this.Column2Open){if(this.WideBox){wl('<table border="0" cellpadding="0" cellspacing="0" width="100%">');wl('<colgroup><col width="14"><col width="26"><col width="100%"></colgroup>');wl('<tr><td>',this.PixelWH(14,1),'</td><td>',this.PixelWH(26,1),'</td><td width="100%">',this.Pixel1,'</td></tr>');}else{wl('<table border="0" cellpadding="0" cellspacing="0">');wl('<colgroup><col width="14"><col width="26"><col></colgroup>');wl('<tr><td>',this.PixelWH(14,1),'</td><td>',this.PixelWH(26,1),'</td><td>',this.Pixel1,'</td></tr>');}
if(aHead!=''){wl('<tr><td>',this.PixelWH(14,1),'</td><td colspan="2">');wl('<p class="bxhd">'+aHead+'</p>');wl('</td></tr>');wl('<tr><td>',this.PixelWH(1,8),'</td><td>',this.PixelWH(26,1),'</td><td>',this.Pixel1,'</td></tr>');}else{wl('<tr><td>',this.PixelWH(14,1),'</td><td>',this.PixelWH(26,1),'</td><td>',this.Pixel1,'</td></tr>');}}else{if(this.WideBox){wl('<table border="0" cellpadding="0" cellspacing="0" width="100%">');wl('<colgroup><col width="26"><col width="100%"></colgroup>');}else{wl('<table border="0" cellpadding="0" cellspacing="0">');wl('<colgroup><col width="26"><col></colgroup>');}
if(aHead!=''){wl('<tr><td colspan="2">');wl('<p class="bxhd">'+aHead+'</p>');wl('</td></tr>');wl('<tr><td>',this.PixelWH(26,8),'</td><td>',this.Pixel1,'</td></tr>');}else{wl('<tr><td>',this.PixelWH(26,1),'</td><td>',this.Pixel1,'</td></tr>');}}
this.FirstEle=true;};CLayout.prototype.BoxEnd=function()
{if(this.Column2Open){wl('<tr><td colspan="3" class="bxe">&nbsp;</td></tr>');wl('</table>');}else{wl('<tr><td colspan="2" class="bxe">&nbsp;</td></tr>');wl('</table>');}
this.FirstEle=false;};CLayout.prototype.BoxEle=function(aSym,aText)
{if(aSym==''){aSym=this.Pixel1;}
if(aSym=='bull'){aSym='<img src="'+this.Stuff+'bull.gif" width="17" height="14" border="" alt="">';}
if(aSym=='arr'){aSym='<img src="'+this.Stuff+'barr.gif" width="19" height="14" border="" alt="">';}
if(this.Column2Open){if(this.FirstEle){this.FirstEle=false;}else{wl('<tr><td colspan="3">',this.PixelWH(1,8),'</td></tr>');}
wl('<tr>');wl('<td>',this.Pixel1,'</td>');if(aSym=='none'){wl('<td colspan="2" valign="top" class="bxtx">',aText,'</td>');}else{wl('<td valign="top" align="right">',aSym,'</td>');wl('<td valign="top">',aText,'</td>');}
wl('</tr>');}else{if(this.FirstEle){this.FirstEle=false;}else{wl('<tr><td colspan="2">',this.PixelWH(1,8),'</td></tr>');}
wl('<tr>');if(aSym=='none'){wl('<td colspan="2" valign="top">',aText,'</td>');}else{wl('<td valign="top" align="right">',aSym,'</td>');wl('<td valign="top">',aText,'</td>');}
wl('</tr>');}};CLayout.prototype.DivBox=function(aHtml)
{wl('<table border="0" cellpadding="0" cellspacing="0" width="100%">');wl('<tr>');wl('<td width="100%">',aHtml,'</td>');wl('</tr>');wl('<tr><td class="bxe">&nbsp;</td></tr>');wl('</table>');};CLayout.prototype.DivBoxOpen=function()
{var saveWideBox=this.WideBox;this.WideBox=true;this.BoxStart('');wl('<tr>');if(this.Column2Open){wl('<td>',this.Pixel1,'</td>');}
wl('<td colspan="2" valign="top">');this.WideBox=saveWideBox;};CLayout.prototype.DivBoxClose=function()
{wl('</td>');wl('</tr>');this.BoxEnd();};CLayout.prototype.AutorBox=function(aHead)
{var text,date,bull;var a=this.AutorBox.arguments;var i=1;this.BoxStart(aHead);while(i<a.length)
{text=a[i++];bull='bull';if(text=='marco'){text='<a target="_top" href="'+this.Root+'user/index.asp?page=Marco+Todesco">Marco Todesco</a>';}
if(text.indexOf('wabis')==0){text=text.replace(/wabis/,'<a target="_top" href="'+this.Root+'user/index.asp?page=Walter+Bislin">Walter Bislin</a>');}
if(text.indexOf('<a')==0){bull='arr';}
date=(i<a.length)?a[i++]:'';if(date!=''){text=text+'<br><span class="bxurl">'+date+'</span>';}
this.BoxEle(bull,text);}
this.BoxEnd();};CLayout.prototype.ListBoxNoPrint=function(aTitle)
{if(this.PrinterLayout){return;}
var a=this.ListBoxNoPrint.arguments;var i;this.BoxStart(aTitle);for(i=1;i<a.length;i++)
{this.BoxEle('bull',a[i]);}
this.BoxEnd();};CLayout.prototype.ListBox=function(aTitle)
{var a=this.ListBox.arguments;var i;this.BoxStart(aTitle);for(i=1;i<a.length;i++)
{this.BoxEle('bull',a[i]);}
this.BoxEnd();};function firstIndexOf(aString,aChars,aStart)
{var nChars=aChars.length;var first=aString.length;for(var i=0;i<nChars;i++){var p=aString.indexOf(aChars.charAt(i),aStart);if((p>=0)&&(p<first)){first=p;}}
if(first==aString.length){first=-1;}
return first;}
function SliceString(aString,aSep,aSlice,aMaxSize)
{var ret,p1,p2;ret='';p2=-1;do{if(aString.length<=aMaxSize){ret=ret+aString;return ret;}
do{p1=p2;p2=firstIndexOf(aString,aSep,p1+1);if(p2==-1)p2=aMaxSize;}while(p2<aMaxSize);if(p1==-1){p1=p2;}
ret=ret+aString.slice(0,p1+1)+aSlice;aString=aString.slice(p1+1);p2=-1;}while(aString.length>0);return ret;}
CLayout.prototype.LinkBox=function(aTitle)
{var a=this.LinkBox.arguments;var i,url,url1,url2,hd,hd1,hd2,p1,p2;this.BoxStart(aTitle);for(i=1;i<a.length;i++)
{hd=a[i++];url=a[i];if(url==''){this.BoxEle('bull',hd);}else{p1=url.indexOf('://');if(p1==-1){url='http://'+url;p1=url.indexOf('://');}
p1+=3;p2=url.indexOf('/',p1);if(p2==-1){url=url+'/';p2=url.indexOf('/',p1);}
if(hd==''){hd=url.slice(p1,p2);}
if(this.Column2Open){url1=url.slice(0,p1)+SliceString(url.slice(p1),'/?&+=','<br>',34);}else{url1=url;}
p1=hd.indexOf('|');if(p1>0){hd1=hd.slice(0,p1);hd2=hd.slice(p1+1);hd='<a target="_blank" href="'+url+'">'+hd1+'</a><span class="small">'+hd2+'</span>';}else{p1=hd.indexOf('<br>');if(p1>0){hd1=hd.slice(0,p1);hd2=hd.slice(p1);hd='<a target="_blank" href="'+url+'">'+hd1+'</a><span class="small">'+hd2+'</span>';}else{hd='<a target="_blank" href="'+url+'">'+hd+'</a>';}}
this.BoxEle('arr',hd+'<br><span class="bxurl"><nobr>'+url1+'</nobr></span>');}}
this.BoxEnd();};CLayout.prototype.LocalLinkBox=function(aTitleOrArray)
{if(this.PrinterLayout){return;}
var a=this.LocalLinkBox.arguments;var i,url,hd,hd1,hd2,p1;if(typeof(aTitleOrArray)=='object'){a=aTitleOrArray;}
var aTitle=a[0];this.BoxStart(aTitle);for(i=1;i<a.length;i++)
{hd=a[i++];url=a[i];if(url==''){this.BoxEle('bull',hd);}else{p1=hd.indexOf('|');if(p1>0){hd1=hd.slice(0,p1);hd2=hd.slice(p1+1);hd='<a target="_top" href="'+url+'">'+hd1+'</a><span class="small">'+hd2+'</span>';}else{p1=hd.indexOf('<br>');if(p1>0){hd1=hd.slice(0,p1);hd2=hd.slice(p1);hd='<a target="_top" href="'+url+'">'+hd1+'</a><span class="small">'+hd2+'</span>';}else{hd='<a target="_top" href="'+url+'">'+hd+'</a>';}}
this.BoxEle('arr',hd);}}
this.BoxEnd();};CLayout.prototype.TextBox=function(aTitle,aText)
{if(this.PrinterLayout){return;}
this.BoxStart(aTitle);this.BoxEle('none',aText);this.BoxEnd();};CLayout.prototype.GPicBox=function(aTitle,aPicSrc,aPicW,aPicH,aPicAlt,aBigPicSrc,aSym)
{var pic,saveWideBox;saveWideBox=this.WideBox;this.WideBox=false;this.BoxStart(aTitle);pic='<img src="'+aPicSrc+'" border="0" width="'+aPicW+'" height="'+aPicH+'" alt="'+aPicAlt+'">';if(aBigPicSrc){pic='<a target="_top" href="'+aBigPicSrc+'">'+pic+'</a>';}
this.BoxEle(aSym,pic);this.BoxEnd();this.WideBox=saveWideBox;};CLayout.prototype.PicBox=function(aTitle,aPicSrc,aPicW,aPicH,aPicAlt,aBigPicSrc)
{this.GPicBox(aTitle,aPicSrc,aPicW,aPicH,aPicAlt,aBigPicSrc,'');};CLayout.prototype.WPicBox=function(aTitle,aPicSrc,aPicW,aPicH,aPicAlt,aBigPicSrc)
{this.GPicBox(aTitle,aPicSrc,aPicW,aPicH,aPicAlt,aBigPicSrc,'none');};CLayout.prototype.OpenForm=function(aTitle,aWidth)
{var a=this.OpenForm.arguments;var tdw='',al='';if(aWidth!=''){aWidth='width="'+aWidth+'"';tdw='width="100%"';}
if(a.length>2){al='align="'+a[2]+'"';}
wl('<table ',aWidth,' ',al,' border="0" cellpadding="0" cellspacing="0">');if(aTitle!=''){wl('<tr>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('<td bgcolor="#8C98E5" ',tdw,'>',this.Pixel1,'</td>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('</tr>');wl('<tr>');wl('<td bgcolor="#0020BD">',this.PixelWH(12,20),'</td>');wl('<td bgcolor="#0020BD" class="frmhd">',aTitle,'</td>');wl('<td bgcolor="#0020BD">',this.PixelWH(12,20),'</td>');wl('</tr>');}else{wl('<tr>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('<td bgcolor="#8C98E5" ',tdw,'>',this.Pixel1,'</td>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('</tr>');}
wl('<tr>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(1,4),'</td>');wl('<td bgcolor="#E0E0FF">',this.Pixel1,'</td>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(1,4),'</td>');wl('</tr>');wl('<tr>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(12,20),'</td>');wl('<td bgcolor="#E0E0FF">');};CLayout.prototype.CloseForm=function()
{wl('</td>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(12,20),'</td>');wl('</tr>');wl('<tr>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(1,4),'</td>');wl('<td bgcolor="#E0E0FF">',this.Pixel1,'</td>');wl('<td bgcolor="#E0E0FF">',this.PixelWH(1,4),'</td>');wl('</tr>');wl('<tr>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('<td bgcolor="#8C98E5">',this.Pixel1,'</td>');wl('<td bgcolor="#8C98E5">',this.PixelWH(12,2),'</td>');wl('</tr>');wl('</table>');};CLayout.prototype.Button=function(aType,aName,aCaption,aAction,aWidth)
{var nm='',wd='',ac='';var tp='type="'+aType+'" ';var cp='value="'+aCaption+'" ';if(aName!=''){nm='name="'+aName+'" ';}
if(aAction!=''){ac='onclick="'+aAction+'" ';}
if(aWidth>0){wd='style="width:'+aWidth+'px;" ';}
return('<input class="button" '+tp+nm+cp+wd+ac+'>');};CLayout.prototype.NewItem=function(expiryDate)
{var exp=new Date(expiryDate);var cur=new Date();var ret='';if(cur.getTime()<exp.getTime()){ret='<img src="'+this.Stuff+'new.gif" width="32" height="16" border="0" alt="Neu">';}
return ret;};function htmlString(s){s=s.replace(/</g,'&lt;');s=s.replace(/>/g,'&gt;');return s;}