function hinweistab(id) {	GDownloadUrl('http://www.rivermap.ch/data/gethinweise.php?id=' + id, function(data, responseCode) {    if(responseCode == 200) {		  		var xml = GXml.parse(data);			var hits = xml.documentElement.getElementsByTagName("hinweis");			var result = "<div style=width:250px>Eintr&auml;ge: " + hits[0].getAttribute("active") + " (" + hits[0].getAttribute("total") + ") | <a href='http://www.rivermap.ch/hinweise.php?id=" + id + "' class='infoWindowLink' target=_blank title='in separatem Fenster'>Liste</a> | <a href='http://www.rivermap.ch/erfassen.php?id=" + id + "' class='infoWindowLink' target=_blank title='in separatem Fenster'>Erfassen</a><br>";			if (hits[0].getAttribute("total") > 0) {				result += "Neueste, aktive Meldungen (max. 5): <br>";									result += "<hr style='border: none 0; border-top: 1px solid #999; height: 1px; background-color: #fff; ' />";									result += "<div style=width:250px;height:150px><div style=overflow:auto;width:250px;height:150px>";				for (var i = 0; i < hits.length; i++) {					result += hits[i].getAttribute("erfasst") + "<br>";					result += "<b>" + hits[i].getAttribute("kategorie") + "</b><br>";		var b = hits[i].getAttribute("beschrieb"); b = b.replace(/###lt/g,"<"); b = b.replace(/###gt/g,">");								result += b + "<br /><br />";									for (var j = 1; j <= hits[i].getAttribute("bilder"); j++) {						result += '<div class="highslide-gallery">';						result += "<a href='http://www.rivermap.ch/bilder/"+ hits[i].getAttribute("id") + "-" + j + ".jpg' class='highslide' onclick='return hs.expand(this)'>";							result += "<img src='http://www.rivermap.ch/bilder/thumbs/"+ hits[i].getAttribute("id") + "-" + j + ".jpg' alt='Highslide JS' title='"+hits[i].getAttribute("text"+j)+"' /></a>";						result += "<div class='highslide-caption' style='font: 11px Verdana, Arial, sans-serif;'>"+hits[i].getAttribute("text"+j)+" ("+hits[i].getAttribute("kategorie");						if (hits[i].getAttribute("abfluss")) result += ", "+hits[i].getAttribute("abfluss")+" m&sup3;/s";						if (hits[i].getAttribute("datum")) result += ", "+hits[i].getAttribute("datum");						result += ")</div></div><br>";																}					result += "<hr style='border: none 0; border-top: 1px dotted #999; height: 1px; background-color: #fff; ' />";				}				result += "</div></div>";			}			result += "</div>";			map.openInfoWindowTabsHtml(lastlatlng, [new GInfoWindowTab("Abschnitt",lasthtml), new GInfoWindowTab("Hinweise",result)]);		} else if(responseCode == -1) {	    alert("Data request timed out. Please try later.");	  } else { 	    alert("Request resulted in error. Check XML file is retrievable.");	  }	});}function setPolyLineOptions(line, id, strecke, fluss, ww, hilfsstation, nw, mw, hw, refwert, dz, stationsname, wertung, map) {	var einheit = "m&sup3;/s";	if (stationsname == 'CAMPERTOGNO(VC)') einheit = "cm";	var html = "";	html += "<table border='0' width=250>";	html += "<tr align='left'><th colspan='2' class='infoWindowTitle'>" + strecke + "</th><td width=12><a href='http://www.rivermap.ch/befahrbarkeit.php' class='infoWindowLink' target=_blank title='Beschrieb Befahrbarkeit'>?<a/></td></tr>";	html += "<tr class='infoWindow'><td width=40>Fluss:</td><td>" + fluss + "</td></tr>";	html += "<tr class='infoWindow'><td width=40><a href='http://de.wikipedia.org/wiki/Wildwasserschwierigkeitsskala' class='infoWindowLink' target=_blank title='Schwierigkeitsskala'>WW</a>:</td><td>" + ww + "</td></tr>"; if (nw != 0.0) html += "<tr class='infoWindow'><td width=40>N-M-H:</td><td>" + nw.replace(".0", "") + " - " + mw.replace(".0", "") + " - " + hw.replace(".0", "")  + " " + einheit + "</td></tr>";		if (refwert != '') html += "<tr class='infoWindow'><td width=40 valign=top>Abfluss:</td><td><b>" + refwert + " " + einheit + "</b><br>" + dz + "<br>" + stationsname + "</td></tr>";	if (hilfsstation == "1") html += "<tr class='infoWindow'><td width=40>Achtung:</td><td><b>Wert von Hilfsstation!</b></td></tr>";	 	html += "<tr class='infoWindow'><td width=40 valign=top>Infos:</td><td><a href='http://www.rivermap.ch/merkblatt.php?id=" + id + "' class='infoWindowLink' target=_blank title='Lageplan und Details'>Merkblatt</a> | <a href='http://www.rivermap.ch/hinweise.php?id=" + id + "' class='infoWindowLink' target=_blank title='wichtige Zusatzinformationen'>Flusshinweise</a></td></tr>";	html += "<tr class='infoWindow'><th colspan='2' class='infoWindowWarning' align=left><b>Warnung:</b> Alle Angaben ohne Gew&auml;hr.<br>Jede Haftung wird abgelehnt!&nbsp;<a href='http://www.rivermap.ch/haftungsausschluss.php' class='infoWindowLink' target=_blank title='Haftungsausschluss'>mehr...</a></th></tr>";	html += "</table>";				var offx = 14;	var options = {  		'padding': '1px 1px',		'fontSize': '100%',		'offsetX': offx,		'backgroundColor': '#fff',    'border': '1px solid #000'   	};	GEvent.addListener(line, 'mouseover', function() { 		map.getDragObject().setDraggableCursor("pointer"); 		this.setStrokeStyle({color: "#804000"});		this.setStrokeStyle({weight:6});		lastsec = id;		lasthtml = html;		this.overlay = new MapTooltip(this, '<div style="white-space:pre"><strong>' + fluss + '</strong><br />' + strecke +'<br />' + ww + '</div>', options ); 	    map.addOverlay(this.overlay);    	});		GEvent.addListener(line, 'mouseout', function() { 		map.getDragObject().setDraggableCursor("url(http://maps.google.com/intl/en_us/mapfiles/openhand.cur),default"); 		this.setStrokeStyle({color: wertung}); 		this.setStrokeStyle({weight:5}); 		lastsec = 0;    map.removeOverlay(this.overlay);    	});		return line;}function createMarker(point, html, tooltip, type, corner) {	w = 18;	h = 25;	iconPath = "http://www.rivermap.ch/icon/";		var icon = new GIcon();	icon.image = iconPath + type.replace("#", "") + corner.replace("#", "") + ".png";  icon.iconSize = new GSize(w, h);  icon.shadow = iconPath + "shadow50.png";   icon.shadowSize = new GSize(w*1.8, h);   icon.iconAnchor = new GPoint(w/2, h);  icon.infoWindowAnchor = new GPoint(w/2, 0);  icon.infoShadowAnchor = new GPoint((w/2)*0.9, h*0.8); 	var marker = new PdMarker(point, {icon: icon});	marker.setTooltip(tooltip);  	marker.setOpacity(100);							GEvent.addListener(marker, 'click', function() {		lastsec = 0;		marker.openInfoWindowHtml(html);	});		return marker;}									function createInfoHtml(id, name, lat, lng, datum, zeit, wert, delta24, type, temp, hoehe, einzug, deltaproz, alter, i, kat, vhstxt, wetter) {		var pathBafu = "http://www.hydrodaten.admin.ch";	var pathSG = "http://www.umwelt.sg.ch";	var pathZH = "http://www.hochwasser.zh.ch/internet/bd/awel/wb/hw/de/messwerte/aktuelle_liste.html";	var pathBE = "http://www.bve.be.ch/wea/messwerte/tabelle/f_karte/tab_index.html";	var ll = WGS84toCH1903(lat, lng);	var html = "";		html += "<table border='0'>";	html += "<tr align='left'><th colspan='3' class='infoWindowTitle'>" + name + "</th><td width=12><a href='http://www.rivermap.ch/abfluss.php' class='infoWindowLink' target=_blank title='Beschrieb Abfluss'>?</></td></tr>";	html += "<tr class='infoWindow'><td>Messung:&nbsp;</td><td>" + datum + "</td><td>" + zeit + "</td><td> </td></tr>";	html += "<tr class='infoWindow'><td>Abfluss:</td><td><b>" + wert + " m&sup3;/s&nbsp;&nbsp;&nbsp;</b></td><td>";	if (temp) html+= temp + " &deg;C";	html += "</td><td> </td></tr>";	html += "<tr><td class='infoWindow'>Werte:</td><th class='infoWindow' colspan='3' align='left'>provisorische Rohdaten!</th></tr>";	if (delta24) html += "<tr class='infoWindow'><td>&plusmn;24h:</td><td>" + delta24 + " m&sup3;/s&nbsp;&nbsp;&nbsp;</td><td>" + deltaproz + " %</td><td> </td></tr>";	if (hoehe) html += "<tr class='infoWindow'><td>H&ouml;he:</td><td>" + hoehe + " m.&uuml;.M</td><td> </td><td> </td></tr>";	if (einzug) html += "<tr class='infoWindow'><td>Einzug:</td><td>" + einzug + " km&sup2;</td><td> </td><td> </td></tr>";		switch (kat) {		case ("bafu"):			lnad = pathBafu + '/d/index.htm';			lnst = pathBafu + '/d/' + id + '.htm';			lnbi = pathBafu + '/lhg/pic/P' + id + '.jpg';			ln07 = pathBafu + '/lhg/' + id + '_7.PDF'; 			ln40 = pathBafu + '/lhg/' + id + '_40.PDF';			lntx = 'Bundesamt f&uuml;r Umwelt';			break;					case ("sg"):			lnad = pathSG + '/home/daten___fakten/bereiche/wasser/hydrometrie.filter__all.paging__no.html';			lnst = pathSG + '/tools/hydrometrie/stationen/og/' + id + '.html';			lnbi = '';			ln07 = '';			ln40 = 'http://ftp.sg.oca.ch/Hydro/' + id + '_40Tage_OG_Q_k.pdf';			lntx = 'umwelt.sg.ch';			break;					case ("zh"):			lnad = pathZH;			lnst = '';			lnbi = '';			switch (id) {				case '519':					lnz7 = '5183';					break;				case '581':					lnz7 = '5149';					break;				case '523':					lnz7 = '5196';					break;				case '582':					lnz7 = '548';					break;				case '547':					lnz7 = '5124';					break;				case '572':					lnz7 = '588';					break;			}																											ln07 = 'http://www.hw.zh.ch/hochwasser/mac/aaw/0' + lnz7 + '.PDF';			ln40 = '';			lntx = 'hochwasser.zh.ch';			break;					case ("be"):			lnad = pathBE;			lnst = '';			lnbi = '';			lnz7 = id;			if (id == '70') lnz7 = '68';																											ln07 = 'http://www.bve.be.ch/wea/messwerte/tabelle/f_karte/index/Diagramme/7Tage' + lnz7 + '.PDF';			ln40 = '';			lntx = 'bve.be.ch';			break;				}				html += "<tr><td>Details:</td><th colspan='3' class='infoWindow' align='left'>";	if (lnst) html += "<a href='" + lnst + "' class='infoWindowLink' target=_blank title='Details Station'>Station</a> ";	if (lnbi) html += "<a href='" + lnbi + "' class='infoWindowLink' target=_blank title='Bild Station'>Bild</a> ";	if (ln07) html += "<a href='" + ln07 + "' class='infoWindowLink' target=_blank title='Link PDF'>7-Tage</a> ";	if (ln40) html += "<a href='" + ln40 + "' class='infoWindowLink' target=_blank title='Link PDF'>40-Tage</a>";	html += "</th></tr>";		html += "<tr><td class='infoWindow'>Quelle:</td><th colspan='3' class='infoWindow' align='left'><a href='" + lnad + "' class='infoWindowLink' target=_blank title='Liste Stationen'> " + lntx + "</a></th></tr>";				if (vhstxt) html += "<tr><td class='infoWindow'>Spitze:</td><th colspan='3' class='infoWindow' align='left'><a href='http://www.bafu.admin.ch/hydrologie/01833/02021/02023/index.html?lang=de' class='infoWindowLink' target=_blank title='Detailinfo und PDF'>" + vhstxt + " m&sup3;/s</a></th></tr>";	html += "<tr><td class='infoWindow'>Wetter:</td><th colspan='3' class='infoWindow' align='left'><a href='http://www.meteoschweiz.admin.ch/web/de/wetter/detailprognose/lokalprognose.html?language=de&plz=" + wetter + "' class='infoWindowLink' target=_blank title='Prognose Langzeit'>MeteoSchweiz</a> <a href='http://www.meteocentrale.ch/index.php?L=1&searchString=" + wetter + "&x=8&y=9&id=swiss' class='infoWindowLink' target=_blank title='Prognose Detail/Langzeit'>meteocentrale</a></th></tr>";																	 	html += "<tr><td class='infoWindow'>Karten:</td><th colspan='3' class='infoWindow' align='left'><a href='http://map.topin.travel/?p=webcams&lat=" + lat + "&lng=" + lng + "&z=11&m=topo' class='infoWindowLink' target=_blank title='Webcam-Karte dieser Region'>Webcams</a> <a href='http://map.search.ch/" + ll.y + "," + ll.x + "?z=64&poi=haltestelle,zug,viasuisse,webcam,spital,geldautomat,tankstelle,pass,wasserfall,meteoradar' class='infoWindowLink' target=_blank title='Karte dieser Region mit diversen Infos'>Verkehr,Geo,...</a></th></tr>";																					 	html += "<tr class='infoWindow'><td>Zoom:</td><th colspan='3' class='infoWindow'> - ";	for (ii = 8; ii < 19; ii+=2) {					html += "<a href='javascript:map.setCenter(gmarkers[" + i + "].getPoint()," + ii + ");map.closeInfoWindow()' class='infoWindowLink'>" + ii + "</a> ";	}	html += "+</th></tr></table>";			return html;}