/* ------------------------------------------------------------------- */ /* FrameWork.js: jsRunAlways */ // Handle resize problems in Netscape, jk 2001-06-07 var reloadSuspended = 1 var refreshTimeoutID = 0 function suspendReload() // Handle bug in NS4.08, (onLoad triggers onResize) { reloadSuspended = 1 setTimeout('reloadSuspended = 0', 500); } function prepareReload() { if (navigator.appName.indexOf("Microsoft") >= 0) return if (reloadSuspended) return clearTimeout(refreshTimeoutID) refreshTimeoutID = setTimeout("location.reload()", 250) } // Kampanj var isLaunched = 0 function launch(doAlwaysOpen) { if (doAlwaysOpen || !isLaunched) { theWin = window.open("/kampanj/forstasidan.asp","new_win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=473") theWin.focus() isLaunched = 1 } } // Undersökning 020423 var numClick = 0; function launchForm() { if (numClick++ == 4) { theWin = window.open("http://www2.ic-potential.com/ea/surveyintro.php?sid=57&period=20020422","new_win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=650,height=473"); theWin.focus(); } } function openCreateMenu(strMenuType, strParentMenuId, strOrgId, strOrg1, strOrg2, strMenu1, strMenu2, strMenu3, strSite) { var sortOrder = ""; var strUrl = "/eprise/main/hgfopen/lists/list/createList1"; // do { // sortOrder = prompt("Sorterings order?", "99") // } while (sortOrder.length != 2 || !(parseInt(sortOrder, 10) >= 10 && parseInt(sortOrder, 10) <= 99)); sortOrder = 99 strUrl += "?menuLevel=" + escape(strMenuType); strUrl += "&parentmenuid=" + escape(strParentMenuId); strUrl += "&Order=" + escape(sortOrder); strUrl += "&site=" + strSite; strUrl += "&OrgID=" + strOrgId; // ""; strUrl += "&hgfOrgLevelOneId=" + strOrg1; // ""; strUrl += "&hgfOrgLevelTwoId=" + strOrg2; // ""; // if (0&& strMenuType == 1) { if (strMenuType == 1) { strUrl += "&menutype=" + escape("huvudingång"); // strUrl += "&hgfLevelOneId=" + ""; } else if (strMenuType == 2) { strUrl += "&menutype=" + escape("ingång"); strUrl += "&hgfLevelOneId=" + strMenu1; // ""; // strUrl += "&hgfLevelTwoId=" + strMenu2; // ""; } else if (strMenuType == 3) { strUrl += "&menutype=" + escape("undernivå"); strUrl += "&hgfLevelOneId=" + strMenu1; // ""; strUrl += "&hgfLevelTwoId=" + strMenu2; // ""; // strUrl += "&hgfLevelThreeId=" + ""; } else if (strMenuType == 4) { strUrl += "&menutype=" + escape("undernivå"); strUrl += "&hgfLevelOneId=" + strMenu1; // ""; strUrl += "&hgfLevelTwoId=" + strMenu2; // ""; strUrl += "&hgfLevelThreeId=" + strMenu3; //""; } else { alert("Error! strMenuType == '" + strMenuType + "'"); } // alert ("Debug info:\n\n" + strUrl) popupWindow(strUrl, 'addMenuItem','400','630','yes','yes','0','200'); } // Client-side function getCookie(name) { var search = name + "="; var retstr = ""; var offset = 0; var end = 0; if (document.cookie.length > 0) { do { offset = document.cookie.indexOf(search, offset); } while (!(offset < 0 || offset == 0 || document.cookie.charAt(offset - 1) == " " || document.cookie.charAt(offset - 1) == ";" )) if (offset != -1) { offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; retstr = unescape(document.cookie.substring(offset, end)); } } return(retstr) } function kampanjpopup(page) { window.open(page,'popup','width=760,height=575,scrollbars=no,toolbar=no,resizable=no'); } function getPageURL() { try { return window.location.href; } catch(e) { return ""; } } // Loading frameset if missing. Do not remove this function!! /* if (top == self) { window.location.href = "/eprise/main/hgf/index.html?href="+escape(document.location.href); } */ // TextSize function changeTextSize(iSize) { // Set the text size cookie switch(iSize) { case 1: document.cookie = "textsize=1; path=/; expires=Fri, 27 Dec 2030 23:59:59 GMT"; break; case 2: document.cookie = "textsize=2; path=/; expires=Fri, 27 Dec 2030 23:59:59 GMT"; break; case 3: document.cookie = "textsize=3; path=/; expires=Fri, 27 Dec 2030 23:59:59 GMT"; break; } // Reload the page window.location.reload(); } // Right layer "frame" function showRightFrame(url) { var oLayer = document.getElementById("RightFrameLayer"); windowOnResize(); oLayer.style.display = "block"; oLayer.src = url; } function hideRightFrame() { var oLayer = document.getElementById("RightFrameLayer"); oLayer.style.display = "none"; } function windowOnScroll() { var oLayer = document.getElementById("RightFrameLayer"); var iHeight = document.documentElement.clientHeight - 20; if(iHeight >= 720) { oLayer.style.top = document.documentElement.scrollTop + "px"; } } function windowOnResize() { var oLayer = document.getElementById("RightFrameLayer"); var oEnd = document.getElementById("div_End"); var iLeft = document.documentElement.clientWidth - 365; var iHeight = document.documentElement.clientHeight - 20; if(iHeight < 800) iHeight = 800; oLayer.style.left = iLeft + "px"; oLayer.style.height = iHeight + "px"; } window.onscroll = windowOnScroll; window.onresize = windowOnResize; /* ------------------------------------------------------------------- */