// JavaScript Document
var scrW = screen.width/4; 
var scrH = screen.height/5; 
var stdW = screen.width/20; 
var stdH = screen.height/30; 
var newWindow = null; 

function closeWin(){ 
	if (newWindow != null){ 
		if(!newWindow.closed) 
			newWindow.close(); 
	} 
} 

function popUpWin(url, type, strWidth, strHeight, name){ 
	closeWin(); 
	if (type == "fullScreen"){ 
		strWidth = screen.availWidth - 10; 
		strHeight = screen.availHeight - 160; 
	} 
	var tools=""; 
	if (type == "fullScreen") tools = "top=0,left=0,resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+""; 
	if (type == "standard") tools = "top="+stdH+",left="+stdW+",resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+""; 
	if (type == "console") tools = "top="+scrH+",left="+scrW+",resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+""; 
	if (type == "scrollConsole") tools = "top="+scrH+",left="+scrW+",resizable,toolbar=no,location=no,scrollbars=yes,status=no,directories=no,width="+strWidth+",height="+strHeight+""; 
	newWindow = window.open(url, name, tools); 
	newWindow.focus(); 
} 
