
function createMarker(point, iconName, iconText, title, html, draggable ){
	if(draggable == "1" || draggable == 1){
		var marker = new GMarker(point, {icon: iconName, draggable: true});
	}else{
		var marker = new GMarker(point, {icon: iconName});
	}
	gmarkers.push(marker);
	marker.type = iconText;
	GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); });
	return marker;
}

function buildIcon( filename ){
	var thisIcon = new GIcon();
	thisIcon.image = filename;
	thisIcon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	thisIcon.iconSize = new GSize(12, 20);
	thisIcon.shadowSize = new GSize(22, 20);
	thisIcon.iconAnchor = new GPoint(6, 20);
	thisIcon.infoWindowAnchor = new GPoint(5, 1);	
	return thisIcon;
}

function buildIcon2( filename, sizeX, sizeY, infoX, infoY, anchorX, anchorY, shadowFilename, shadowX, shadowY ){
	var thisIcon = new GIcon();
	thisIcon.iconSize = new GSize(sizeX, sizeY);
	thisIcon.iconAnchor = new GPoint(anchorX, anchorY);
	thisIcon.infoWindowAnchor = new GPoint(infoX, infoY);
	if(shadowFilename != "" && shadowX > 0 && shadowY > 0){
		thisIcon.shadow = shadowFilename;
		thisIcon.shadowSize = new GSize(shadowX, shadowY);
	}
	var returnIcon = new GIcon(thisIcon);
    returnIcon.image = filename;	
	return returnIcon;
}
