
var map=null;

// Spoof onload .. haven't managed to find a more elegant way to do this in WordPress ..
if (window.addEventListener) 
{
   window.addEventListener('load', function() { setTimeout(PopulateMap, 0); }, false);
} 
else 
{
   window.attachEvent('onload', function() { setTimeout(PopulateMap, 0); } );
}

//Safari Handler - don't you love exceptions?  (Thanks for this Mike)
if(/Safari/i.test(navigator.userAgent)){ 
   var _timer=setInterval(function(){
   if(/loaded|complete/.test(document.readyState)){
      clearInterval(_timer);
      PopulateMap();
   } }, 10)
}

function PopulateMap() {   
    map = new VEMap('GeoWidget');
    map.SetDashboardSize(VEDashboardSize.Small);
    map.LoadMap(new VELatLong(0,), , '' , false);
   
    var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
    shape.SetTitle('I live here');
    shape.SetDescription('Close anyway');
    map.AddShape(shape);   
}
 
