   var ghWindow;  //-- the Global window handle for pop-up ----
   var gsBrowserName = navigator.appName;
   var giBrowserVersion = parseInt(navigator.appVersion);

   var globalToolbarFlag = -1;

	function openWindow(sURL, winName, winWidth, winHeight, sArguments) {
	   if (navigator.userAgent.indexOf("Mac") != -1) {
	   		sArguments = "scrollbars=0,toolbar=0,resizable=0,location=0,status=0,menubar=0";
	   }
	   if ( !sArguments ) {
		  sArguments = "scrollbars=0,toolbar=0,resizable=0,location=0,status=0,menubar=0";
	   }

	   if ( gsBrowserName == "Netscape" && giBrowserVersion > 2) {
		  if ( ghWindow ) {
			 if ( ghWindow.document ) {
				ghWindow.close();
			 }
		  }
	   } else {
		  if ( gsBrowserName == "Microsoft Internet Explorer" && giBrowserVersion > 2) {
			 if ( ghWindow ) {
				ghWindow.close();
			 }
		  }
	   }
	//   ghWindow = window.open(sURL, winName, "width=" + (winWidth + 30) + ",height=" + (winHeight + 30) + "," + sArguments)
	   ghWindow = window.open(sURL, winName, "width=" + winWidth + ",height=" + winHeight + "," + sArguments)

	   return true;
	}
	