/* Generic Map Draw Function */
var DrawMap = eval('Draw' + MAP_SERVICE +'Map');

/* Yahoo Functions */
function DrawYahooMap(sCenteredOn,sID,nZoomLevel,asLocations) {
	var oCenteredOn = '';
	if ( typeof(sCenteredOn) == 'array' ) {
		oCenteredOn = new LatLon(sCenteredOn[0],sCenteredOn[1]);
	} else {
		oCenteredOn = sCenteredOn;
	}
	var yMap = new Map ( sID , MAP_APPID , oCenteredOn , nZoomLevel , MapViews.MAP );
	yMap.addTool ( new PanTool() , true );
	if ( asLocations && asLocations.length > 0 ) for ( var nIndex = 0 ; nIndex < asLocations.length ; nIndex++ ) {
		if ( typeof(asLocations[nIndex][MAP_POINTLOC]) == 'array' ) {
			yMap.addMarkerByLatLon (
				new CustomPOIMarker ( asLocations[nIndex][MAP_ID]
									, asLocations[nIndex][MAP_TITLE]
									, (asLocations[nIndex].length>3) ? asLocations[nIndex][MAP_DESC] : asLocations[nIndex][MAP_POINTLOC]
									, '0xD02433'
									, '0xFFFFFF')
			,	new LatLon(asLocations[nIndex][MAP_POINTLOC][0],asLocations[nIndex][MAP_POINTLOC][1])
			);
		} else {
			yMap.addMarkerByAddress (
				new CustomPOIMarker ( asLocations[nIndex][MAP_ID]
									, asLocations[nIndex][MAP_TITLE]
									, (asLocations[nIndex].length>3) ? asLocations[nIndex][MAP_DESC] : asLocations[nIndex][MAP_POINTLOC]
									, '0xD02433'
									, '0xFFFFFF')
			,	asLocations[nIndex][MAP_POINTLOC]
			);
		}
	}
	return yMap;
}