﻿function NewWindow(url, height, width) {
    var iCTop;
	var iCLeft;
	
	iCTop = (window.screen.availHeight / 2) - 135;
	iCLeft = (window.screen.availWidth / 2) - 225;
    
    var newwin = window.open(url, "", "height=" + height + ",width=" + width + "location=no,menubar=no,resizable=no,scrollbars=1,status=no,titlebar=no,toolbar=no,directories=no");
}

function Popup(url, height, width, mode) {
    var iCTop;
	var iCLeft;
	var partner = GetCookieKeyValue("LTTrackingSession", "PARTNER");
	
	iCTop = (window.screen.availHeight / 2) - 135;
	iCLeft = (window.screen.availWidth / 2) - 225;
		
	if (GetCookieKeyValue("LTPopUp", "POPUPDISPLAYED") == "" && partner == "") {	   
	    var popup = window.open(url, "", "height=" + height + ",width=" + width + ",left=" + iCLeft + ",top=" + iCTop + ",screenx=" + iCLeft + ",screeny=" + iCTop + "location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,directories=no");
		
		if (popup) { // Window may not be opened due to pop-up blockers
		    if (mode == "pop-under")	
	            self.focus();
	        else
	            popup.focus();
	    }
			
	    SetCookieValue("LTPopUp", "POPUPDISPLAYED", "1", 1);
	}
}

