//PopUp Manager by Viksne //Script Code by Janis Viksne (vixne@parks.lv) //Copyright 2002 // //Selling or distributing this software in whole or //in part or of any modification of this software without //written permission is expressly forbidden. var exit = true; function PopupManagerCookiesInit(){ //Cookies var NameOfCookie = "popup_116_jscookie"; var PopCookie = ""; if(document.cookie.length > 0){ begin = document.cookie.indexOf(NameOfCookie + "="); if(begin != -1) begin += NameOfCookie.length + 1; end = document.cookie.indexOf(";", begin); if(end == -1) end = document.cookie.length; PopCookie = unescape(document.cookie.substring(begin, end)); } var PopCookieresult = 1; //Show windows once per session if(PopCookie == "isset") PopCookieresult = 0; document.cookie = NameOfCookie + "=isset;"; return PopCookieresult; } var ScreenWidth = 800; var ScreenHeight = 600; var documentlocation = ''; function PopupManagerOpenWin(w_ID){ wID = 'pop' + w_ID; if(wID=='pop116'){ wLink='http://www.herbalo.com/popmanager2/popup.php?id=116&scrollbars=no&popunder=on&close=&onexitdomain='; wBars='resizable=no,scrollbars=no,location=no,directories=no,status=no,toolbar=no,menubar=no'; wPopUnder='on'; wSize='Custom'; wFullScreen=''; wX='center'; wY='middle'; wCustomX=0; wCustomY=0; wWidth=720; wHeight=550; wExitDomain=''; } wCustomSettings = wBars; if(!(isNN4 || isIE4)) wExitDomain = "off"; if(wFullScreen == 'on'){ if(isIE4){ wCustomSettings = wCustomSettings + ',fullscreen=yes'; } else if(isNN4){ wCustomSettings = wCustomSettings + ',outerWidth=' + ScreenWidth + ',outerHeight=' + ScreenHeight + ',top=0,left=0'; } else { wCustomSettings = wCustomSettings + ',width=' + ScreenWidth + ',height=' + ScreenHeight + ',top=0,left=0'; } } else{ if(wX == 'left') wPosX = 0; else if(wX == 'center') wPosX = (ScreenWidth - wWidth) / 2; else if(wX == 'right'){ if(wWidth == 0) wWidth = 400; wPosX = ScreenWidth - wWidth; } else{ if(wCustomX < 0) wPosX = ScreenWidth + wCustomX; else wPosX = wCustomX; } if(wY == 'top') wPosY = 0; else if(wY == 'middle') wPosY = (ScreenHeight - wHeight) / 2; else if(wY == 'bottom'){ if(wHeight == 0) wHeight = 300; wPosY = ScreenHeight - wHeight; } else{ if(wCustomY < 0) wPosY = ScreenHeight + wCustomY; else wPosY = wCustomY; } if(wSize == 'Fullscreen'){ if(isNN4) wCustomSettings = wCustomSettings + ',outerWidth=' + (ScreenWidth - 5) + ',outerHeight=' + (ScreenHeight - 15); else wCustomSettings = wCustomSettings + ',width=' + (ScreenWidth - 5) + ',height=' + (ScreenHeight - 15); } if(wSize == 'Custom'){ // if(BrowserType == 'netscape4') // wCustomSettings = wCustomSettings + ',outerWidth=' + wWidth; // else{ wCustomSettings = wCustomSettings + ',width=' + wWidth; if(wX == "right") wPosX = wPosX - 10; // } } if(wSize == 'Custom'){ // if(BrowserType == 'netscape4') // wCustomSettings = wCustomSettings + ',outerHeight=' + wHeight; // else{ wCustomSettings = wCustomSettings + ',height=' + wHeight; if(wY == "bottom") wPosY = wPosY - 30; // } } if(wExitDomain != 'on') wCustomSettings = wCustomSettings + ',top=' + wPosY + ',left=' + wPosX; else{ wCustomSettings = wCustomSettings + ',top=' + (ScreenHeight - 5) + ',left=' + (ScreenWidth - 5); wLink = wLink + '&top=' + wPosY + '&left=' + wPosX; if(isNN4) wCustomSettings = wCustomSettings + ",z-lock=yes"; } } var PopWin = window.open(wLink, wID, wCustomSettings); if(wPopUnder == 'on' || wExitDomain == 'on'){ PopWin.blur(); window.focus(); } else{ PopWin.focus();} } //Windows onUnload function PopupManagerExitWindows(){ } function PopupManagerInit(){ documentlocation = window.location; documentlocation = documentlocation + ''; //First detect sceen size if(document.all){ //Microsoft Internet Explorer 4 compatible browser ScreenWidth = screen.width; ScreenHeight = screen.height;} else if(document.layers){ //Netscape Navigator 4 compatible browser ScreenWidth = window.screen.availWidth; ScreenHeight = window.screen.availHeight;} PopupManagerOpenWin(116); } function PopupManagerDoIt(){ if(PopupManagerCookiesInit() != 1) return; window.onunload = PopupManagerExitWindows; PopupManagerInit(); } var isNN4 = false; var isIE4 = false; if(document.all) isIE4 = true; else if(document.getElementById || (navigator.appName.indexOf("Netscape") != -1)){ isNN4 = true; document.captureEvents(Event.RESIZE | Event.LOAD | Event.UNLOAD); } if(isIE4 || isNN4) window.onload = PopupManagerDoIt;