// START New Open Pop Up 
// dynamically set the width and height 
// of the pop window based on the site visitor's 
// screen resolution

// Set inner width and height - USED By function screenDetect() and newBrWindow
var iw, ih;

function newOpenPopup(theURL, winName, features) {
	if (features == '' || features == null) {
		features = 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400,screenX=50,screenY=50,left=50,top=50';
	} else if (features == 'detect') {

		screenDetect();
		features = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + iw + ',height=' + ih + ',screenX=25,screenY=25,left=25,top=25';
	}
	newWin = window.open(theURL, winName, features);
}

function screenDetect() {

	var reduction = 150;

	if (window.innerWidth == null) {
		//alert(' u r here ');
		iw = screen.width - reduction;
		ih = screen.height - reduction;
	}
	else {
		iw = window.innerWidth - reduction;
		ih = window.innerHeight - reduction;
	}
	//document.write("SCREEN width="+screen.width+"<br>SCREEN height="+screen.height+"<br>");
	//document.write("WINDOW Width= "+iw+"<br>WINDOW Height= "+ih+"<br>");
	//alert("iw: " + iw + " ih: " + ih);
	return iw, ih;
}

// END New Open Pop Up