fireOn = Window.ie ? 'load' : 'domready';
window.addEvent(fireOn, function() {
	/**
	 * That CSS selector will find all <a> elements with the
	 * class boxed
	 *
	 * The example loads the options from the rel attribute
	 */
	SqueezeBox.assign($$('a.boxed'), {
		parse: 'rel'
	});
	if (GBrowserIsCompatible() && document.getElementById('latitude') && document.getElementById('longitude')) {
		var latitude = $('latitude').value;
		var longitude = $('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.disableDragging();
			/*map.addControl(new GSmallMapControl());*/
			/*map.enableDoubleClickZoom();*/
			map.setZoom(9);
			GEvent.addListener(map, "click", function() {
				SqueezeBox.loadModal($('form_url').value, 520, 500);
			});
			var tinyIcon = new GIcon(G_DEFAULT_ICON);
	        tinyIcon.image = "/design/images/icon.gif";
			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);
		}
	}
});
