fireOn = Window.ie ? 'load' : 'domready';
window.addEvent(fireOn, function() {
	if (GBrowserIsCompatible() && document.getElementById('latitude') && document.getElementById('longitude')) {
		var latitude = document.getElementById('latitude').value;
		var longitude = document.getElementById('longitude').value;

		point = new GLatLng(latitude, longitude);
		if (point.x != 0 && point.y != 0)
		{
			map = new GMap2(document.getElementById("gmaps"));
			map.setCenter(point, 13);
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			map.enableDoubleClickZoom();
			map.setZoom(9);

			var tinyIcon = new GIcon(G_DEFAULT_ICON);
	        tinyIcon.image = "/design/images/icons/orPoint.png";
			tinyIcon.iconSize = new GSize(18, 29);
			tinyIcon.printImage = "/design/images/icons/orPoint.print.gif";
			tinyIcon.mozPrintImage = "/design/images/icons/orPoint.print.gif";
	        markerOptions = { icon:tinyIcon };

			var marker = new GMarker(point, markerOptions);
			map.addOverlay(marker);
		}
	}
});
