<!-- Begin
/*

this popup will overwrite itself.  You need this in the calling script:
<script src="http://resource.cottoninc.com/_script/popup_overwrite.js" language="JavaScript" type="text/JavaScript">	</script>
<script>
  var gmyWin = null;
</script>

*/

function popup_overwrite(URL, wdth, hght) {
  gmyWin=myOpenWindow(URL,gmyWin,wdth, hght)
}

function myOpenWindow(winURL,winObj, wdth, hght)
{
  var winName="pwin";
	
  var winFeatures="toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + wdth + ",height="  +  hght;

  //http://www.joemarini.com/tutorials/tutorialpages/window1.php

  var theWin;
  // this will hold our opened window

  // first check to see if the window already exists
  if (winObj != null)
  {
    // the window has already been created; close it.
    if (!winObj.closed) {
		winObj.close();
    }
    // 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;
}
// End -->