// Function to open popup window
// Closes any existing popup (opened by this function) previously
var hPopupWin;
function tmt_winLaunchPopup(theURL, features) { 
//	alert('about to open "' + theURL + '"');
	if (hPopupWin) hPopupWin.close();
	hPopupWin = window.open(theURL,'',features);
	hPopupWin.focus();
	return false;
}

// On exit function to close above windows (if exists) on exit
// Needs onunload="tmt_OnExit()" in BODY tag
function tmt_OnExit() {
	if (hPopupWin) hPopupWin.close();
}
