/*A projekthez tartozó összes JS funkció gyűjtője*/

function toggleIt(node) {
	if (document.getElementById(node).style.display == "none") {
		document.getElementById(node).style.display = "block";
	} else {
		document.getElementById(node).style.display = "none";
	}
}

function popUp(url, windowName, height, width) {
	var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no");
	wnd.focus();
}

function popUpScroll(url, windowName, height, width) {
	var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes");
	wnd.focus();
}

function blurAnchors() { 
	if (document.getElementsByTagName) { 
		var a = document.getElementsByTagName("a"); 
		//collect all anchors A 
		for (var i = 0; i < a.length; i++) { 
			// mouse onfocus, blur anchors 
			a[i].onfocus = function(){this.blur();}; 
		} 
	}
}

function gMapLoad() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(47.35184985856322, 19.09046173095703), 12);
		var point = new GLatLng(47.35184985856322, 19.09046173095703);
		map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
		var marker = new GMarker(point);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml("2330 Dunaharaszti<br/>Klapka utca 16/B<br/><a href='http://maps.google.com/maps?saddr=Budapest, Hungary&daddr=47.35184985856322, 19.09046173095703' target='_blank'>Útvonal tervezése ide</a>");
		});
		map.addOverlay(marker);
	}
}