function InitializeGoogleMaps(strMapId, LatLng)
{
	var myOptions = {
		zoom: 13,
		center: LatLng,
		mapTypeId: google.maps.MapTypeId.HYBRID,
		disableDefaultUI: true,
		navigationControl: true,
		mapTypeControl: true,
		mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
		scaleControl: false
	};

	return new google.maps.Map(document.getElementById(strMapId), myOptions);
}


function CreateMarker(googlemaps, objMarker, strFile)
{
	if (strFile == null)
	{
		strFile = "address-google-maps.php?addressno=";
	}

	var Marker = new google.maps.Marker({
		position: new google.maps.LatLng(objMarker.lat, objMarker.lng),
		map: googlemaps
	});

	var InfoWindow = new google.maps.InfoWindow({
		content: "<iframe src='" + strPath + strFile + objMarker.addressno + "&map=1' frameborder='0' width='150px' height='200px'></iframe>", size: new google.maps.Size(150, 200)
	});

	google.maps.event.addListener(Marker, 'click', function(){
		InfoWindow.open(googlemaps, Marker);
	});
}

function CreateMarkers(googlemaps, arrMarkers, strFile)
{
	if (strFile == null)
	{
		strFile = "address-google-maps.php?addressno=";
	}

	var GlobalLngLat = new google.maps.LatLngBounds();
	var intGoogleMapsInterval = 0.003;

	for(var i = 0; i < arrMarkers.length; i++)
	{
		var objMarker = arrMarkers[i];
		CreateMarker(googlemaps, objMarker, strFile);
		GlobalLngLat.extend(new google.maps.LatLng(objMarker.lat + intGoogleMapsInterval, objMarker.lng));
		GlobalLngLat.extend(new google.maps.LatLng(objMarker.lat, objMarker.lng + intGoogleMapsInterval));
		GlobalLngLat.extend(new google.maps.LatLng(objMarker.lat - intGoogleMapsInterval, objMarker.lng));
		GlobalLngLat.extend(new google.maps.LatLng(objMarker.lat, objMarker.lng - intGoogleMapsInterval));
	}

	if(arrMarkers.length >= 1)
	{
		googlemaps.fitBounds(GlobalLngLat);
	}
}
