function updateLaender(laender, regids) {

  // select resetten
 	document.destselector.landselector.length = 1;
 	document.destselector.destselector.length = 1;
	
	// index des selektieren Eintrags finden
	myIndex = document.destselector.regionselector.selectedIndex;
	
	// Einträge starten bei Index 1, die Regionen auch. Deshalb muss nicht korrigiert werden
	for (var i = 0; i < laender.length; i++) {
		ok = (myIndex == regids[i]);
		if(ok) {
		  NeuerEintrag = new Option(laender[i], laender[i], false, true);
  		document.destselector.landselector.options[document.destselector.landselector.length] = NeuerEintrag;
	  }
  }	

  document.destselector.landselector.selectedIndex = 0;
  
}	




function updateDest(destname, land) {

  // select resetten
 	document.destselector.destselector.length = 1;
	
	// index des selektieren Eintrags finden
	myIndex = document.destselector.landselector.selectedIndex;
	myLand =  document.destselector.landselector.options[myIndex].text;
	
	for (var i = 0; i < destname.length; i++) {
		ok = (myLand == land[i]);
		if(ok) {
		  NeuerEintrag = new Option(destname[i], destname[i], false, true);
  		document.destselector.destselector.options[document.destselector.destselector.length] = NeuerEintrag;
	  }
  }	

  document.destselector.destselector.selectedIndex = 0;
}



function zeigWetterdaten(digmet_ids, names, country) {
	// digmet_ids ist ein Array aller digmet_ids der sta stationen

	// index des selektieren Eintrags finden
	myIndex    =  document.destselector.destselector.selectedIndex;
	myDestName =  document.destselector.destselector.options[myIndex].text;


	// Selektiere Region
	myRegion    =  document.destselector.regionselector.selectedIndex;

	// Selektiertes Land
	myLandIndex = document.destselector.landselector.selectedIndex;
	myLand =  document.destselector.landselector.options[myLandIndex].text;


	for (var i = 0; i < names.length; i++) {
		ok = (myDestName == names[i]);
		if(ok) {
			location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country='+country+'&language=DE&state=daten&digmet_id='+digmet_ids[i]+'&region='+myRegion+'&land='+myLand+'&landIndex='+myLandIndex+'&regionIndex='+myRegion+'&destIndex='+myIndex);
	  }
  }	

	
//	location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country=CH&language=DE&state=daten&digmet_id='+myDestName+'&region='+myRegion+'&land='+myLand);
}




function zeigSuche(country) {

	myMonth     =  document.sucheselector.suchsel.selectedIndex; // 1 bis 12
  myMonthName =  document.sucheselector.suchsel.options[myMonth].text;


  if (document.sucheselector.suchparam[0].checked == true) {
  	art = document.sucheselector.suchparam[0].value;
  	titel = art + ' im ' + myMonthName;
		location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country='+country+'&language=DE&state=suche&such_param=luft&monat='+myMonth+'&titel='+titel);
  }
  if (document.sucheselector.suchparam[1].checked == true) {
  	art = document.sucheselector.suchparam[1].value;
  	titel = art + ' im ' + myMonthName;
		location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country='+country+'&language=DE&state=suche&such_param=sonne&monat='+myMonth+'&titel='+titel);
  }
  if (document.sucheselector.suchparam[2].checked == true) {
  	art = document.sucheselector.suchparam[2].value;
  	titel = art + ' im ' + myMonthName;
		location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country='+country+'&language=DE&state=suche&such_param=regen&monat='+myMonth+'&titel='+titel);
  }
  if (document.sucheselector.suchparam[3].checked == true) {
  	art = document.sucheselector.suchparam[3].value;
  	titel = art + ' im ' + myMonthName;
		location.replace('http://meteo.lenaxis.ch/statravel/mainblack.php?country='+country+'&language=DE&state=suche&such_param=wasser&monat='+myMonth+'&titel='+titel);
  }

}


