// JavaScript Document for compliant popup 
// HTML SCRIPT SAMPLE: <a href="PUT-LINK-HERE.html" target="popUpWin" onclick="popUpWin(this.href,'standard',400,600);return false;">click here</a>
var newWindow = null;

function closeWin(){
	if (newWindow != null){
		if(!newWindow.closed)
			newWindow.close();
	}
}

function popUpWin(url, type, strWidth, strHeight){
	
	closeWin();
	if (type == "fullScreen"){
		strWidth = 400; 
		strHeight = 400; 
	} 
	
	
	var tools="";
	if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=no,location=no,scrollbars=no,menubar=no,width="+strWidth+",height="+strHeight+",top=20,left=30";
	if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=20,top=30";
	newWindow = window.open(url, 'newWin', tools);
	newWindow.focus();
}

//Old versions for backup

function openWindow(url)
{
    var w = window.open (url, "win", "height=500,width=600,left=0,top=40,menubar=no,resizable,scrollbars,status=no,toolbar=no");
}
