/*top.window.moveTo(0,0); 
if (document.all) 
   { top.window.resizeTo(screen.availWidth,screen.availHeight); } 
else if 
   (document.layers || document.getElementById) 
   { 
   if 
    (top.window.outerHeight < screen.availHeight || top.window.outerWidth <screen.availWidth)
     { top.window.outerHeight = top.screen.availHeight; 
       top.window.outerWidth = top.screen.availWidth; } 
   }*/

function maxWindow() {
    var aRatio = 1.52;
	var range = 0.06;
	var maxX = 1920;
	var maxY = 1200;
	var xPix = screen.availWidth;
	var yPix = screen.availHeight;
	
	window.moveTo(0,0);
	
	if (xPix/yPix < aRatio*(1-range))
	{
		if (xPix > maxX)
		{xPix=maxX;}
		yPix = xPix/aRatio;
	}		

	if (xPix/yPix > aRatio*(1+range))
	{
		if (yPix > maxY)
		{yPix=maxY;}
		xPix = yPix*aRatio;
	}
	if (document.all)
	{ window.resizeTo(xPix,yPix); }
	
	else if 
	(document.layers) 
	{
	   top.window.outerWidth = xPix;
	   top.window.outerHeight = yPix;
	}
	
	else
	{
	   window.resizeTo(xPix,yPix);
	}	   

}
