if (window.attachEvent) {
	  window.attachEvent("onload", GetMap);
         } else {
	  window.addEventListener("load", GetMap, false);
         }
         if (window.attachEvent) {
	  window.attachEvent("onresize", MapResize);
         } else {
	  window.addEventListener("resize", MapResize, false);
         }
var map = null;
var layerid=1;

function AddMyLayer(source)
{
  var l = new VEShapeLayer();
  var veLayerSpec = new VEShapeSourceSpecification(VEDataType.VECollection, source, l);
//  veLayerSpec.SetCustomIcon = '<img src="http://www.zombiezodiac.com/rob/ped/clock/clock_icon2.gif" />';
  map.ImportShapeLayerData(veLayerSpec, onFeedLoad);
  }

function onFeedLoad(layer)
{
     var numShapes = layer.GetShapeCount();
     for(var i=0; i < numShapes; ++i)
    {
        var s = layer.GetShapeByIndex(i);
        s.SetCustomIcon("<div class='pinStyle1'><div class='text'>" + (1 + i) + "</div></div>");
    }
}

function MapResize() //resize
{
  if (map != null)
  {    
    if( typeof( window.innerWidth ) == 'number' )
    {
      //Non-IE
      map.Resize(400,window.innerHeight-115);
      } 
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
    {
      //IE 6+ in 'standards compliant mode'
      map.Resize(400,document.documentElement.clientHeight-155);
      }
    }
  }
 
