function testWin(){
 if (typeof win != 'undefined')
     if (win.closed) history.go(0)
}

function adminpopup(myURL){
  win=window.open(myURL,'admin','width=600, height=650, menubar=no, scrollbars=yes')
}

function windowPopUp(myTargetURL, myWindowName, myWindowWidth, myWindowHeight, myWindowPosX, myWindowPosY, myAllowResize, myAllowScrollbar, myAllowToolbar, myAllowLocationBox, myAllowDirectories, myAllowWindowStatus, myAllowMenuBar, myAllowCopyHistory)
{
	window.onerror=null;
	//var agt=navigator.userAgent.toLowerCase();
	windowAttributes = '';
	windowAttributes += 'width=' + myWindowWidth;
	windowAttributes += ',height=' + myWindowHeight;
	windowAttributes += ',resizable=' + myAllowResize;
	windowAttributes += ',scrollbars=' + myAllowScrollbar;
	windowAttributes += ',toolbar=' + myAllowToolbar;
	windowAttributes += ',location=' + myAllowLocationBox;
	windowAttributes += ',directories=' + myAllowDirectories;
	windowAttributes += ',status=' + myAllowWindowStatus;
	windowAttributes += ',menubar=' + myAllowMenuBar;
	windowAttributes += ',copyhistory=' + myAllowCopyHistory;
	newPopupWindow = window.open(myTargetURL,myWindowName,windowAttributes);
	newPopupWindow.moveTo(myWindowPosX - (myWindowWidth/2), myWindowPosY - (myWindowHeight/2));
	newPopupWindow.focus();
}
