
/* advanced open in popup window. This will allow any links in the popup to be opened in the parent
Also if the parent is closed or moves to another window then the popup will close  */

function Adv_popWin(theURL,winName,features) { 
	if (window["popupWindow"] == null) window["popupWindow"] = new Array();
	var wp = popupWindow.length;
	popupWindow[wp] = window.open(theURL,winName,features);
	if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
if (document.all || document.layers || document.getElementById) { 
	window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();} ; }
	document.MM_returnValue = false;
}



