// Screen Size Detect
// Richard Unten

// onload="return checkScreenSize('main.html',745,695);"


var URL = '';
//var URL = 'http://www.humanities.uci.edu/spanishandportuguese/v2d/';
      
function checkScreenSize(targetName,newWidth,newHeight)
{
	screen_height = screen.height;
    var checkAgent = navigator.userAgent.toLowerCase(); 
    var aolCheck = checkAgent.indexOf("aol") != -1;
	
	if (screen_height > 700 && aolCheck == false)
	{
		//Resize using given width and height
		windowLeft = (screen.availWidth / 2) - (newWidth / 2);
		windowTop = (screen.availHeight / 2) - (newHeight / 2);
		top.window.resizeTo(newWidth,newHeight);
		top.window.moveTo(windowLeft,windowTop);
	
		//Open the given "goTo" page
		URLFULL = URL + targetName;
		adjustedWindow = window.location = URLFULL;
	}
	else
	{
		//Open the given "goTo" page   
		URLFULL = URL + targetName;
		adjustedWindow = window.location = URLFULL;        
	}            
	
}
	
