function newWindow(location) {
   mapWindow = window.open(location, 'mapWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=480,height=360')
}		

function openWin(location, w, h) {
   if (openWin.arguments[0]) { location = openWin.arguments[0] } else { location = 'http://www.project2061.org' }
   if (openWin.arguments[1]) { w = openWin.arguments[1] } else { w = 450 }
   if (openWin.arguments[2]) { h = openWin.arguments[2] } else { h = 300 }
   if (openWin.arguments[3]) { bolMenu = openWin.arguments[3] } else { bolMenu = 0 }
   if (openWin.arguments[4]) { bolTool = openWin.arguments[4] } else { bolTool = 0 }
   popUp = window.open(location, 'popUp', 'toolbar='+bolTool+',location=0,directories=0,status=0,menubar='+bolMenu+',scrollbars=yes,resizable=yes,width='+w+',height='+h)
   popUp.focus();
}

var aWindow = new Object;
aWindow.closed=true;
function open_window(location){
   if (aWindow && !aWindow.closed) {
      aWindow.location.href = location;
      aWindow.focus();
   } else {
      aWindow=window.open(location,"thewindow","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=450");
      aWindow.focus();
   }
}
function focusWin() {
   if (aWindow && !aWindow.closed) {
      setTimeout('aWindow.focus()', 100);
   }
}
