function getNeighborhoodIcon(cityName, neighborhoodName) {

	//  First reformat names into a valid image naming format
	neighborhoodName = getValidFileName(neighborhoodName)
	cityName = getValidFileName(cityName)

	//  Now create the icon
	var icon = new GIcon();

	// The shadow image contains the actual text and oval graphic.  This ensures the neighborhoods always
	// display below any nearby Destinations icons. 
	icon.shadow = "./images/journey/neighborhood/" + cityName + "/" + neighborhoodName +".png";	
	icon.shadowSize = new GSize(130, 16);

	// The Neighborhood's icon.image is actually a fully transparent "wide" image.  
	// As we don't know each Neighborhood's actual image size, we use the "wide" transparent image for all
	// Neighborhoods...which means the user may end up clicking on the transparent image by
	// "mistake" if the Neighborhood name is short & thus is actually narrow or normal sized. 
	icon.image  = "./images/journey/neighborhood/neighborhood_transparent.png";
	icon.iconSize = new GSize(130, 16);
	icon.iconAnchor = new GPoint(65, 16);

	icon.infoWindowAnchor = new GPoint(90, 7);
	icon.infoShadowAnchor = new GPoint(90, 7);
	return icon;
}

function getDestinationIcon(cityName, destinationType, destinationName) {

	var icon = new GIcon();
	if (destinationType == "Neighborhood") {
		icon = getNeighborhoodIcon(cityName, destinationName)	
	} else {
		if (destinationType == "newDestination") {
			icon.image = "./images/journey/newDestinationBubble.png";
		} else { 
			//  Use generic destination bubble for all others
			icon.image = "./images/journey/destinationBubble.png";
		}
		icon.shadow = "./images/journey/destinationShadow.png";
		icon.iconSize = new GSize(20, 34);
		icon.shadowSize = new GSize(37, 34);
		icon.iconAnchor = new GPoint(9, 34);
		icon.infoWindowAnchor = new GPoint(9, 2);
		icon.infoShadowAnchor = new GPoint(18, 25);
	}	
	return icon;
}

function createDestinationIcon(imagePath)
{
	var icon = new GIcon();
	icon.image  = imagePath;
	icon.shadow = "./images/journey/destinationShadow.png";
	icon.iconSize = new GSize(20, 34);
	icon.shadowSize = new GSize(37, 34);
	icon.iconAnchor = new GPoint(9, 34);
	icon.infoWindowAnchor = new GPoint(9, 2);
	icon.infoShadowAnchor = new GPoint(18, 25);	
	return icon;
}



//  Reformat names into a valid image naming format
function getValidFileName(name) {

	name = replaceAll(name," ","_");
	name = replaceAll(name,"-","_");
	name = replaceAll(name,"'",""); 
	name = replaceAll(name,"/","-");
	name = replaceAll(name,"(","");
	name = replaceAll(name,")","");
	name = replaceAll(name,",","_");
	name = replaceAll(name,".","");

	//  Convert ascii characters codes as these cause problems when Google reads the file names
	name = replaceAll(name,"#","_");
	name = replaceAll(name,"&","_");
	name = replaceAll(name,";","_");

	return name;
}
