var pops = [];
function uP(url, id) {
  if(url.substr(0,4) != "http") {
     url = pathToMain + url;
  }
  if(pops[id] && !pops[id].closed) {
    pops[id].location = url;
    pops[id].focus();
  } else {
    pops[id] = window.open(url, id, 'toolbar=1,menubar=1,location=1,directories=1,width=760,height=400,scrollbars=1,resizable=1,status=1');
  }
}
function i$(id) {
    return document.getElementById(id);
}
function p(id, dest_lang, src_lang) {
  var url = 'http://healthmap.org/ln.php?' + id;
  if(dest_lang) {
      url += '&trto=' + dest_lang;
  }
  if(src_lang) {
      url += '&trfr=' + src_lang;
  }
  uP(url, id);
}
function xP(id) {
  uP('x.php?lc=' + lang + '&id=' + id, id);
}
function sc(lat, lon, lvl) {
  map.setCenter(new GLatLng(lat, lon),lvl);
}
function confirmLeave(url) {
    var answer = confirm("By clicking OK, you will leave the Flu.gov site and will enter a non-federal Web site. Continue?")
    if (answer){
        window.location = url;
    }
}
