    var Stopicon = new CM.Icon();
    Stopicon.image  = "/images/arrows/Stop.png";
    Stopicon.iconSize = new CM.Size(24, 24);
    Stopicon.iconAnchor = new CM.Point(22, 24);    
    
    var Alerticon = new CM.Icon();
    Alerticon.image  = "/images/arrows/alert.png";
    Alerticon.iconSize = new CM.Size(24, 24);
    Alerticon.iconAnchor = new CM.Point(12, 12); 
    
    var Nicon = new CM.Icon();
    Nicon.image  = "/images/arrows/N.png";
    Nicon.iconSize = new CM.Size(24, 24);
    Nicon.iconAnchor = new CM.Point(11, 0);

    var Sicon = new CM.Icon();
    Sicon.image  = "/images/arrows/S.png";
    Sicon.iconSize = new CM.Size(24, 24);
    Sicon.iconAnchor = new CM.Point(11, 23);

    var Eicon = new CM.Icon();
    Eicon.image  = "/images/arrows/E.png";
    Eicon.iconSize = new CM.Size(24, 24);
    Eicon.iconAnchor = new CM.Point(23, 11);

    var Wicon = new CM.Icon();
    Wicon.image  = "/images/arrows/W.png";
    Wicon.iconSize = new CM.Size(24, 24);
    Wicon.iconAnchor = new CM.Point(0, 11);
    
    var NEicon = new CM.Icon();
    NEicon.image  = "/images/arrows/NE.png";
    NEicon.iconSize = new CM.Size(24, 24);
    NEicon.iconAnchor = new CM.Point(20, 3);

    var NWicon = new CM.Icon();
    NWicon.image  = "/images/arrows/NW.png";
    NWicon.iconSize = new CM.Size(24, 24);
    NWicon.iconAnchor = new CM.Point(3, 3);
    
    var SEicon = new CM.Icon();
    SEicon.image  = "/images/arrows/SE.png";
    SEicon.iconSize = new CM.Size(24, 24);
    SEicon.iconAnchor = new CM.Point(20, 20);    
    
    var SWicon = new CM.Icon();
    SWicon.image  = "/images/arrows/SW.png";
    SWicon.iconSize = new CM.Size(24, 24);
    SWicon.iconAnchor = new CM.Point(3, 20);
    
    
    var rEVicon = new CM.Icon();
    rEVicon.image  = "/images/arrows/rEVIcon.png";
    rEVicon.iconSize = new CM.Size(16, 16);
    rEVicon.iconAnchor = new CM.Point(16, 8);
    
    var rNEVicon = new CM.Icon();
    rNEVicon.image  = "/images/arrows/rNEVIcon.png";
    rNEVicon.iconSize = new CM.Size(16, 16);
    rNEVicon.iconAnchor = new CM.Point(12, 4);
    
    var rNVicon = new CM.Icon();
    rNVicon.image  = "/images/arrows/rNVIcon.png";
    rNVicon.iconSize = new CM.Size(16, 16);
    rNVicon.iconAnchor = new CM.Point(8, 0);
    
    var rNWVicon = new CM.Icon();
    rNWVicon.image  = "/images/arrows/rNWVIcon.png";
    rNWVicon.iconSize = new CM.Size(16, 16);
    rNWVicon.iconAnchor = new CM.Point(4, 4);
    
    var rWVicon = new CM.Icon();
    rWVicon.image  = "/images/arrows/rWVIcon.png";
    rWVicon.iconSize = new CM.Size(16, 16);
    rWVicon.iconAnchor = new CM.Point(0, 8);
    
    var rSWVicon = new CM.Icon();
    rSWVicon.image  = "/images/arrows/rSWVIcon.png";
    rSWVicon.iconSize = new CM.Size(16, 16);
    rSWVicon.iconAnchor = new CM.Point(4, 12);
    
    var rSVicon = new CM.Icon();
    rSVicon.image  = "/images/arrows/rSVIcon.png";
    rSVicon.iconSize = new CM.Size(16, 16);
    rSVicon.iconAnchor = new CM.Point(8, 16);
    
    var rSEVicon = new CM.Icon();
    rSEVicon.image  = "/images/arrows/rSEVIcon.png";
    rSEVicon.iconSize = new CM.Size(16, 16);
    rSEVicon.iconAnchor = new CM.Point(12, 12);  
  
  
    var yEVicon = new CM.Icon();
    yEVicon.image  = "/images/arrows/yEVIcon.png";
    yEVicon.iconSize = new CM.Size(16, 16);
    yEVicon.iconAnchor = new CM.Point(16, 8);
    
    var yNEVicon = new CM.Icon();
    yNEVicon.image  = "/images/arrows/yNEVIcon.png";
    yNEVicon.iconSize = new CM.Size(16, 16);
    yNEVicon.iconAnchor = new CM.Point(12, 4);
    
    var yNVicon = new CM.Icon();
    yNVicon.image  = "/images/arrows/yNVIcon.png";
    yNVicon.iconSize = new CM.Size(16, 16);
    yNVicon.iconAnchor = new CM.Point(8, 0);
    
    var yNWVicon = new CM.Icon();
    yNWVicon.image  = "/images/arrows/yNWVIcon.png";
    yNWVicon.iconSize = new CM.Size(16, 16);
    yNWVicon.iconAnchor = new CM.Point(4, 4);
    
    var yWVicon = new CM.Icon();
    yWVicon.image  = "/images/arrows/yWVIcon.png";
    yWVicon.iconSize = new CM.Size(16, 16);
    yWVicon.iconAnchor = new CM.Point(0, 8);
    
    var ySWVicon = new CM.Icon();
    ySWVicon.image  = "/images/arrows/ySWVIcon.png";
    ySWVicon.iconSize = new CM.Size(16, 16);
    ySWVicon.iconAnchor = new CM.Point(4, 12);
    
    var ySVicon = new CM.Icon();
    ySVicon.image  = "/images/arrows/ySVIcon.png";
    ySVicon.iconSize = new CM.Size(16, 16);
    ySVicon.iconAnchor = new CM.Point(8, 16);
    
    var ySEVicon = new CM.Icon();
    ySEVicon.image  = "/images/arrows/ySEVIcon.png";
    ySEVicon.iconSize = new CM.Size(16, 16);
    ySEVicon.iconAnchor = new CM.Point(12, 12);  
    
    
    var gEVicon = new CM.Icon();
    gEVicon.image  = "/images/arrows/gEVIcon.png";
    gEVicon.iconSize = new CM.Size(16, 16);
    gEVicon.iconAnchor = new CM.Point(16, 8);
    
    var gNEVicon = new CM.Icon();
    gNEVicon.image  = "/images/arrows/gNEVIcon.png";
    gNEVicon.iconSize = new CM.Size(16, 16);
    gNEVicon.iconAnchor = new CM.Point(12, 4);
    
    var gNVicon = new CM.Icon();
    gNVicon.image  = "/images/arrows/gNVIcon.png";
    gNVicon.iconSize = new CM.Size(16, 16);
    gNVicon.iconAnchor = new CM.Point(8, 0);
    
    var gNWVicon = new CM.Icon();
    gNWVicon.image  = "/images/arrows/gNWVIcon.png";
    gNWVicon.iconSize = new CM.Size(16, 16);
    gNWVicon.iconAnchor = new CM.Point(4, 4);
    
    var gWVicon = new CM.Icon();
    gWVicon.image  = "/images/arrows/gWVIcon.png";
    gWVicon.iconSize = new CM.Size(16, 16);
    gWVicon.iconAnchor = new CM.Point(0, 8);
    
    var gSWVicon = new CM.Icon();
    gSWVicon.image  = "/images/arrows/gSWVIcon.png";
    gSWVicon.iconSize = new CM.Size(16, 16);
    gSWVicon.iconAnchor = new CM.Point(4, 12);
    
    var gSVicon = new CM.Icon();
    gSVicon.image  = "/images/arrows/gSVIcon.png";
    gSVicon.iconSize = new CM.Size(16, 16);
    gSVicon.iconAnchor = new CM.Point(8, 16);
    
    var gSEVicon = new CM.Icon();
    gSEVicon.image  = "/images/arrows/gSEVIcon.png";
    gSEVicon.iconSize = new CM.Size(16, 16);
    gSEVicon.iconAnchor = new CM.Point(12, 12);  
  
   
 
  
    function createMarker(point, text, small, hdg, speed) {

      var iconString = "icon";
      var sizeString = "";
      var dirString = "N";
      var colorString = "g";
      

      
      if (hdg >= 337.5 || hdg < 22.5){
        dirString = "N";
      } else if (hdg >= 22.5 && hdg < 67.5){
        dirString = "NE";
      } else if (hdg >= 67.5 && hdg < 112.5){
        dirString = "E";
      } else if (hdg >= 112.5 && hdg < 157.5){
        dirString = "SE";
      } else if (hdg >= 157.5 && hdg < 202.5){
        dirString = "S";
      } else if (hdg >= 202.5 && hdg < 247.5){
        dirString = "SW";
      } else if (hdg >= 247.5 && hdg < 292.5){
        dirString = "W";
      } else if (hdg >= 292.5 && hdg < 337.5){
        dirString = "NW";
      }
    
      

      
      if (speed>45 && speed<60){
        colorString = "y";
      } else if (speed>=60){
        colorString = "r";
      }
      
      if (small){ 
        iconString = colorString + dirString + "V" + iconString;
      } else {
        iconString = dirString + iconString;
      }
      
      if (speed<4){
        iconString = Stopicon;
      } else if (speed >75){
        iconString = Alerticon;
      }
      
      
      
      var marker = new CM.Marker(point, {icon: eval(iconString)});

 /*     if (small){
  
      
        if (hdg >= 337.5 || hdg < 22.5){

          var marker = new CM.Marker(point, {icon: NVicon});
        } else if (hdg >= 22.5 && hdg < 67.5){
          var marker = new CM.Marker(point, {icon: NEVicon});
        } else if (hdg >= 67.5 && hdg < 112.5){
          var marker = new CM.Marker(point, {icon: EVicon});
        } else if (hdg >= 112.5 && hdg < 157.5){
          var marker = new CM.Marker(point, {icon: SEVicon});
        } else if (hdg >= 157.5 && hdg < 202.5){
          var marker = new CM.Marker(point, {icon: SVicon});
        } else if (hdg >= 202.5 && hdg < 247.5){
          var marker = new CM.Marker(point, {icon: SWVicon});
        } else if (hdg >= 247.5 && hdg < 292.5){
          var marker = new CM.Marker(point, {icon: WVicon});
        } else if (hdg >= 292.5 && hdg < 337.5){
          var marker = new CM.Marker(point, {icon: NWVicon});
        }
     
     
      } else { 
      
      
        if (hdg >= 337.5 || hdg < 22.5){
          var marker = new CM.Marker(point, {icon: Nicon});
        } else if (hdg >= 22.5 && hdg < 67.5){
          var marker = new CM.Marker(point, {icon: NEicon});
        } else if (hdg >= 67.5 && hdg < 112.5){
          var marker = new CM.Marker(point, {icon: Eicon});
        } else if (hdg >= 112.5 && hdg < 157.5){
          var marker = new CM.Marker(point, {icon: SEicon});
        } else if (hdg >= 157.5 && hdg < 202.5){
          var marker = new CM.Marker(point, {icon: Sicon});
        } else if (hdg >= 202.5 && hdg < 247.5){
          var marker = new CM.Marker(point, {icon: SWicon});
        } else if (hdg >= 247.5 && hdg < 292.5){
          var marker = new CM.Marker(point, {icon: Wicon});
        } else if (hdg >= 292.5 && hdg < 337.5){
          var marker = new CM.Marker(point, {icon: NWicon});
        }
      
      } 
      
     */ 
      if (text && text != null){
        marker.bindInfoWindow(text+" " +dirString);
      }  else {
        marker.bindInfoWindow("no current info");
      }
      return marker;
    }

    

