var submnuStlId=0; var submnuMoStlId=0; var mnuStlId=0; var mnuMoStlId=0; var baseStr=""; var expl; window.alert('kalle') /*if(document.styleSheets.item(0).rules) { baseStr="document.styleSheets.item(0).rules" expl = true; } else { baseStr="document.styleSheets.item(0).cssRules" expl = false; } for (i=0;i<=eval(baseStr + '.length')-1;i++) { if(eval(baseStr + '.item(i).selectorText')==".Meny_mouseover"){ mnuMoStlId=i; } if(eval(baseStr + '.item(i).selectorText')==".Meny"){ mnuStlId=i; } if(eval(baseStr + '.item(i).selectorText')==".Meny"){ submnuStlId=i; } if(eval(baseStr + '.item(i).selectorText')==".Meny_mouseover"){ submnuMoStlId=i; } } if (!document.loadHandlers) { document.loadHandlers=new Array(); document.loadHandlers[0]='initializeMenu'; document.lastLoadHandler=0; } else { document.lastLoadHandler++; document.loadHandlers[document.lastLoadHandler]='initializeMenu'; } window.onload=initializeAll; var activePopup=null; var activePopupTimeout; var maxZ=1000; var popupFrame; var targetFrame; var docLoaded=false; var bIncBorder=true; bBitmapPopups=0; if(bBitmapPopups) bord=0; function createMenuItem(popup,id,itemLink,itemText,popupArray,bLast,popupHeight,parent) { var itemType=0; var itemWnd=createElementEx(popupFrame.document,popup,"span","id",id,null,null,"width",popupWidth-2*bord,null,null); itemWnd.innerHTML=itemText; addEvent(itemWnd,"mouseover",onItemOver,false); addEvent(itemWnd,"mouseout",onItemOut,false); addEvent(itemWnd,"mousedown",onItemClick,false); addEvent(itemWnd,"dblclick",onItemClick,false); itemWnd.owner=popup; with (itemWnd.style) { if(itemType==2)top=popupHeight-scrollHeight; else top=popupHeight; if(itemLink){cursor=(!IE4||version>=6)?"pointer":"hand";} else{cursor="default";} color=levelAttribs [3]; if (!bBitmapPopups) { if (!bLast) { borderBottomColor=borderCol; borderBottomWidth=sep; borderBottomStyle="solid"; } } else left=popupLeftPad+vertSpace; if (!itemType)padding=vertSpace; paddingLeft=popupLeftPad+vertSpace; paddingRight=(popupRightPad < iconSize?iconSize:popupRightPad)+vertSpace; //fontSize=levelAttribs[0]; //fontWeight=(levelAttribs[1])?"bold":"normal"; //fontStyle=(levelAttribs[2])?"italic":"normal"; //fontFamily=levelAttribs[6]; } if (popupArray)itemWnd.popupArray=popupArray; if(itemLink&&itemLink.indexOf(':/')==-1&&itemLink.indexOf(':\\')==-1) itemWnd.url=unescape(absPath)+itemLink; else itemWnd.url=itemLink; itemWnd.dispText=itemText; if (popupArray) { var leftImgPos=popupWidth-bord-iconSize-5; var topImgPos=itemWnd.offsetHeight/2-iconSize/2+popupHeight-2; txt="
"; txt+=""; itemWnd.insertAdjacentHTML("BeforeEnd",txt); } setStyle(itemWnd,submnuStlId) return itemWnd.offsetHeight; } function createPopupFromCode(arrayName,level) { var popupName=arrayName+"popup"; var popup=getElementById(popupFrame,popupName); if (popup)return popup; var levelAttribs; if (level > maxlev) {levelAttribs = eval ("lev" + maxlev) ;} else {levelAttribs = eval ("lev" + level) ;} popup=createElementEx(popupFrame.document,popupFrame.document.body,"DIV","id",popupName,null,null,"position","absolute",null,null); popup.level=level; //popup.highlightColor=levelAttribs[5]; //popup.normalColor=levelAttribs[3]; //popup.highlightBgColor=levelAttribs[7]; //popup.normalBgColor=levelAttribs[4]; popup.scrVis=false; with (popup.style) { zIndex=maxZ; width=popupWidth; if (!bBitmapPopups) { borderColor=borderCol; //backgroundColor=levelAttribs[4]; borderWidth=bord; borderStyle="solid"; } else backgroundColor=""; } addEvent(popup,"mouseout",onPopupOut,false); addEvent(popup,"mouseover",onPopupOver,false); var popupHeight=0; if (bBitmapPopups) { var source=getElementById(window,'menubg4'); if (source) { var imel=createElementEx(popupFrame.document,popup,"IMG","id",popup.id+"openingImg",null,null,"position","absolute",null,null); imel.src=source.src; imel.style.top=0; popupHeight+=popupOpenHeight; } } popup.style.backgroundColor=levelAttribs[4]; var array=eval(arrayName); var arrayItem; for(arrayItem=0;arrayItem < array.length/3;arrayItem++) { var popupArray=(array[arrayItem*3+2])?(arrayName+"_"+parseInt(arrayItem+1)):null; popupHeight+=createMenuItem(popup,null,array[arrayItem*3+1],array[arrayItem*3],popupArray,(arrayItem == array.length/3-1),popupHeight,popup); } popup.style.height=popupHeight+bord*2; popup.maxHeight=popupHeight+bord*2; var bottomImgHeight=0; if (bBitmapPopups) { var source=getElementById(window,'menubg6'); if (source) { var imel=createElementEx(popupFrame.document,popup,"IMG","id",popup.id+"closingImg",null,null,"position","absolute"); imel.src=source.src; imel.style.top=popupHeight-1; bottomImgHeight=imel.offsetHeight; } } return popup; } function closePopup(popupId) { if(popupId.indexOf('_')==-1){var hideWnd=getElementById(popupFrame,'HideItem');if(hideWnd)hideWnd.style.display='none';} var popup=getElementById(popupFrame,popupId); if (popup) { if (popup.expandedWnd) closePopup (popup.expandedWnd.id); popup.style.display="none"; } if (activePopup && activePopup.id==popupId) activePopup=null; } function absToRel(rect,refx,refy) { var retval=new rct(rect.left-refx,rect.top-refy,rect.right-refx,rect.bottom-refy); return retval; } function openPopup(popup,x,y,bDontMove,refWnd) { if(popupId.indexOf('_')==-1){var hideWnd=getElementById(popupFrame,'HideItem');if(hideWnd)hideWnd.style.display='';} popup.style.left=x; popup.style.top=y; popup.style.display=""; var popupRect=getClientRect(popup); var browserRect=getBrowserRect(popupFrame); var bResize=(popup.offsetHeightbrowserRect.right) { if(refWnd.id&&refWnd.id.indexOf('top')==-1)popup.style.left=Math.max(0,refWnd.offsetLeft-popupWidth+levelOffset); else popup.style.left=browserRect.right-popup.offsetWidth-5; } } function isChildOfActivePopup(popup) { var wnd=activePopup; while(wnd) { if (wnd.id==popup.id) { return true; } wnd=wnd.expandedWnd; } return false; } function onPopupOver() { if (activePopup && isChildOfActivePopup (this)) clearTimeout(activePopupTimeout); } function onPopupOut() { onPopupOutImpl(this); } function onPopupOutImpl(popup) { if (mout && activePopup && isChildOfActivePopup (popup)) { if (activePopupTimeout) clearTimeout (activePopupTimeout); activePopupTimeout=setTimeout("closePopup('"+activePopup.id+"');", closeDelay); } } function rct(left,top,right,bottom) { this.left=left; this.top=top; this.right=right; this.bottom=bottom; } function getBrowserRect(doc) { var left=0; var top=0; var right; var bottom; if(doc.pageXOffset)left=doc.pageXOffset; else if(doc.document.body.scrollLeft)left=doc.document.body.scrollLeft; if(doc.pageYOffset)top=doc.pageYOffset; else if(doc.document.body.scrollTop)top=doc.document.body.scrollTop; if(doc.innerWidth)right=left+doc.innerWidth; else if(doc.document.body.clientWidth)right=left+doc.document.body.clientWidth; if(doc.innerHeight)bottom=top+doc.innerHeight; else if(doc.document.body.clientHeight)bottom=top+doc.document.body.clientHeight; var retval=new rct(left,top,right,bottom); return retval; } function getClientRect(wnd) { var left=mac?document.body.leftMargin:0; var top=mac?document.body.topMargin:0; var right=0; var bottom=0; var par=wnd; while (par) { left+=par.offsetLeft; top+=par.offsetTop; if (par.offsetParent==par || par.offsetParent==popupFrame.document.body) break; par=par.offsetParent; } right=left+wnd.offsetWidth; bottom=top+wnd.offsetHeight; var retval=new rct(left,top,right,bottom); return retval; } function onItemClick() { var item=this; if (item.url) { var startPos=item.dispText.indexOf('',startPos); var trgFrame = item.dispText.substring (startPos+4,endPos); if (trgFrame=="_blank") window.open (item.url); else eval("parent.frames."+trgFrame).location.href=item.url; } else { var find=item.url.indexOf("javascript:"); if (find!=-1) eval(item.url.substring(find)); else { var mt=item.url.indexOf("mailto:"); if(mt!=-1)window.top.location=item.url.substring(mt); else targetFrame.location=item.url; } } if(activePopup)closePopup(activePopup.id); } } function onItemOver() { var item=this; if (item.owner.expandedWnd) { closePopup(item.owner.expandedWnd.id); } if (item.url&&item.url.indexOf("javascript:")==-1) window.status=item.url; else window.status=""; item.style.color=item.owner.highlightColor; item.style.backgroundColor=item.owner.highlightBgColor; setStyle(item,submnuMoStlId) if (item.popupArray) { var rect=getClientRect(item); var x=rect.right-levelOffset; var y=rect.top; var popup=createPopupFromCode(item.popupArray,item.owner.level+1); item.owner.expandedWnd=popup; openPopup(popup,x,y+2,false,item.owner); } } function onItemOut() { var item=this; setStyle(item,submnuStlId) } function createElementEx(ownerDocument,parent,tag,a1,av1,a2,av2,s1,sv1,s2,sv2) { var text="<"+tag+" "; if(a1)text+=a1+"="+av1+" "; if(a2)text+=a2+"="+av2+" "; if(s1||s2) { text+="style='"; if(s1)text+=s1+":"+sv1+";"; if(s2)text+=s2+":"+sv2+";"; text+="' "; } text+=">"; parent.insertAdjacentHTML("BeforeEnd",text); return(parent.children[parent.children.length-1]); } function createElement(ownerDocument,parent,tag) { parent.insertAdjacentHTML("BeforeEnd","<"+tag+"/>"); return(parent.children[parent.children.length-1]); } function getElementById(wnd,id) { if(id&&wnd)return eval ("wnd."+id); else return null; } function getElementsByTagName(parent,name) { if(parent) return parent.all.tags(name); else return null; } function expandMenu(popupId,refWnd,dum) { if(!docLoaded)return; clearTimeout(activePopupTimeout); if (activePopup&&activePopup.id!=popupId+"popup") closePopup(activePopup.id); if(popupId=='none')return; var posRef=getElementById(window,popupId+"top"); var rect=getClientRect(posRef); var x; var y; if(menuHorizontal) { x=rect.left; y=rect.bottom+1 /*popupOffset*/; } else { x=rect.right+1 /*popupOffset*/; y=rect.top; } if(sepFrame&&!openSameFrame) { var brRect=getBrowserRect(popupFrame); var wRect=getBrowserRect(window); switch (menuPos) { case 0: x=brRect.left; y+=brRect.top-wRect.top; break; case 1: x=brRect.right; y+=brRect.top-wRect.top; break; case 2: x+=brRect.left-wRect.left; y=brRect.top; break; case 3: x+=brRect.left-wRect.left; y=brRect.bottom; break; } } var popup=createPopupFromCode(popupId,0); openPopup(popup,x,y,true,posRef); activePopup=popup; } function collapseMenu(popupId) { if(!docLoaded)return; var popup=getElementById(popupFrame,popupId+"popup"); if(popup)onPopupOutImpl(popup); } function expandMenuNS(popupId,e,dItem) { } function collapseMenuNS(popupId) { } function onDocClick() { if(activePopup)closePopup(activePopup.id); } function findFrame(name) { if(parent.frames[name])return parent.frames[name]; var i; for(i=0;i