        // Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon();
		//http://www.google.com/mapfiles/shadow50.png
        baseIcon.shadow = "images/LittleManShadow2.png";
        baseIcon.iconSize = new GSize(26, 36);
        baseIcon.shadowSize = new GSize(35, 26);
        baseIcon.iconAnchor = new GPoint(12, 36);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);
        baseIcon.infoShadowAnchor = new GPoint(18, 25);

		//geocoder.getLatLng("3760 Pyrite Riverside Ca 92509", function (response) { map.addOverlay(createMarker(response, 0, "3760 Pyrite Riverside Ca 92509")); });
		//geocoder.getLatLng("434 E. 6th St. San Bernardino Ca 92410",  function (point) { map.addOverlay(createMarker(point, 1, "434 E. 6th St. San Bernardino Ca 92410")); });
		//geocoder.getLatLng("11399 Santa Fe Ave. East, Hesperia, CA 92345",  function (point) { map.addOverlay(createMarker(point, 2, "11399 Santa Fe Ave. East, Hesperia, CA 92345")); });
		
		var papIcon = new GIcon(baseIcon);
		//papIcon.image = "http://www.google.com/mapfiles/marker.png";
		papIcon.image = "images/LittleMan.png";
		var markerOptions = {icon:papIcon};
		var hillside = new GMarker(new GLatLng(34.019882,-117.462695), markerOptions);
		var midnight = new GMarker(new GLatLng(34.110250,-117.275552), markerOptions);
		var desertHigh = new GMarker(new GLatLng(34.458323,-117.286359), markerOptions);
		var hillsideInfoWindow = '<div class="mapAddImg"><div class="mapInfoAddress"><h3>Riverside Pick-A-Part</h3><p>3760 Pyrite St<br/>Riverside, CA 92509</p></div><div class="mapInfoImg"><img src="images/hillside-map.png"/></div></div><div class="mapDirText" id="hillsideDirText">Get Directions: <a href="" onclick="return showDirToHere(\'hillside\');">To Here</a>&nbsp;-&nbsp;<a href="" onclick="return showDirFromHere(\'hillside\');">From Here</a></div><div class="mapDirInput" id="mapDirInputToHillside"><form onSubmit="return getDirections(this.start.value, \'3760 Pyrite St, Riverside, CA 92509\');\"><input type=text name=start>&nbsp;<input type=submit></form></div><div class="mapDirInput" id="mapDirInputFromHillside"><form onSubmit="return getDirections(\'3760 Pyrite St, Riverside, CA 92509\',this.start.value);\"><input type=text name=start>&nbsp;<input type=submit value=\"Get Directions\"></form></div>';
		var midnightInfoWindow = '<div class="mapAddImg"><div class="mapInfoAddress"><h3>San Bernardino Pick-A-Part</h3><p>434 E. 6th St.<br/>San Bernardino Ca 92410</p></div><div class="mapInfoImg"><img src="images/midnight-map.png"/></div></div><div class="mapDirText" id="midnightDirText">Get Directions: <a href="" onclick="return showDirToHere(\'midnight\');">To Here</a>&nbsp;-&nbsp;<a href="" onclick="return showDirFromHere(\'midnight\');">From Here</a></div><div class="mapDirInput" id="mapDirInputToMidnight"><form onSubmit="return getDirections(this.start.value, \'434 E. 6th St. San Bernardino Ca 92410\');\"><input type=text name=start>&nbsp;<input type=submit></form></div><div class="mapDirInput" id="mapDirInputFromMidnight"><form onSubmit="return getDirections(\'434 E. 6th St. San Bernardino Ca 92410\', this.start.value);\"><input type=text name=start>&nbsp;<input type=submit value=\"Get Directions\"></form></div>';
		var desertHighInfoWindow = '<div class="mapAddImg"><div class="mapInfoAddress"><h3>Hesperia Pick-A-Part</h3><p>11399 Santa Fe Ave. East,<br/> Hesperia, CA 92345</p></div><div class="mapInfoImg"><img src="images/desertHigh-map.png"/></div></div><div class="mapDirText" id="desertHighDirText">Get Directions: <a href="" onclick="return showDirToHere(\'desertHigh\');">To Here</a>&nbsp;-&nbsp;<a href="" onclick="return showDirFromHere(\'desertHigh\');">From Here</a></div><div class="mapDirInput" id="mapDirInputToDesertHigh"><form onSubmit="return getDirections(this.start.value, \'11399 Santa Fe Ave. East, Hesperia, CA 92345\');\"><input type=text name=start>&nbsp;<input type=submit></form></div><div class="mapDirInput" id="mapDirInputFromDesertHigh"><form onSubmit="return getDirections(\'11399 Santa Fe Ave. East, Hesperia, CA 92345\', this.start.value);\"><input type=text name=start>&nbsp;<input type=submit value=\"Get Directions\"></form></div>';
		
		GEvent.addListener(hillside, "click", function() {
			hillside.openInfoWindowHtml(hillsideInfoWindow);
		});
		GEvent.addListener(midnight, "click", function() {
			midnight.openInfoWindowHtml(midnightInfoWindow);
		});
		GEvent.addListener(desertHigh, "click", function() {
			desertHigh.openInfoWindowHtml(desertHighInfoWindow);
		});
		
