////////////////////////////////////////////////////////////
//
// (c) The Web Paving Company Ltd., / The City of Kingston
// Gallery pop-up JS
// Last edit: May 31, 2005
//
/////////////
//
function galleryPopper(url, width, height)
{
  screenH = (screen.height - 60);
  screenW = (screen.width - 20);
  strResizeState = "no";
  strScrollState = "no";
  contentWidth   = 38 + width;
  contentHeight  = 100 + height;
  windowX = 1;
  windowY = 1;
  //
  if(screenW > contentWidth)
  {
    windowWidth = contentWidth;
  }
  else
  {
    windowWidth = screenW;
    strScrollState = "yes";
  }
  if(screenH > contentHeight)
  {
    windowHeight = contentHeight;
  }
  else
  {
    windowHeight = screenH;
    strScrollState = "yes";
  }
  var beIE = document.all?true:false;
  var autoclose = true;
  //
  var strFeatures = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=' + strScrollState + ',resizable=' +  strResizeState + ',width=' + windowWidth + ',height=' + windowHeight;
  // var strFeatures = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=' + windowWidth + ',height=' + windowHeight;
  //
  MAP=window.open(url,"MapWindow", strFeatures)
  MAP.blur()
  window.focus() 
  //MAP.resizeTo(windowWidth,windowHeight)
  MAP.moveTo(windowX,windowY)
  MAP.focus()   
  if(autoclose)
  {
    window.onunload = function()
    {
      MAP.close()
    }
  }
}


