DOM=(document.getElementById)?1:0;NS4=(document.layers)?1:0;Konqueror=(navigator.userAgent.indexOf("Konqueror")>-1)?1:0;Konqueror22=(navigator.userAgent.indexOf("Konqueror 2.2")>-1||navigator.userAgent.indexOf("Konqueror/2.2")>-1)?1:0;Konqueror30=(navigator.userAgent.indexOf("Konqueror 3.0")>-1||navigator.userAgent.indexOf("Konqueror/3.0")>-1||navigator.userAgent.indexOf("Konqueror 3;")>-1||navigator.userAgent.indexOf("Konqueror/3;")>-1||navigator.userAgent.indexOf("Konqueror 3)")>-1||navigator.userAgent.indexOf("Konqueror/3)")>-1)?1:0;Konqueror31=(navigator.userAgent.indexOf("Konqueror 3.1")>-1||navigator.userAgent.indexOf("Konqueror/3.1")>-1)?1:0;Konqueror32=(navigator.userAgent.indexOf("Konqueror 3.2")>-1||navigator.userAgent.indexOf("Konqueror/3.2")>-1)?1:0;Opera=(navigator.userAgent.indexOf("Opera")>-1)?1:0;Opera5=(navigator.userAgent.indexOf("Opera 5")>-1||navigator.userAgent.indexOf("Opera/5")>-1)?1:0;Opera6=(navigator.userAgent.indexOf("Opera 6")>-1||navigator.userAgent.indexOf("Opera/6")>-1)?1:0;Opera56=Opera5||Opera6;IE=(navigator.userAgent.indexOf("MSIE")>-1)?1:0;IE=IE&&!Opera;IE5=IE&&DOM;IE4=(document.all)?1:0;IE4=IE4&&IE&&!DOM;layerLeft=new Array();layerTop=new Array();function setVisibility(b,a){if(a){if(DOM){document.getElementById(b).style.visibility="visible"}else{if(NS4){document.layers[b].visibility="show"}else{document.all[b].style.visibility="visible"}}}else{if(DOM){document.getElementById(b).style.visibility="hidden"}else{if(NS4){document.layers[b].visibility="hide"}else{document.all[b].style.visibility="hidden"}}}}function isVisible(a){if(DOM){return(document.getElementById(a).style.visibility=="visible")}else{if(NS4){return(document.layers[a].visibility=="show")}else{return(document.all[a].style.visibility=="visible")}}}function setLeft(b,a){layerLeft[b]=a;if(DOM&&!Opera5){document.getElementById(b).style.left=a+"px"}else{if(Opera5){document.getElementById(b).style.left=a}else{if(NS4){document.layers[b].left=a}else{document.all[b].style.pixelLeft=a}}}}function getOffsetLeft(a){var b=0;if(DOM){object=document.getElementById(a);b=object.offsetLeft;while(object.tagName!="BODY"&&object.offsetParent){object=object.offsetParent;b+=object.offsetLeft}}else{if(NS4){b=document.layers[a].pageX}else{if(document.all["IE4"+a]){a="IE4"+a}object=document.all[a];b=object.offsetLeft;while(object.tagName!="BODY"){object=object.offsetParent;b+=object.offsetLeft}}}return(b)}function setTop(a,b){layerTop[a]=b;if(DOM&&!Opera5){document.getElementById(a).style.top=b+"px"}else{if(Opera5){document.getElementById(a).style.top=b}else{if(NS4){document.layers[a].top=b}else{document.all[a].style.pixelTop=b}}}}function getOffsetTop(a){var b=0;if(DOM){object=document.getElementById(a);b=object.offsetTop;while(object.tagName!="BODY"&&object.offsetParent){object=object.offsetParent;b+=object.offsetTop}}else{if(NS4){b=document.layers[a].pageY}else{if(document.all["IE4"+a]){a="IE4"+a}object=document.all[a];b=object.offsetTop;while(object.tagName!="BODY"){object=object.offsetParent;b+=object.offsetTop}}}return(b)}function setWidth(b,a){if(DOM){document.getElementById(b).style.width=a}else{if(NS4){}else{document.all[b].style.pixelWidth=a}}}function getOffsetWidth(a){var b=0;if(DOM&&!Opera56){b=document.getElementById(a).offsetWidth}else{if(NS4){b=document.layers[a].document.width}else{if(Opera56){b=document.getElementById(a).style.pixelWidth}else{if(document.all["IE4"+a]){a="IE4"+a}b=document.all[a].offsetWidth}}}return(b)}function setHeight(a,b){if(DOM){document.getElementById(a).style.height=b}else{if(NS4){}else{document.all[a].style.pixelHeight=b}}}function getOffsetHeight(a){var b=0;if(DOM&&!Opera56){b=document.getElementById(a).offsetHeight}else{if(NS4){b=document.layers[a].document.height}else{if(Opera56){b=document.getElementById(a).style.pixelHeight}else{if(document.all["IE4"+a]){a="IE4"+a}b=document.all[a].offsetHeight}}}return(b)}function getWindowWidth(){var a=0;if((DOM&&!IE)||NS4||Konqueror||Opera){a=top.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){a=document.documentElement.clientWidth}else{if(document.body){a=document.body.clientWidth}}}if(isNaN(a)){a=top.innerWidth}return(a)}function getWindowXOffset(){var a=0;if((DOM&&!IE)||NS4||Konqueror||Opera){a=window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){a=document.documentElement.scrollLeft}else{if(document.body){a=document.body.scrollLeft}}}return(a)}function getWindowHeight(){var a=0;if((DOM&&!IE)||NS4||Konqueror||Opera){a=top.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientHeight}else{if(document.body){a=document.body.clientHeight}}}if(isNaN(a)){a=top.innerHeight}return(a)}function getWindowYOffset(){var a=0;if((DOM&&!IE)||NS4||Konqueror||Opera){a=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}}return(a)}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;">')}}function setLMCookie(a,b){document.cookie=a+"="+b+";path=/"}function getLMCookie(a){foobar=document.cookie.split(a+"=");if(foobar.length<2){return null}tempString=foobar[1];if(tempString.indexOf(";")==-1){return tempString}yafoobar=tempString.split(";");return yafoobar[0]}function parseExpandString(){expandString=getLMCookie("phplm_expand");phplm_expand=new Array();if(expandString){expanded=expandString.split("|");for(i=0;i<expanded.length-1;i++){phplm_expand[expanded[i]]=1}}}function parseCollapseString(){collapseString=getLMCookie("phplm_collapse");phplm_collapse=new Array();if(collapseString){collapsed=collapseString.split("|");for(i=0;i<collapsed.length-1;i++){phplm_collapse[collapsed[i]]=1}}}parseExpandString();parseCollapseString();function saveExpandString(){expandString="";for(i=0;i<phplm_expand.length;i++){if(phplm_expand[i]==1){expandString+=i+"|"}}setLMCookie("phplm_expand",expandString)}function saveCollapseString(){collapseString="";for(i=0;i<phplm_collapse.length;i++){if(phplm_collapse[i]==1){collapseString+=i+"|"}}setLMCookie("phplm_collapse",collapseString)};
