var gmyWin = null;

function myOpenWindow(winURL, winName, winFeatures, winObj)
{
  var theWin; // this will hold our opened window

  // first check to see if the window already exists
  if (winObj != null) {

	//check if window was closed   
    if (!winObj.closed) {

	//if the window was not closed, close it and re-open it with new parameters
	  winObj.close ();
	  theWin = window.open(winURL, winName, winFeatures);
	  return theWin;     
    }
    // otherwise fall through to the code below to re-open the window
  }

  // if we get here, then the window hasn't been created yet, or it
  // was closed by the user.
  theWin = window.open(winURL, winName, winFeatures);
  return theWin;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
