
var agent=navigator.userAgent.toLowerCase();
var mac = (agent.indexOf("mac")!=-1);
var win = ( (agent.indexOf("win")!=-1) || (agent.indexOf("16bit")!=-1) );
netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) == 4);
ie5 = explorer && (navigator.appVersion.indexOf('MSIE 5') > 0);
var firstplace;


var firstplace;
vars ="left=" + ((screen.width/2)-(608/2)+0) + ",top=" + ((screen.height/2)-(420/2)-0) + ",scrollbars=1,toolbar=0,resizable=1,width=608,height=420";
if (win) {
  if (netscape) {
    vars ="left=" + ((screen.width/2)-(608/2)+0) + ",top=" + ((screen.height/2)-(420/2)-0) + ",scrollbars=1,toolbar=0,resizable=1,width=608,height=420"; }
  if (explorer) {
    vars ="left=" + ((screen.width/2)-(608/2)-6) + ",top=" + ((screen.height/2)-(420/2)-20) + ",scrollbars=1,toolbar=0,resizable=1,width=608,height=420"; }
}

//Adjust position for Netscape on a Mac
if (mac && netscape) {
  vars ="left=" + ((screen.width/2)-(608/2)-5) + ",top=" + ((screen.height/2)-(420/2)-7) + ",scrollbars=1,toolbar=0,resizable=1,width=608,height=420";
}


//Move the popup after it's open
if (mac) {
  if (ie4) {
    moveHorizontal = (screen.width/2)-(608/2)-10;
    moveVertical = (screen.height/2)-(420/2)+21;
    firstplace.moveTo(moveHorizontal, moveVertical);
  }
}


function openPopup(theURL,winName, features) {
  firstplace = window.open(theURL,winName,features);
}


function openMap() {
	openPopup('map.cfm', 'firstplace', vars);
    firstplace.focus();
}
