var icon = null;

function initiate()
{
	// Use Google AJAX Loader
	google.load("maps", "2", {"callback" : mapsLoaded});
}

function createIcons()
{
	icon = new GIcon();
	//icon.image = "http://www.google.com/mapfiles/marker.png";
	icon.image = website_homepage + 'images/gmapicon.png';
	//icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	//icon.iconSize = new GSize(20, 34);
	icon.iconSize = new GSize(65, 51);
	//icon.shadowSize = new GSize(37, 34);
	//icon.iconAnchor = new GPoint(10, 34);
	icon.iconAnchor = new GPoint(10, 51);
}

function placeMarkerAtPoint(point, thisMap)
{
	var marker = new GMarker(point,icon);
	thisMap.addOverlay(marker);
	
	setCenterToPoint(point, thisMap);
}

function placeInfoMarkerAtPoint(point, thisMap, title, html_source)
{
	var marker = new GMarker(point, { title: title, icon: icon });

	GEvent.addListener(marker, 'click',
		function()
		{
			marker.openInfoWindowHtml(html_source);
		}
	);

	thisMap.addOverlay(marker);
}

function setCenterToPoint(point, thisMap)
{
	thisMap.setCenter(point, 14);
}

function createIcon(ltr)
{
	icon = new GIcon();
	//icon.image = "http://www.google.com/mapfiles/marker.png";
	icon.image = website_homepage + 'images/map_points/' + ltr + '.gif';
	//icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	icon.iconSize = new GSize(49, 33);
	//icon.shadowSize = new GSize(37, 34);
	//icon.iconAnchor = new GPoint(10, 34);
	icon.iconAnchor = new GPoint(49, 33);
	icon.infoWindowAnchor = new GPoint(45, 33);
}

function createIconNoLtr()
{
	icon = new GIcon();
	//icon.image = "http://www.google.com/mapfiles/marker.png";
	icon.image = website_homepage + 'images/map_point.gif';
	//icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	icon.iconSize = new GSize(49, 33);
	//icon.shadowSize = new GSize(37, 34);
	//icon.iconAnchor = new GPoint(10, 34);
	icon.iconAnchor = new GPoint(49, 33);
	icon.infoWindowAnchor = new GPoint(45, 33);
}
