function showhide(layerID, mode)
{
var currentRef = document.getElementById(layerID).style

//Display modes 1 for on 0 for off
modes = new Array
modes[0] = 'none'
modes[1] = 'block'

if(isNaN(mode))
currentRef.display = (currentRef.display == 'none') ? 'block' : 'none'
else
currentRef.display = modes[mode]
}

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)
  {
    // the window has already been created, but did the user close it?
    // if so, then reopen it. Otherwise make it the active window.
    if (!winObj.closed) {
      winObj.focus();
      return winObj;
    }
    // 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;
}

