//function for immediate redirection 
//from the dropdown list in the main header
function redirect(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
top.location=form.select.options[index].value;}}

function jump(what) 
{ 
        var loc = (what);
        var newWin = window.open(loc,"myWin", "toolbar=no,width=600,height=300,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no, top=0")   
} 


// Function that shows popup widow (Square) - (different size to jump, and ability to be centered Y/N parm)
function popup(what,centered) 
{ 
        var loc = (what);
        var w = 400 ;
        var h = 400 ;
        var winprops = "toolbar=no,width=" + w +
                        ",height=" + h + 
                        ",directories=no,status=no,scrollbars=yes,resize=yes,menubar=no";
        if (centered == "Y") {
                var winl = (screen.width - w) / 2;
                var wint = (screen.height - h) / 2;
                winprops = winprops + ",top=" + wint + ",left= " + winl ;
        }

        var newWin = window.open(loc,"myWin", winprops)         
} 

// Function that shows popup widow (Square) - (different size to jump, and ability to be centered Y/N parm)
function popupWindow(what,width, height,centered) 
{ 
        var loc = (what);
        var w = width ;
        var h = height ;
        var winprops = "toolbar=no,width=" + w +
                        ",height=" + h + 
                        ",directories=no,status=no,scrollbars=no,resize=yes,menubar=no";
        if (centered == "Y") {
                var winl = (screen.width - w) / 2;
                var wint = (screen.height - h) / 2;
                winprops = winprops + ",top=" + wint + ",left= " + winl ;
        }

        var newWin = window.open(loc,"myWin", winprops)         
} 

{
function checkDisclaimer() {
  		if(!window["disclaimer"]) {
  			if(getCookie("MGI_DISCLAIMER") != "yes") {
  				var newwin = window.open("/services/mgi2/public/legal/legal_cookie.html", "disclaimer",'width=400,height=400,scrollbars=yes');
  				newwin.moveTo(50,50);
  			}
  		}
  	}
  					
  	function getCookie(name) {
  		var cookieName = name + "=";
  		var documentCookies = document.cookie;
  		if (documentCookies.length > 0) {
  			begin = documentCookies.indexOf(cookieName);
  			if (begin != -1) {
  				begin += cookieName.length;
  				end = documentCookies.indexOf(";", begin);
  				if (end == -1) end = documentCookies.length;
  				return unescape(documentCookies.substring(begin, end));
  			}
  		}
  		return "";
  	}
  
  	checkDisclaimer();
}

function countryInfo(sNames, lNames)
{
	var sFeatures = "width=350,height=500,menubar=no,scrollbars=no,resize=no";
	var loc = "/services/mgi2/public/products/pooledfundlist/countriespopup.jsp?SCountry=" +sNames+ "&LCountry=" + lNames;
	var win = window.open( loc, "mywin", sFeatures );
}
