//// GET VIEWPORT WIDTH
function viewportWidth(windowName) {
if (!windowName) var windowName = 'self';
if (self.innerHeight) {
	widthProperty = '.innerWidth';
} else if (document.documentElement && document.documentElement.clientHeight) {
	widthProperty = '.document.documentElement.clientWidth';
} else if (document.body) {
	widthProperty = '.document.body.clientWidth';
}
eval('var viewportWidth = ' + windowName + widthProperty);
return viewportWidth;
}

//// GET VIEWPORT HEIGHT
function viewportHeight(windowName) {
if (!windowName) var windowName = 'self';
	if (self.innerHeight) {
		heightProperty = '.innerHeight';
	} else if (document.documentElement && document.documentElement.clientHeight) {
		heightProperty = '.document.documentElement.clientHeight';
	} else if (document.body) {
		heightProperty = '.document.body.clientHeight';
	}
eval('var viewportHeight = ' + windowName + heightProperty);
return viewportHeight;
}

// collect information on screen resolution
var rezWidth = screen.width;
var rezHeight = screen.height;

// collect information on browser window
var winWidth = viewportWidth('self');
var winHeight = viewportHeight('self');

// url variables
var sendToPage = (thisClient.Flash >= 7) ? 'homeFlash.html' : 'homeHtml.html';

//// provide entry as appropriately as possible
function showSite() {
if (rezWidth >= 1024 && rezHeight >= 768) {
// handle users @ 1024 X 768 and above
	if (parseInt(winWidth) < 1004 && parseInt(winHeight) < 612) {
		self.moveTo(((rezWidth - 1050)/2), ((rezHeight - 768)/2));
		parent.window.resizeTo('1050','768');
			//document.location.href = sendToPage;
		location.replace(sendToPage);
	} else {
			//document.location.href = sendToPage;
		location.replace(sendToPage);
	}
} else {
// handle users with small screens
	var popupWindow = window.open(sendToPage, 'popupWindow', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, scrolling=yes, resizable=yes, copyhistory=no, width=' + rezWidth + ', height=' + rezHeight + '');
	setTimeout("testPopBlock()", 250);
}
}

function testPopBlock() {
if (!window.popupWindow || window.popupWindow.closed) { location.replace('popBlock.html'); }
}
