var theMapMgr;
var icon_url ="http://labs.google.com/ridefinder/images/";
var icon_url_shapes="http://maps.google.com/mapfiles/kml/";

function load_dir_mark_intitalize()
	{
		theMapMgr = new MarkerManager(map);	
	}
function load_dir_mark_point(theLat,theLong,companyName,companyFilename,theTarget)
	{
		theMapMgr.addMarkers(get_dir_marker(theLat,theLong,companyName,companyFilename,theTarget), 3);	
	}
function load_dir_mark_refresh()
	{
		theMapMgr.refresh();	
	}


function get_dir_marker(theLat,theLong,companyName,companyFilename,theTarget) {
    var batch = [];
	var theMarker=new GMarker(get_the_Point(theLat,theLong), { icon: get_the_icon() });
	GEvent.addListener(theMarker, "click", function() 
		{
       	theMarker.openInfoWindowHtml(" "+companyName+" <br /><br /><a href='"+companyFilename+"' target='"+theTarget+"'>Click to View</a>");
	    });
    batch.push(theMarker);
    return batch;
    }
	
 function get_the_Point(theLat,theLong) {
      
      return new GLatLng(theLat,theLong);
    }
	
 function get_the_icon() {    
     
	 /* var icon = new GIcon();
	icon.image = icon_url +"mm_20_white.png";
	return icon;urn icon;
	*/
	
    var icon = new GIcon();
    // icon.image = "images/g_icos/ca.png";
	icon.image = icon_url_shapes +"shapes/campground.png";
       
	 
	//icon.shadow= icon_url + "mm_20_shadow.png";
	icon.iconSize = new GSize(13, 21);
	//icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	 
    return icon;
    }