function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

function showDirToHere(yard)
{
	if (yard == 'hillside')
	{
		getDirs = document.getElementById("mapDirInputToHillside");
		hideTxt = document.getElementById("hillsideDirText");
	}
	if (yard == 'midnight')
	{
		getDirs = document.getElementById("mapDirInputToMidnight");
		hideTxt = document.getElementById("midnightDirText");
	}
	if (yard == 'desertHigh')
	{
		getDirs = document.getElementById("mapDirInputToDesertHigh");
		hideTxt = document.getElementById("desertHighDirText");
	}
		
	getDirs.style.visibility = 'visible';
	getDirs.style.marginBottom = '0em;';
	hideTxt.style.visibility = 'hidden';
	
	return false;
}

function ddBack()
{
	for (i = 0; i < 3; i++)
	{
		if (i == 0)
		{
			getDirs = document.getElementById("mapDirInputToHillside");
			hideTxt = document.getElementById("hillsideDirText");
		}
		if (i == 1)
		{
			getDirs = document.getElementById("mapDirInputToMidnight");
			hideTxt = document.getElementById("midnightDirText");
		}
		if (i == 2)
		{
			getDirs = document.getElementById("mapDirInputToDesertHigh");
			hideTxt = document.getElementById("desertHighDirText");
		}
			
		getDirs.style.visibility = 'hidden';
		getDirs.style.marginBottom = '0em;';
		hideTxt.style.visibility = 'visible';
	}
}

function showDirFromHere(yard)
{
	if (yard == 'hillside')
	{
		getDirs = document.getElementById("mapDirInputFromHillside");
		hideTxt = document.getElementById("hillsideDirText");
	}
	
	if (yard == 'midnight')
	{
		getDirs = document.getElementById("mapDirInputFromMidnight");
		hideTxt = document.getElementById("midnightDirText");
	}
	
	if (yard == 'desertHigh')
	{
		getDirs = document.getElementById("mapDirInputFromDesertHigh");
		hideTxt = document.getElementById("desertHighDirText");
	}

		
	getDirs.style.visibility = 'visible';
	getDirs.style.marginBottom = '0em;';
	hideTxt.style.visibility = 'hidden';
	
	return false;
}
function getDirections(start, end)
{
		if (start != "" && end != "")
		{
			var map = new GMap2(document.getElementById("map_canvas"));
			var directionsPanel = document.getElementById("route");
			var directions = new GDirections(map, directionsPanel);
			directions.load(start + " to " + end);
			map.addControl(new GLargeMapControl());
			map.addControl(new GMapTypeControl());
			directionsPanel.style.visibility = 'visible';
			directionsPanel.style.marginBottom = '10px;';
			setCookie('ddStart',start, 1);
			setCookie('ddEnd',end, 1);
		}
	document.getElementById("locationsText").style.display = 'none';
	
	return false;
}

function getDirections2()
{
	var ddStart = getCookie('ddStart');
	var ddEnd = getCookie('ddEnd');
	getDirections(ddStart, ddEnd);
	window.print();
}
function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
		var directionsPanel = document.getElementById("route");
		var directions = new GDirections(map, directionsPanel);
		var geocoder = new GClientGeocoder();
        map.setCenter(new GLatLng(34.262703,-117.289975), 9);
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
		map.addOverlay(hillside);
		map.addOverlay(midnight);
		map.addOverlay(desertHigh);
      }
}

function printDD()
{
	var printWindow = window.open('printDirections.html','printWindow','height=450,width=835,status,resizeable,menubar,scrollbars,addressbar');
	return false;
}