   var winCtr     = 0;
   var scrollbars = 1;
   var menubars   = 0;
   var winStatus  = 0;

   function openWin(location, winWidth, winHeight, winName) {
      var toolbars   = 0;
      var winStatus  = 0;
      var resizables = 1;
      var menubars   = 0;
      if (typeof(scrollbars)=="undefined") { scrollbars = 1; }

      var winobj;
      if (typeof(location)=="undefined") {
         alert("page not defined");
         return;
      }
   
	   // Name the Window, so the remote can target it
	  self.name = "Parent_Window"; 
   if (!winName) winName = 'popup' + winCtr++;
      winobj = window.open(location, winName, 'location=0, toolbar=' + toolbars +
         ', directories=0, menubar=' + menubars + ', scrollbars=' + scrollbars +
         ', resizable=' + resizables + ', copyHistory=0, status==' + winStatus +
         ', width=' + winWidth + ', height=' + winHeight + ', screenX=100, screenY=200');
      winobj.focus();
   }
			
   function openWinAdv(location, winWidth, winHeight, winName, scrollbars_arg) {
      var orig_scrollbars = scrollbars;
      scrollbars = scrollbars_arg;
      openWin(location, winWidth, winHeight, winName);
   }
