var map;

var baseIcon = new GIcon();
baseIcon.shadow = "";
baseIcon.iconSize = new GSize(11, 11);
baseIcon.shadowSize = new GSize(0, 0);
baseIcon.iconAnchor = new GPoint(5, 5);
          
var myIcon = new GIcon(baseIcon);
myIcon.image = "http://ibcnu.us/images/crosshair-1.1.gif";

function show_map()
{
  $('#recent').hide();
  $('#active').hide();
  $('#world_map').show();
  
  return false;
}

function load_most_active()
{
  $.ajax({ type: 'POST', url: '/ajax/home.php', data: 'action=most_active',
    success: function(msg) {
      $('#most_active').html(msg);
    }
  });
}

function load_most_recent()
{
  $.ajax({ type: 'POST', url: '/ajax/home.php', data: 'action=most_recent',
    success: function(msg) {
      $('#most_recent').html(msg);
    }
  });
}

$(document).ready(function ()
{
  map = new GMap2(document.getElementById("map24h"));
  map.setCenter(new GLatLng(39.909736, 9.052734), 1);
  map.enableScrollWheelZoom();
  
  $('#world_map').hide();
  load_most_recent();
  load_most_active();
  load();
});
