function appInit() { 	if (getURLParam("lat")) {		latitude = parseFloat(getURLParam("lat"));	} 		if (getURLParam("lng")) {		longitude = parseFloat(getURLParam("lng"));	} 		if (getURLParam("zoom")) {		zoomlevel = parseInt(getURLParam("zoom"));	}}function appConfig(map) {		this.map = map;		this.map.enableDoubleClickZoom();	this.map.enableContinuousZoom();	this.map.enableScrollWheelZoom();		this.map.setMapType(G_PHYSICAL_MAP); 		switch (getURLParam("map")) {		case 'k': this.map.setMapType(G_NORMAL_MAP); break;		case 's': this.map.setMapType(G_SATELLITE_MAP); break;		case 'h': this.map.setMapType(G_HYBRID_MAP); break;		case 'g': this.map.setMapType(G_PHYSICAL_MAP); break;	}		largeMapControl = new GLargeMapControl();	mapTypeControl = new GMenuMapTypeControl(); 	overviewMapControl = new GOverviewMapControl();		if (getURLParam("ctrl") == "0") {		gcontrol = 0;	}		if (gcontrol) {			this.map.addControl(largeMapControl);				this.map.addControl(mapTypeControl);		this.map.addControl(overviewMapControl);	} 		if (getURLParam("lbl") == "1") {		glabel = 1;	}		if (getURLParam("leg") == "0") {		glegend = 0;	}		if (getURLParam("mrk") == "0") {		gmarker = 0;	}		if (getURLParam("inf")) {		ginfo = getURLParam("inf");	}		if (getURLParam("menu") == "0") {		gmenu = 0;	}	}function appOverlays(map) {	this.map = map;		var html='<div class="menuSwitch" id="menuSwitch">&nbsp;Menu</div>';	loadingMessage=new HtmlControl(html);	map.addControl(loadingMessage, new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(70, 6))); 	var html='<div class="menuPanel" id="menuPanel" style="display:none">';		html += '<div class="menuButton" id="guideLink" title="Erkl&auml;rung der ersten Schritte">&nbsp;Kurzanleitung</div>';	html += '<div class="menuButton" id="helpLink" title="Webseite">&nbsp;RiverMap Home</div>';	html += '<div class="menuButton" id="hinweisLink" title="wichtige und n&uuml;tzliche Infos">&nbsp;Flusshinweise</div>';	html += '<div class="menuButton" id="wwLink" style="border-bottom-color:#000" title="Ansicht der Schwierigkeiten">&nbsp;Karte WW-Grade</div>';		html += '<div class="menuButton" id="generateLink" style="border-bottom-color:#CCC" title="aktuelle URL in neuem Fenster generieren um als Lesezeichen speichern zu k&ouml;nnen">&nbsp;Link erstellen</div>';	html += '<div class="menuButton" id="toggleControls" title="Google Maps Steuerelemente in den Ecken">';	html += '&nbsp;Steuerung <span>';	html += (gcontrol)?'aus':'ein';	html += '</span></div>';	html += '<div class="menuButton" id="toggleMarkers" title="Karte wird dazu neu geladen">';	html += '&nbsp;Stationen <span>';	html += (gmarker)?'aus':'ein';	html += '</span></div>';	html += '<div class="menuButton" id="toggleLabels" title="Werte unter den Stationsmarkern">';	html += '&nbsp;Abflusslabel <span>';	html += (glabel)?'aus':'ein';	html += '</span></div>';	html += '<div class="menuButton" id="toggleLegende" title="zur Befahrbarkeit der Abschnitte">';	html += '&nbsp;Legende <span>';	html += (glegend)?'aus':'ein';	html += '</span></div>';	loadingMessage=new HtmlControl(html);	map.addControl(loadingMessage, new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(0, 0)));										if (dbgMode) {		var html='<div class="debugWindow" id="debugWindow">debug</div>';		loadingMessage=new HtmlControl(html, { selectable:true });		this.map.addControl(loadingMessage, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(2, 38)));	}		if (newsBar) {		var html='<div class="newsBar" id="newsBar" style="display:none">' + newsText + '</div>';		loadingMessage=new HtmlControl(html, { selectable:true });		this.map.addControl(loadingMessage, new GControlPosition(G_ANCHOR_BOTTOM_LEFT, new GSize(80, 5)));	}}function refreshLink(map) {	this.map = map;	z = this.map.getCenter();	x = (Math.round(z.lat()*1000000)/1000000);	y = (Math.round(z.lng()*1000000)/1000000);		var para = '?lat=' + x;	para += '&lng=' + y;	para += '&zoom=' + this.map.getZoom();	para += '&map=';		if (this.map.getCurrentMapType() == G_NORMAL_MAP) { 		para += 'k';	}	if (this.map.getCurrentMapType() == G_SATELLITE_MAP) { 		para += 's';	}	if (this.map.getCurrentMapType() == G_HYBRID_MAP) { 		para += 'h';	}	if (this.map.getCurrentMapType() == G_PHYSICAL_MAP) { 		para += 'g';	}		return getURLBase() + para + '&ctrl=' + gcontrol + '&mrk=' + gmarker + '&lbl=' + glabel + '&leg=' + glegend; }function refreshDebug(map) {	this.map = map;	button = document.getElementById('debugWindow');	var html = dbgMsg + dbgVar;	button.innerHTML = html;}function UnCryptMailto( s ){    var n = 0;    var r = "";    for( var i = 0; i < s.length; i++)    {        n = s.charCodeAt( i );        if( n >= 8364 )        {            n = 128;        }        r += String.fromCharCode( n - 1 );    }    return r;}function linkTo_UnCryptMailto( s ){    location.href=UnCryptMailto( s );}
