var _Title = 0;
var _Lat = 1;
var _Long = 2;
var _Flags = 3;
var _Type = 4;
var _Days = 5;
var _Vehicle = 6;
var _Date = 7;
var _Country = 8;

function DM2DD(degreeMinute)
{

    // item with a city name have their position
    // in Degrees and minutes, we have to calculate
    // the proper Decimal Degree

     var aArray = degreeMinute.toString().split(".");
     var aDegree = aArray[0];
     var aMinutes = aArray[1] * 1.6666666;
     return parseFloat(aDegree + "." + aMinutes) ; 
}
    
function MarkerImage(index)
{
    var days = parseInt(MapLocations[index][_Days]);
    var image = "";

    if (days > 9)
    {
        if (days > 20)
        {
           image = "blue.png"; 
        }
        else
        {
           image = "green.png"; 
        }       
    }
    else
    {
        if (days > 4)
        {
           image = "purple.png"; 
        }
        else
        {
           image = "orange.png"; 
        } 
        if(days == 2)
         {
           image = "pink.png"; 
        }
        if(days == 1)
         {
           image = "red.png"; 
        }            
    }
                     
    return "http://google.com/mapfiles/ms/micons/" + image;
}
