// JavaScript Document// Global open popup window function for website// pass the URL string, width and height desired for the output.function openPopUp(URL, W, H) {    // opens a new popup window and displays the passed url, and height & width settings	var thisWidth = W;	var thisHeight = H;	var thisURL = URL;	// set the min width and height if not passed	if(typeof thisWidth == "undefined")	{		thisWidth = 600;	}	if(typeof thisHeight == "undefined")	{		thisHeight = 700;	}			//alert("passed W = "+thisWidth+" passed H = "+thisHeight);		var strOptions = "menubar=no,statusbar=yes,resizable=yes,scrollbars=yes,toolbar=no,height="+thisHeight+",width="+thisWidth; 	var newPopUp = window.open(thisURL, "", strOptions);	
	
    //if popup window is blocked, the newPopUp will be null.	if (newPopUp != null)	{	    newPopUp.focus();	}
	
	// this is to reset the survey/session framework's command state after a link opens in a popup.
	if (typeof lastCommand != "undefined") 
	{
	    lastCommand = "";
	}		// this is to reset the survey/session framework's command state after a link opens in a popup.	if (typeof lastCommand != "undefined") 	{	    lastCommand = "";	}		return (newPopUp==undefined);}function printPopUp(){    if (window.frames != null && window.frames.length == 1)    {        window.frames[0].focus();        if (navigator.appName.indexOf("Microsoft") != -1)        {            window.print();        }    }    else    {        window.print();    } }function openNewWindow(URL){    var thisURL = URL;        if (typeof(thisURL) != 'undefined' && thisURL.length > 0)    {        var newWin = window.open(thisURL);        newWin.focus();    }}function openExternalWindow(thisURL){    if (confirm('You are now leaving a Travelex site and Travelex is not responsible for the site you are about to enter. Please refer to the \'Links to Other Sites\' section in Travelex \'Legal Notices\' for details.  Do you wish to continue?'))    {        var newWin = window.open(thisURL, '_blank');        newWin.focus();    }    return false;}
