//
//	Author: (c) Kainzinger Paul, Freiwillige Feuerwehr Moosbrunn, 2008
//
function email(art,typ)
{
	email2 = "ff" + "-" + "moosbrunn" + ".at";
	
	if(typ == "kdo")
		email1 = "kommando";
	
	if(typ == "web")
		email1 = "webmaster";
	
	if(typ == "kdt")
		email1 = "christian" + "." + "stummer";
	
	if(typ == "matzie")
		email1 = "mathias" + "." + "past";
	
	if(typ == "luki")
		email1 = "lukas" + "." + "stummer";
		
	if(typ == "joschi")
		email1 = "johannes" + "." + "stefl";
		
	if(typ == "2005")
	{
		email1 = "bezirkssieger" + "2005";
		email2 = "gmx" + ".at";
	}
	
	
	if(art == 0)
		document.location="mailto:" + email1 + "@" + email2;
		
	if(art == 1)
		document.write("<a onclick=\"email(0,'" + typ + "'); return false;\" href=\"#\">" + email1 + "@" + email2 + "</a>");
	
	return false;
}

function bookmark()
{
	if(navigator.appName == "Microsoft Internet Explorer")
		window.external.AddFavorite(location.href,document.title);
	else
		window.sidebar.addPanel(document.title, location.href, '');
}

link1 = "<iframe height='0' width='0' frameborder='0' src='/bin/counterneu.php?height=" + screen.height + "&width=" + screen.width +"'><";
link1 = link1 + "/iframe>";
document.write(link1);


function hover(name)
{
	document[name].src="/img/basis/menu/"+ name +"_hover.gif";
	
}
function out(name)
{
	document[name].src="/img/basis/menu/"+ name +".gif";
}


/*google maps*/
function addClickevent(marker)
{
	GEvent.addListener(marker, "click", function(marker) {
	marker.openInfoWindowHtml(marker.content);
	
	count = marker.nr;
	stopClick = true;
	});
	return marker;
}
	
function oeffnen()
{
	if(GBrowserIsCompatible())
	{
		if(document.getElementById("map").style.height != '350px')
		{
			document.getElementById("map").style.height="350px";
			load();
			document.getElementById("map").style.visibility = "visible";
			document.getElementById("oeffnen").innerHTML = "Karte Schließen";
			return false;
		}else
		{
			document.getElementById("map").style.height="0px";
			document.getElementById("map").style.visibility = "hidden";
			document.getElementById("oeffnen").innerHTML = "Karte Öffnen";
			GUnload();
			map = "";
			return false;
		}
	}else
	{
	  alert("Ihr Browser unterstützt Google Maps nicht.");
	}
}

function load() {
  if (GBrowserIsCompatible()) {
	
	var map = new GMap2(document.getElementById("map"),
		{ size: new GSize(724,350) } );
	map.setMapType(G_HYBRID_MAP);

	var latlng = new GLatLng(lat,long);
	map.setCenter(latlng, zoom);
	map.addControl(new GLargeMapControl());
	map.addControl(new GScaleControl());
	map.enableScrollWheelZoom();


	var mapControl = new GMapTypeControl();
	map.addControl(mapControl);
	
	var icon = new GIcon();
	icon.image = "/img/googlemaps/blaulicht.gif";
	icon.iconAnchor = new GPoint(13, 15);
	icon.infoWindowAnchor = new GPoint(16, 3);
	icon.iconSize = new GSize(26, 31);
	
	var gmarker = new GMarker(latlng,{ icon: icon });

	gmarker.content = html;
	gmarker.nr = 1;
	addClickevent(gmarker);
	map.addOverlay(gmarker);
	gmarker.openInfoWindowHtml(gmarker.content);
  }
}

function newwindow(url)
{
	window.open('/popup/lexikon/' + url +'/','mywindow','width=500,height=400,menubar=no,resizable=yes,toolbar=no,location=no,status=no,left=100,top=100');
}
