var FELDBACH    = '<a href="http://www.wetter24.de/" target="_blank" title="Wetter24: Ihr Wetter-Dienst"><img src="http://www.wetter24.de/meteo/hptool/logo_wetter24.png" alt="" width="120" height="32" border="0"></a><br/><div style="background-color:#f8b920;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;;width:120px;text-align:center"><a href="http://www.wetter24.de/de/home/wetter/weltwetter/ortewetter/stadt/43X332/feldbach.html?cityID=43X332" target="_blank" style="color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;" title="Ausführliche Wetter-Vorhersage für Feldbach">Wetter Feldbach</a></div><iframe  width="120" height="97" scrolling="no" frameborder="0" src="http://www.wetter24.de/meteo/hptool/index.php?cid=43X332&cityName=Feldbach&l=de&style=11&v=de&ver=2&c1=000000&c2=f8b920&c3=000000&c4=f8b920&c5=000000&c6=f8b920&c7=f8b920&f1a=1&f1b=1&f2a=1&f2b=1&f3a=1&f3b=1&ct1=1&ct2=2&ct3=6&ct4=0&ct5=0&fcd=0"></iframe><div style="height:14px;width:120px;text-align:center;background-color:#f8b920"><a href="http://www.wetter24.de/" target="_blank" style="text-decoration: none;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px" title="Aktuelles Wetter und Vorhersagen für 250.000 Orte weltweit">Mehr Wetter</a></div>';
var WEIZ        = '<a href="http://www.wetter24.de/" target="_blank" title="Wetter24: Ihr Wetter-Dienst"><img src="http://www.wetter24.de/meteo/hptool/logo_wetter24.png" alt="" width="120" height="32" border="0"></a><br/><div style="background-color:#f8b920;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;;width:120px;text-align:center"><a href="http://www.wetter24.de/de/home/wetter/weltwetter/ortewetter/stadt/43X1910/weiz.html?cityID=43X1910" target="_blank" style="color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;" title="Ausführliche Wetter-Vorhersage für Weiz">Wetter Weiz</a></div><iframe  width="120" height="97" scrolling="no" frameborder="0" src="http://www.wetter24.de/meteo/hptool/index.php?cid=43X1910&cityName=Weiz&l=de&style=11&v=de&ver=2&c1=000000&c2=f8b920&c3=000000&c4=f8b920&c5=000000&c6=f8b920&c7=f8b920&f1a=1&f1b=1&f2a=1&f2b=1&f3a=1&f3b=1&ct1=1&ct2=2&ct3=6&ct4=0&ct5=0&fcd=0"></iframe><div style="height:14px;width:120px;text-align:center;background-color:#f8b920"><a href="http://www.wetter24.de/" target="_blank" style="text-decoration: none;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px" title="Aktuelles Wetter und Vorhersagen für 250.000 Orte weltweit">Mehr Wetter</a></div>';
var RADKERSBURG = '<a href="http://www.wetter24.de/" target="_blank" title="Wetter24: Ihr Wetter-Dienst"><img src="http://www.wetter24.de/meteo/hptool/logo_wetter24.png" alt="" width="120" height="32" border="0"></a><br/><div style="background-color:#f8b920;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;;width:120px;text-align:center"><a href="http://www.wetter24.de/de/home/wetter/weltwetter/ortewetter/stadt/43X135/bad-radkersburg.html?cityID=43X135" target="_blank" style="color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;" title="Ausführliche Wetter-Vorhersage für Bad Radkersburg">Wetter Bad Radkersburg</a></div><iframe  width="120" height="97" scrolling="no" frameborder="0" src="http://www.wetter24.de/meteo/hptool/index.php?cid=43X135&cityName=Bad+Radkersburg&l=de&style=11&v=de&ver=2&c1=000000&c2=f8b920&c3=000000&c4=f8b920&c5=000000&c6=f8b920&c7=f8b920&f1a=1&f1b=1&f2a=1&f2b=1&f3a=1&f3b=1&ct1=1&ct2=2&ct3=6&ct4=0&ct5=0&fcd=0"></iframe><div style="height:14px;width:120px;text-align:center;background-color:#f8b920"><a href="http://www.wetter24.de/" target="_blank" style="text-decoration: none;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px" title="Aktuelles Wetter und Vorhersagen für 250.000 Orte weltweit">Mehr Wetter</a></div>';
var FFELD       = '<a href="http://www.wetter24.de/" target="_blank" title="Wetter24: Ihr Wetter-Dienst"><img src="http://www.wetter24.de/meteo/hptool/logo_wetter24.png" alt="" width="120" height="32" border="0"></a><br/><div style="background-color:#f8b920;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;;width:120px;text-align:center"><a href="http://www.wetter24.de/de/home/wetter/weltwetter/ortewetter/stadt/43X387/fuerstenfeld.html?cityID=43X387" target="_blank" style="color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px;" title="Ausführliche Wetter-Vorhersage für Fuerstenfeld">Wetter F&uuml;rstenfeld</a></div><iframe  width="120" height="97" scrolling="no" frameborder="0" src="http://www.wetter24.de/meteo/hptool/index.php?cid=43X387&cityName=F%26uuml%3Brstenfeld&l=de&style=11&v=de&ver=2&c1=000000&c2=f8b920&c3=000000&c4=f8b920&c5=000000&c6=f8b920&c7=f8b920&f1a=1&f1b=1&f2a=1&f2b=1&f3a=1&f3b=1&ct1=1&ct2=2&ct3=6&ct4=0&ct5=0&fcd=0"></iframe><div style="height:14px;width:120px;text-align:center;background-color:#f8b920"><a href="http://www.wetter24.de/" target="_blank" style="text-decoration: none;color:#000000;font-family:Verdana,Arial,Tahoma,Times New Roman;font-weight:normal;font-size:10px" title="Aktuelles Wetter und Vorhersagen für 250.000 Orte weltweit">Mehr Wetter</a></div>';


function isWeatherKat(katID)
{
	if (katID >= 226 && katID <= 229)
		return true;
	return false;
}

function loadWeather(katID)
{
	var weatherDIV = document.getElementById("weatherDIV");
	if (!weatherDIV)
	{
		weatherDIV = document.createElement("div");
		weatherDIV.setAttribute("id", "weatherDIV");
	}
	clearChilds(weatherDIV);
	
	switch(katID)
	{
		case 226: weatherDIV.innerHTML = RADKERSBURG;
							break;
		case 227: weatherDIV.innerHTML = FELDBACH;
							break;
		case 228: weatherDIV.innerHTML = FFELD;
							break;
		case 229: weatherDIV.innerHTML = WEIZ;
							break;
	}
	getMap().getContainer().appendChild(weatherDIV);
	var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(getMap().getSize().width - 120,300));  
  pos.apply(weatherDIV);
  createXsign();
}

function createXsign()
{
	var x = document.getElementById("closeWeather");
	if (!x)
	{
		var contextmenu = document.createElement("div");
		contextmenu.setAttribute("id", "closeWeather");
	  contextmenu.style.background = "#ffffff";
	  contextmenu.style.border = "1px solid #8888FF";
	  contextmenu.style.fontSize = "8pt";
	  contextmenu.innerHTML = '<a href="javascript:void(0);" onclick="closeWeather(); return false;" >X</a>';
	  getMap().getContainer().appendChild(contextmenu);
	
	  var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(getMap().getSize().width - 10,285));  
	  pos.apply(contextmenu);
	}
}

function closeWeather()
{
	getMap().getContainer().removeChild(document.getElementById("closeWeather"));
	getMap().getContainer().removeChild(document.getElementById("weatherDIV"));
}