	/* Auto-Close Popup */ 
<!--
// spawn child
var newWin, nameSuffix = 0; 

function openAnyWin(url){ 
	winHeight = (arguments.length >= 2)? parseInt(arguments[1]) : 580;
	winWidth = (arguments.length >= 3)? parseInt(arguments[2]) : 780;
	// default is NOT RESIZABLE; add "1" as the fourth argument ['openAnyW...html',400,400,1)] to allow a resizable window
 resize = (arguments.length >= 4)? parseInt(arguments[3]) : 0;
	
	winHeight = (winHeight > 580)? 580 : winHeight;
	winHeight = (winHeight < 100)? 100 : winHeight;
	
	winWidth = (winWidth < 100)? 100 : winWidth;
	winWidth = (winWidth > 780)? 780 : winWidth;

	if(newWin && !newWin.closed){
		newWin.close(); 
		newWin = null; 
	} 

	nameSuffix = (nameSuffix == 1)? 0 : 1;


	newWin = window.open(url, "popup" + nameSuffix, "height=" + winHeight + ",width=" + winWidth + ",resizable=" + resize + ",menubar=1,toolbar=0,scrollbars=1,left=50,top=50,openerName");

/* "openerName" = An optional HTML name to be given to the opener window (the window containing the script). This name may contain only letters, numbers and underscores. This allows links in the new window to target the opener window using the target attribute of the <a href> tag. */
}   

// add this onLoad code to the <body tag in the parent/win spawning window: <body... onUnload="closeWin();">
function closeWin(){
	if(newWin && !newWin.closed){ 
		newWin.close(); 
		newWin = null; 
	} 
} 
// -->