//CrossBrowserResizeInnerWindowTo(880,600);
var ie4 = (document.all) ? 1 : 0;
var ns4 = (document.layers) ? 1 : 0;
var ns6 = (document.getElementById && !document.all) ? 1 : 0;
var width=winWid();
var height=winHei();

function winWid(){ return (ns4||ns6) ? window.outerWidth:document.body.clientWidth; }
function winHei(){ return (ns4||ns6) ? window.outerHeight:document.body.clientHeight; }
function centerX(){ return (ns4||ns6) ? parseInt((screen.width/2)-(width/2)):parseInt((screen.availWidth/2)-(width/2)); }
function centerY(){ return (ns4||ns6) ? parseInt((screen.height/2)-(height/2)):parseInt((screen.availHeight/2)-(height/2)); }

function InnerWindowTo(newWidth, newHeight, centerPageInWindow) {
    if (self.innerWidth) {
		// FireFox
        frameWidth  = self.innerWidth;
        frameHeight = self.innerHeight;
		//alert('Route1 Height:'+frameHeight+"  Width:"+frameWidth);
    } else if (document.documentElement && document.documentElement.clientWidth) {
		// Internet Explorer
        frameWidth  = document.documentElement.clientWidth;
        frameHeight = document.documentElement.clientHeight;
		//alert('Route2 Height:'+frameHeight+"  Width:"+frameWidth);
    } else if (document.body) { 
        frameWidth  = document.body.clientWidth;
        frameHeight = document.body.clientHeight;
		//alert('Route3 Height:'+frameHeight+"  Width:"+frameWidth);
    } else {
		//alert('Route else Height:'+frameHeight+"  Width:"+frameWidth);
        return false;
    }
    if (document.layers) {
        newWidth  -= (parent.outerWidth - parent.innerWidth);
        newHeight -= (parent.outerHeight - parent.innerHeight);
		//alert('newWidth:'+newWidth+"  newHeight:"+newHeight);
    }
	
	if (navigator.appName != 'Netscape'){newWidth = newWidth + 18;}
	
    parent.window.resizeBy(newWidth - frameWidth, newHeight - frameHeight);    
    
    if (centerPageInWindow) {
		var cx=centerX();
		var cy=centerY();
		
		if (navigator.appName == 'Netscape'){
			//alert("net: CenterY: "+cy+" CenterX: "+cx);
			top.moveTo(cx,cy);
			
			//alert('Screen Height:'+screen.height+'  Screen Width='+screen.width+'\nScreen AvailHeight='+screen.availHeight+'  Screen AvailHeight='+screen.availWidth+'\nHeight='+height+'  Width='+width+'\ncenterX='+cx+'  centerY='+cy)

		}else{
			// This was added as a temp fix "+140".  When the browser is set in IE it drops by 70 px.
			cy = (window.screen.availHeight - (frameHeight+140)) / 2        //Set distance from top
			cx = (window.screen.availWidth - frameWidth) / 2          //Set distance from bottom
			
			//alert("ie: CenterY: "+cy+" CenterX: "+cx+"\n\nFrame Height: " + self.innerHeight + "\nFrame Width: " + self.innerWidth);
			//alert("ie: CenterY: "+cy+" CenterX: "+cx+"\n\nFrame Height: " + frameHeight + "\nFrame Width: " + frameWidth);
			top.moveTo(cx,cy);	
		}
	}
	
    return true;
}