useTimeouts=1;timeoutLength=1000;shutdownOnClick=0;loaded=0;layersMoved=0;layerPoppedUp="";timeoutFlag=0;if(Opera56||IE4){useTimeouts=0}if(NS4||Opera56||IE4){shutdownOnClick=1}currentY=0;function grabMouse(a){currentY=a.pageY}if(NS4){document.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE);document.onmousemove=grabMouse}function seeThroughElements(a){if(a){foobar="visible"}else{foobar="hidden"}for(i=0;i<toBeHidden.length;i++){toBeHidden[i].style.visibility=foobar}}function shutdown(){for(i=0;i<numl;i++){LMPopUpL(listl[i],false)}layerPoppedUp="";if(Konqueror||IE5){seeThroughElements(true)}}if(shutdownOnClick){if(NS4){document.onmousedown=shutdown}else{document.onclick=shutdown}}function setLMTO(){if(useTimeouts){timeoutFlag=setTimeout("shutdown()",timeoutLength)}}function clearLMTO(){if(useTimeouts){clearTimeout(timeoutFlag)}}function moveLayerX(a){if(!loaded||(isVisible(a)&&a!=layerPoppedUp)){return}if(father[a]!=""){if(!Opera5&&!IE4){width0=lwidth[father[a]];width1=lwidth[a]}else{if(Opera5){width0=abscissaStep;width1=abscissaStep}else{if(IE4){width0=getOffsetWidth(father[a]);width1=getOffsetWidth(a)}}}onLeft=getOffsetLeft(father[a])-width1+menuLeftShift;onRight=getOffsetLeft(father[a])+width0-menuRightShift;windowWidth=getWindowWidth();windowXOffset=getWindowXOffset();if(onLeft<windowXOffset&&onRight+width1>windowWidth+windowXOffset){if(onRight+width1-windowWidth-windowXOffset>windowXOffset-onLeft){onLeft=windowXOffset}else{onRight=windowWidth+windowXOffset-width1}}if(back[father[a]]){if(onLeft<windowXOffset){back[a]=0}else{back[a]=1}}else{if(onRight+width1>windowWidth+windowXOffset){back[a]=1}else{back[a]=0}}if(back[a]){setLeft(a,onLeft)}else{setLeft(a,onRight)}}moveLayerY(a)}function moveLayerY(a){if(!loaded||(isVisible(a)&&a!=layerPoppedUp)){return}if(!layersMoved){moveLayers();layersMoved=1}if(!NS4){newY=getOffsetTop("ref"+a)}else{newY=currentY}newY+=menuTopShift;layerHeight=getOffsetHeight(a);windowHeight=getWindowHeight();windowYOffset=getWindowYOffset();if(newY+layerHeight>windowHeight+windowYOffset){if(layerHeight>windowHeight){newY=windowYOffset}else{newY=windowHeight+windowYOffset-layerHeight}}if(Math.abs(getOffsetTop(a)-newY)>thresholdY){setTop(a,newY)}}function moveLayerX1(a,b){if(!lwidthDetected){return}if(!Opera5&&!IE4){width1=lwidth[a]}else{if(Opera5){width1=abscissaStep}}foobar=getOffsetLeft(b+a);if(!IE4){windowWidth=getWindowWidth();windowXOffset=getWindowXOffset();if(foobar+width1>windowWidth+windowXOffset){foobar=windowWidth+windowXOffset-width1}if(foobar<windowXOffset){foobar=windowXOffset}}setLeft(a,foobar)}function layersOverlap(b,a){if(Konqueror22){return true}xa1=layerLeft[b];xa2=xa1+getOffsetWidth(b);ya1=layerTop[b];ya2=ya1+getOffsetHeight(b);xb1=toBeHiddenLeft[a];xb2=xb1+toBeHidden[a].offsetWidth;yb1=toBeHiddenTop[a];yb2=yb1+toBeHidden[a].offsetHeight;if(xb1>xa1){xa1=xb1}if(xb2<xa2){xa2=xb2}if(yb1>ya1){ya1=yb1}if(yb2<ya2){ya2=yb2}return(xa2>xa1&&ya2>ya1)}function seeThroughWorkaround(b,a){for(i=0;i<toBeHidden.length;i++){if(layersOverlap(b,i)){if(a){toBeHidden[i].style.visibility="hidden"}else{toBeHidden[i].style.visibility="visible"}}}}function LMPopUpL(b,a){if(!loaded){return}if(!layersMoved){moveLayers();layersMoved=1}setVisibility(b,a)}function LMPopUp(b,a){if(!loaded||b==layerPoppedUp||(isVisible(b)&&!a)){return}if(b==father[layerPoppedUp]){LMPopUpL(layerPoppedUp,false)}else{if(father[b]==layerPoppedUp){LMPopUpL(b,true);seeThroughWorkaround(b,true)}else{shutdown();foobar=b;do{LMPopUpL(foobar,true);seeThroughWorkaround(foobar,true);foobar=father[foobar]}while(foobar!="")}}layerPoppedUp=b}function resizeHandler(){if(NS4){window.location.reload()}shutdown();for(i=0;i<numl;i++){setLeft(listl[i],0);setTop(listl[i],0)}if(toBeHidden!=null&&toBeHidden.length>0){seeThroughCoordinatesDetection()}layersMoved=0}window.onresize=resizeHandler;function yaresizeHandler(){if(window.innerWidth!=origWidth||window.innerHeight!=origHeight){if(Konqueror22||Opera5){window.location.reload()}origWidth=window.innerWidth;origHeight=window.innerHeight;resizeHandler()}setTimeout("yaresizeHandler()",500)}function loadHandler(){if(Konqueror22||Opera56){origWidth=window.innerWidth;origHeight=window.innerHeight;yaresizeHandler()}}window.onload=loadHandler;function fixieflm(a){if(DOM){setWidth(a,"100%")}else{document.write("</div>");document.write('<div id="IE4'+a+'" style="position: relative; width: 100%; visibility: visible;">')}};