﻿function getScreenWidth()
{
	return window.screen.width;
}

function getScreenHeight()
{
	return window.screen.height;
}

function wPop(url, winName)
{
   	var screenWidth = getScreenWidth();
   	var screenHeight = getScreenHeight();
	parseInt(screenWidth);
	parseInt(screenHeight);
	if (screenWidth >= 1280 && screenHeight >= 1024)
	{
		var wWidth = 1150;
		var wHeight = 950;
		scrollB = 'no';
	}
	else
	{
		var wWidth = 1000 + 20;
		var wHeight = 660;
		scrollB = 'yes';
	}
   var iMyWidth = (window.screen.width / 2) - (wWidth / 2 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
   var iMyHeight = (window.screen.height /2) - (wHeight / 2 + 15); //half the screen height minus half the new window height (plus title and status bars).
   var zWin = window.open(url, winName, "status=no,width=" + wWidth + ",height=" + wHeight + ",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=" + scrollB);
   zWin.focus();
}




