////////////////////////////////////////////////////////////
//
// (c) The Web Paving Company Ltd., / The City of Kingston
// Map pop-up JS
// Last edit: Jan 12, 2004 - Total rewrite
//
/////////////
//
function PopPic(dir,pic,width,height,title)
{
  var screenH = (screen.height - 60);
  var screenW = (screen.width - 20);
  var strResizeState = "no";
  var strScrollState = "no";
  var contentWidth   = 30 + width;
  var contentHeight  = 80 + height;
  var windowX = 1;
  var windowY = 1;
  var windowWidth;
  var windowHeight;

  //
  if(screenW > contentWidth)
  {
    var 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;
  var strUrl = '/tools/pictures.asp?image=' + pic + '&dir=' + dir + '&w=' + width + '&h=' + height + '&title=' + title;
  //

  var MAP;
  var name = 'Window' +  height;
  MAP = window.open(strUrl, name, strFeatures);
  // MAP.focus();

}


