function OpenCenteredWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function popupwin(theURL) {
    OpenCenteredWindow(theURL,'popwin','location=0,toolbar=0,menubar=0,directories=0,status=0,resizable=yes,scrollbars=yes', 400, 450, true);
}

function popFloorplan(theURL) {
    OpenCenteredWindow(theURL,'popfloor','location=0,toolbar=0,menubar=0,directories=0,status=0,resizable=yes,scrollbars=yes', 720, 720, true);
}

function popDirections() {
    OpenCenteredWindow('/directions.php','popdirections','location=0,toolbar=0,menubar=0,directories=0,status=0,resizable=yes,scrollbars=yes', 600, 586, true);
}

function ChangeParentDocument(url) {
  opener.location = url;
  self.close();
}

function printIt()	{
  if(window.print)	{
    window.print();
  } else {
    alert("Your browser does not support this functionality.  Try using Ctrl-P (Command-P on a Macintosh)");
  }
}