<!--
// Initialize Popup script values
// Ver 1.04
// Last updated: 2003-06-16

var shown;
var defWinCaption='Popup';
var defWaitMessage='Loading, please wait...';

var windowwidth,windowheight,windowleft,windowtop;
var _toolbar,_location,_directories,_directories,_status,_scrollbars,_resizable,_copyhistory;

// Param functions        
function setPopUpSize(w,h,l,t) {
	var a = setPopUpSize.arguments;
	if (w) windowwidth=w;
	if (h) windowheight=h;
	if (a.length>=3) {windowleft=l} else if (window.screen) windowleft=(screen.width-windowwidth)/2;
	if (a.length>=4) {windowtop=t;} else if (window.screen) windowtop=(screen.height-windowheight)/2;
}

function setPopUpParamDef() {
	setPopUpSize(500,400);
	_toolbar='no';_location='no';_directories='no';_directories='no';
	_status='yes';_scrollbars='yes';_resizable='yes';_copyhistory='no';
}

// Popup functions
function PopUpEx(url,wName) {
	//KillPopup();
	if (!wName || wName.length==0) wName = defWinCaption;
	shown=window.open(url, wName, 'left='+windowleft+',top='+windowtop+
		',toolbar='+_toolbar+',location='+_location+',directories='+_directories+
		',status='+_status+',scrollbars='+_scrollbars+',resizable='+_resizable+
		',copyhistory='+_copyhistory+',width='+windowwidth+',height='+windowheight);
	shown.focus();
	return false;
}

function PopUp(url) { return PopUpEx(url, defWinCaption); }

function PopUpExx(url,wName,sMessage) {
	if (shown) KillPopup();
	PopUpEx(url, wName); 
	if (sMessage!='') {sMessage = defWaitMessage};
	shown.document.write("<title>"+sMessage+"</title>");
	shown.document.write("<body bgcolor=#FFFFFF><center><font size=4 color='#000000'><b>"+sMessage+"</b></font></center></body>");
	return true;
}

function KillPopup() { if (shown) if (!(shown.closed)) {shown.close();} }

function ClosePopup() {
	if (window.opener) {
		window.opener.focus();
		window.close();
	}
}

// Initialization
window.onunload=KillPopup;
setPopUpParamDef();

// popup end 
//-->