// JavaScript Document

var newWin;
var flashWin;

function getPopupWidth(){
	var theSize = getPopupSize();	
	return theSize.x;
}

function getPopupHeight(){
	var theSize = getPopupSize();
	return theSize.y;
}

function getPopupSize(){
	var x = screen.availWidth;
	var y = screen.availHeight;
	if(y < 768){
		
		var aspectRatio = 1024/768; // native size is 1024x768
		
		x = Math.round(screen.availHeight * aspectRatio);
		y = screen.availHeight;
	
	}else{
	
		x = 1024;
		y = 768;
		
	}
	var ret = new Object();
	ret.x = x;
	ret.y = y;
	
	return ret;
}

function openFullWin( url,name,x,y ){
	var l = 0;
	var t = 0;

	var theSize = getPopupSize();
	var x = theSize.x;
	var y = theSize.y;
/*
	newWin = window.open( url, name, "left="+ l +", top="+ t +", width=" + contentWidth + ", height=" + contentHeight + ", scrollbars=no, toolbar=no, location=no, status=no, menubar=no, resizable=no" );
	newWin.resizeTo( contentWidth, contentHeight );
	newWin.focus();	

	return false;
	
	
				var l = 0;
				var t = 0;
				x = screen.availWidth;
				y = screen.availHeight;
				
				// if screen is not 4:3 aspect, only make the popup 4:3, maximized to height, centered on screen
				if( (screen.width/screen.height) >= 1.4 ){
					
					x = (4*y) / 3; //let height be full screen, but width so that window will conform to 4:3 aspect
					
					l = (screen.availWidth/2)-(x/2); //center new 4:3 window
			
				}
	*/
	newWin = window.open(url,name,"left="+ l +",top="+ t +",width=" + x + ",height=" + y + ",scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no");
	//newWin.resizeTo(screen.width,screen.height);
	if(newWin != null){
		newWin.resizeTo(x,y);
		newWin.focus();	
	}
	// return false;
	void(0);

}
