function MM_jumpMenu(targ,selObj,restore){ //v3.0
 var printfile=selObj.options[selObj.selectedIndex].value;
 eval(targ+".location.href='"+printfile+"'");
 if (restore) selObj.selectedIndex=0;
}

// Original: Eric King (eric_andrew_king@hotmail.com) -->
// Web Site: http://redrival.com/eak/ -->

// This script and many more are available free online at -->
// The JavaScript Source!! http://javascript.internet.com -->

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

if (location.protocol != 'https:') {// return; }

    var currentHost = window.location.hostname;
    if ((currentHost == "www.unep.org") ||
    (currentHost == "hq.unep.org") ||
    (currentHost == "mirror.unep.org") ||
    (currentHost == "staging.unep.org") ) {
	    currentURL = window.location.href;
	    //if (Math.random() < 0.5) { svr = "www.unep.ch/ozone"; } else {svr = "ozone.unep.org"; }
	    svr = "ozone.unep.org";
            currentURL = currentURL.replace(/\/(hq|staging|www|mirror)\.unep\.org\/ozone\//i, "/" + svr + "/");

	    window.location.replace(currentURL);
    }
}
