//<![CDATA[

window.onload = init;
window.onunload = GUnload;

function init()
{
	GLoad();
}

// arrays to hold copies of the markers and html used by the sidebar
// because the function closure trick doesnt work there
var gmarkers = [];
var htmls = [];
var i = 0;

var map = null;
var geocoder = null;
		
// Icoana pt orase
var iconOras = new GIcon();
iconOras.image = "http://www.constantaterenuri.ro/images/icon1.png";
iconOras.shadow = "http://www.constantaterenuri.ro/images/icon1_shadow.png";
iconOras.iconSize = new GSize(28, 30);
iconOras.shadowSize = new GSize(42, 30);
iconOras.iconAnchor = new GPoint(14, 30);
iconOras.infoWindowAnchor = new GPoint(13, 5);

// Icoana pt terenuri
var iconTeren = new GIcon();
iconTeren.image = "http://www.constantaterenuri.ro/images/icon2.png";
iconTeren.shadow = "http://www.constantaterenuri.ro/images/icon2_shadow.png";
iconTeren.iconSize = new GSize(32, 32);
iconTeren.shadowSize = new GSize(42, 32);
iconTeren.iconAnchor = new GPoint(9, 30);
iconTeren.infoWindowAnchor = new GPoint(16, 5);


function GLoad() {

	if (GBrowserIsCompatible())
	{
		map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(oLat,oLng), 16);
		map.addControl(new GLargeMapControl());
		map.setMapType(G_HYBRID_MAP);
		map.addControl(new GMapTypeControl());
		geocoder = new GClientGeocoder();
		// Read the data from xml.php
		
		//curMarker = new GMarker(point);
		map.addOverlay(curMarker);
	}
	else 
	{
		alert("Sorry, the Google Maps API is not compatible with this browser");
	}
}

//]]>

