tooltip = null; //globale Deklarationen
bundeslandListe = null;
document.onmousemove = updateTooltip;
function updateTooltip(e) {
  try {
    x = (document.all) ? window.event.clientX + document.documentElement.scrollLeft : e.pageX;
    y = (document.all) ? window.event.clientY + document.documentElement.scrollTop : e.pageY;
    if (tooltip != null) {
      tooltip.style.left = (x + 20) + "px";
      tooltip.style.top = (y + 20) + "px";
    }
  } catch (error) { error=null; }
}

function showTooltip(id) {
  try {
    tooltip = document.getElementById(id);
    tooltip.style.display = "block"
  } catch (error) { error=null; }
}

function hideTooltip() {
  try {
    tooltip.style.display = "none";
  } catch (error) { error=null; }
}
//Zeigt die Liste zu diesem Bundesland und wechselt auf das Bundesland
function showBundeslandListe(id) {
  try {
    hideBundesLandListe()
	if(id != 0){
		bundeslandListe = document.getElementById(id);
		bundeslandListe.style.display = "block";
		document.getElementById("referenzenNaviTxt").innerHTML = '<a href="javascript:showBundeslandListe(0);">Zur&uuml;ck zur &Uuml;bersicht</a>';
	}
	
	var bildPfad = "veranda/maps/";
	var bildName = null;
	var useMap = null;
	switch(id){
			case 108: //Brandenburg
				bildName = "BRANDENBURG.png";
				useMap = "map_BRANDENBURG";
			break;
			case 109: //Berlin
				bildName = "BERLIN.png";
				useMap = "map_BERLIN";
			break;
			case 110: //BadenWuertenBerg
				bildName = "BADENWUERTENBERG.png";
				useMap = "map_BADENWUERTENBERG";
			break; 
			case 111: //Bayern
				bildName = "BAYERN.png";
				useMap = "map_BAYERN";
			break;
			case 112: //Bremen
				bildName = "BREMEN.png";
				useMap = "map_BREMEN";
			break;	
			case 113: //Hessen
				bildName = "HESSEN.png";
				useMap = "map_HESSEN";
			break;	
			case 114: //Hamburg
				bildName = "HAMBURG.png";
				useMap = "map_HAMBURG";
			break;	
			case 115: //Mecklenburg-Vorpommern
				bildName = "MECKLENBURGVORPOMMERN.png";
				useMap = "map_MECKLENBURGVORPOMMERN";
			break;
			case 116: //Niedrsachsen
				bildName = "NIEDERSACHSEN.png";
				useMap = "map_NIEDERSACHSEN";
			break;
			case 117: //NRW
				bildName = "NORDRHEINWESTFALEN.png";
				useMap = "map_NORDRHEINWESTFALEN";
			break;
			case 118: //Rheinland-Pfalz
				bildName = "RHEINLANDPFALZ.png";
				useMap = "map_RHEINLANDPFALZ";
			break;
			case 119: //Schleseweg-Holstein
				bildName = "SCHLESWIGHOLSTEIN.png";
				useMap = "map_SCHLESWIGHOLSTEIN";
			break;
			case 120: //Saarland
				bildName = "SAARLAND.png";
				useMap = "map_SAARLAND";
			break;
			case 121: //Sachsen
				bildName = "SACHSEN.png";
				useMap = "map_SACHSEN";
			break;
			case 122: //Sachsen Anhalt
				bildName = "SACHSENANHALT.png";
				useMap = "map_SACHSENANHALT";
			break;
			case 123: // Thueringen
				bildName = "THUERINGEN.png";
				useMap = "map_THUERINGEN";
			break;
			case 124: //Oesterreich
				bildName = "OESTERREICH.png";
				useMap = "map_OESTERREICH";
			break; 
			case 133: //Schweiz
				bildName = "SCHWEIZ.png";
				useMap = "map_SCHWEIZ";
			break;
			default:
				bildName = "DACH.png";
				useMap = "map_DACH";
				document.getElementById("referenzenNaviTxt").innerHTML = 'Bitte klicken Sie auf Ihr Bundesland oder Ihr Land!';
	}
	if(bildName != null && useMap != null){
		document.images["karte"].src = bildPfad+bildName;
		document.images["karte"].useMap = "#"+useMap;	
	}
	
  } catch (error) { error=null; }
}
function hideBundesLandListe() {
  try {
    bundeslandListe.style.display = "none";
  } catch (error) { error=null; }
}
 
