var a_anzeige_neu = false;

// ***** Anrede-Dropdwown ****

function anrede_dropdown(pagename,Event,top)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(1);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 1;

		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 184px; height: 40px;\">";
		anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=20 onClick=\"setze_input_wert1('anrede', 'Frau', 'vorname');\"><p class=\"dd1\">Frau</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=20 onClick=\"setze_input_wert1('anrede', 'Herr', 'vorname');\"><p class=\"dd1\">Herr</p></td>";
		anzeige += "</tr>";
		anzeige += "</table>";
		
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px"; //top  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";
		 
		 
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #FFFFFF; border: 1px #999999 solid; width: 184px; height: 22px;\">";
		anzeige += "<tr>";
		anzeige += "<td><p class=\"dd2\">Bitte wählen Sie Ihre Anrede aus!</p></td>";
		anzeige += "</table>";
		
		//document.getElementById('id2').innerHTML = anzeige;
	        //document.getElementById('id2').style.top = pos.y - 22  + "px";
	        //document.getElementById('id2').style.left = pos.x + "px";
	       // document.getElementById('id2').style.display = "block";
		}

	}

// ***** Sprache-Dropdwown ****

function sprache_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(2);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 2;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 184px; height: 40px;\">";
		anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=20 onClick=\"setze_input_wert2('sprache', 'Deutsch', 'sprache_id', '1', 'staat');\"><p class=\"dd1\">Deutsch</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=20 onClick=\"setze_input_wert2('sprache', 'Englisch', 'sprache_id', '2', 'staat');\"><p class=\"dd1\">Englisch</p></td>";
		anzeige += "</tr>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** Land-Dropdwown ****

function land_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(3);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 3;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 184px; height: 48px;\">";
		
		for (var i = 0; i < arr1.length; i++)
	
			{
			anzeige = anzeige +  (arr1[i]);
			}
		
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** PLZ-Muster einblenden *****

function plz_muster_einblenden(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(4);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 4;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #FFFFFF; border: 2px #999999 solid; width: 184px; height: 22px;\">";
		anzeige += "<tr>";
		
		if (document.getElementById('plz_muster').value == '0')
			{
			anzeige += "<td><p class=\"dd2\">Bitte wählen Sie zuerst ein Land aus!</p></td>";
			}
		else
			{
			anzeige += "<td><p class=\"dd2\">Bitte geben Sie Ihre PLZ nach folgendem Muster ein: <b>" + document.getElementById('plz_muster').value + "</b></p></td>";
			}
		
		anzeige += "</table>";
	
		document.getElementById('id2').innerHTML = anzeige;
	        document.getElementById('id2').style.top = pos.y - 37  + "px";
	        document.getElementById('id2').style.left = pos.x + "px";
	        document.getElementById('id2').style.display = "block";

		}

	}

// ***** Ort-Dropdown öffnen *****

function ort_dropdown(pagename)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(5);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 5;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 130px; height: 24px;\">";
		anzeige += "<tr>";
		anzeige += "<td><div style=\"overflow:auto; max-height: 260px;\">";
		anzeige += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=100% >";
		
		for (var i = 0; i < arrOrte.length; i++)
	
			{
			anzeige = anzeige +  (arrOrte[i]);
			}
		
		anzeige += "</div></td>";
		anzeige += "</tr>";
		anzeige += "</table>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** Bundesland-Dropdwown *****

function bundesland_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(6);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 6;
		
		ZeigeBundeslaender(document.getElementById('staat_pos').value);
		
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 184px; height: 48px;\">";
		anzeige += "<tr>";
		anzeige += "<td><div style=\"overflow:auto; max-height: 310px;\">";
		anzeige += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=100% >";
		
		//for (var i = 0; i < arr2.length; i++)
	
		//	{
		//	anzeige = anzeige + (arr2[i]);
		//	}
		
		anzeige += "</table>";
		anzeige += "</div></td>";
		anzeige += "</table>";
	
		//document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}
		
// ***** KM-Dropdwown ****

function km_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(7);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 7;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 184px; height: 48px;\">";
		anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 5 km', 'km_id', '5', 'vw2');\"><p class=\"dd1\">bis 5 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 10 km', 'km_id', '10', 'vw2');\"><p class=\"dd1\">bis 10 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 15 km', 'km_id', '15', 'vw2');\"><p class=\"dd1\">bis 15 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 20 km', 'km_id', '20', 'vw2');\"><p class=\"dd1\">bis 20 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 25 km', 'km_id', '25', 'vw2');\"><p class=\"dd1\">bis 25 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 30 km', 'km_id', '30', 'vw2');\"><p class=\"dd1\">bis 30 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 35 km', 'km_id', '35', 'vw2');\"><p class=\"dd1\">bis 35 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 40 km', 'km_id', '40', 'vw2');\"><p class=\"dd1\">bis 40 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 45 km', 'km_id', '45', 'vw2');\"><p class=\"dd1\">bis 45 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 50 km', 'km_id', '50', 'vw2');\"><p class=\"dd1\">bis 50 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 75 km', 'km_id', '75', 'vw2');\"><p class=\"dd1\">bis 75 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'bis 100 km', 'km_id', '100', 'vw2');\"><p class=\"dd1\">bis 100 km</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('km', 'über 100 km', 'km_id', '999', 'vw2');\"><p class=\"dd1\">über 100 km</p></td>";
		anzeige += "</tr>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}
	
// ***** Tag-Dropdwown ****

function tag_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	var tmp_zahl = '';
	
	check_dropdown(8);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 8;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 38px; height: 48px;\">";
		anzeige += "<tr>";
		anzeige += "<td><div style=\"overflow:auto; max-height: 210px;\">";
		anzeige += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=100% >";
		
		for (var i = 1; i < 32; i++)
			{
			
			tmp_zahl = check_zahl(i);
			
			anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
			anzeige += "<td height=19 onClick=\"setze_input_wert2('tag', '" + tmp_zahl + "', 'tag_id', '" + i + "', 'monat');\"><p class=\"dd1\">" + tmp_zahl + "</p></td>";
			anzeige += "</tr>";
			
			}
		
		anzeige += "</table>";
		anzeige += "</div></td>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** Monat-Dropdwown ****

function monat_dropdown(pagename,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(9);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 9;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 84px; height: 48px;\">";
		anzeige += "<tr>";
		anzeige += "<td><div style=\"overflow:auto; max-height: 210px;\">";
		anzeige += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=100% >";
		
		anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Januar', 'monat_id', '1', 'jahr');\"><p class=\"dd1\">Januar</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Februar', 'monat_id', '2', 'jahr');\"><p class=\"dd1\">Februar</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'März', 'monat_id', '3', 'jahr');\"><p class=\"dd1\">März</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'April', 'monat_id', '4', 'jahr');\"><p class=\"dd1\">April</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Mai', 'monat_id', '5', 'jahr');\"><p class=\"dd1\">Mai</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Juni', 'monat_id', '6', 'jahr');\"><p class=\"dd1\">Juni</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Juli', 'monat_id', '7', 'jahr');\"><p class=\"dd1\">Juli</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'August', 'monat_id', '8', 'jahr');\"><p class=\"dd1\">August</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'September', 'monat_id', '9', 'jahr');\"><p class=\"dd1\">September</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Oktober', 'monat_id', '10', 'jahr');\"><p class=\"dd1\">Oktober</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'November', 'monat_id', '11', 'jahr');\"><p class=\"dd1\">November</p></td>";
		anzeige += "</tr><tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
		anzeige += "<td height=19 onClick=\"setze_input_wert2('monat', 'Dezember', 'monat_id', '12', 'jahr');\"><p class=\"dd1\">Dezember</p></td>";
		
		anzeige += "</tr>";		
		anzeige += "</table>";
		anzeige += "</div></td>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** Jahr-Dropdwown ****

function jahr_dropdown(pagename,von_jahr,session)
	{
	
	var pos = getPosition(pagename);
	
	check_dropdown(10);
	
	if (a_anzeige_neu)
		{

		document.getElementById('adp').value = 10;
		
		var anzeige = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #F6F6F6; border: 1px #eb6a27 solid; width: 52px; height: 48px;\">";
		anzeige += "<tr>";
		anzeige += "<td><div style=\"overflow:auto; max-height: 210px;\">";
		anzeige += "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=100% >";
		
		for (var i = von_jahr; i >= 1930; i--)
			{
			
			anzeige += "<tr onmouseover=\"an(this);\" onmouseout=\"aus(this);\">";
			anzeige += "<td height=19 onClick=\"setze_input_wert2('jahr', '" + i + "', 'jahr_id', '" + i + "', 'bemerkung');\"><p class=\"dd1\">" + i + "</p></td>";
			anzeige += "</tr>";
			
			}
		
		anzeige += "</table>";
		anzeige += "</div></td>";
		anzeige += "</table>";
	
		document.getElementById('id1').innerHTML = anzeige;
	        document.getElementById('id1').style.top = pos.y + 18  + "px";
	        document.getElementById('id1').style.left = pos.x + "px";
	        document.getElementById('id1').style.display = "block";

		}

	}

// ***** Prüfen ob Dropdown bereits offen ist *****

function check_dropdown(welches)
	{

	if (document.getElementById('adp').value == welches)
		{
		
		if (document.getElementById('id1').style.display == 'block')
			{
			
			document.getElementById('id1').style.display = 'none';
			document.getElementById('id2').style.display = 'none';
			document.getElementById('adp').value = 0;
			
			}
		
		a_anzeige_neu = false;
		
		}
	else
		{
		a_anzeige_neu = true;
		}
	
	}

// ***** Länge einer Zahl prüfen und erweitern *****

function check_zahl(wert)
	{
	
	if ((wert + "").length ==1)
		{
		return '0' + wert;
		}
	else
		{
		return wert;
		}
		
	}
	
// ***** Formular überprüfen *****

function formular_checken()
	{
	
	var fehler = 0;
	
	for (i = 0; i < FormularFelder.length; i++)
		{

        	testThis = document.getElementById(FormularFelder[i]).value;
        	
        	if (testThis.length < 1)
        		{
            		document.getElementById(FormularFelder[i]).style.backgroundColor = '#FDEEE3';
            		fehler ++;
			}
		else
			{
            		document.getElementById(FormularFelder[i]).style.backgroundColor = '#FFFFFF';
			}
		}
        	
        if (fehler == 0)
        	{
        	document.forma.submit();
        	}
        else
        	{
        	document.getElementById('fehler').style.display = "block";
        	}
        	
        }

// ***** Formular leeren *****

function formular_leeren()
	{
	
	document.getElementById('fehler').style.display = "none";
	
	document.getElementById('anrede').value = '';
	document.getElementById('vorname').value = '';
	document.getElementById('name').value = '';
	document.getElementById('firma').value = '';
	document.getElementById('email').value = '';
	document.getElementById('mitteilung').value = '';
	
	document.getElementById('anrede').style.backgroundColor = '#FFFFFF';
	document.getElementById('vorname').style.backgroundColor = '#FFFFFF';
	document.getElementById('name').style.backgroundColor = '#FFFFFF';
	document.getElementById('firma').style.backgroundColor = '#FFFFFF';
	document.getElementById('email').style.backgroundColor = '#FFFFFF';
	document.getElementById('mitteilung').style.backgroundColor = '#FFFFFF';
	
	}

// ***** Newsletter-Formular leeren *****

function formular_leeren_2()
	{
	
	document.getElementById('fehler').style.display = "none";
	
	document.getElementById('anrede').value = '';
	document.getElementById('vorname').value = '';
	document.getElementById('name').value = '';
	document.getElementById('firma').value = '';
	document.getElementById('email').value = '';
	
	document.getElementById('anrede').style.backgroundColor = '#FFFFFF';
	document.getElementById('vorname').style.backgroundColor = '#FFFFFF';
	document.getElementById('name').style.backgroundColor = '#FFFFFF';
	document.getElementById('firma').style.backgroundColor = '#FFFFFF';
	document.getElementById('email').style.backgroundColor = '#FFFFFF';
	
}

// ***** Newsletter-Abbestellen-Formular leeren *****

function formular_leeren_3()
	{
	
	document.getElementById('fehler').style.display = "none";
	
	document.getElementById('email').value = '';
	
	document.getElementById('email').style.backgroundColor = '#FFFFFF';
	
	}

// ***** TD-Zeile in Auswahl-Menüs farbig markieren *****
	
function an(pagename)
	{
	pagename.style.background = '#FDEEE3';
	pagename.style.cursor = 'pointer';
	}

// ***** TD-Zeile in Auswahl-Menüs zurücksetzen *****
	
function aus(pagename)
	{
	pagename.style.background='#F6F6F6';
	}

// ***** Werte1 aus Auswahl-Menü setzen *****

function setze_input_wert1(name1, wert1, naechstes)
	{
	
	document.getElementById(name1).value = wert1;
	document.getElementById(name1).className = 'dd4';
	document.getElementById(name1).style.backgroundColor = '#FFFFFF';
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	
	document.getElementById(naechstes).disabled = false;
	document.getElementById(naechstes).focus();
	
	}

// ***** Werte2 aus Auswahl-Menü setzen *****

function setze_input_wert2(name1, wert1, name2, wert2, naechstes)
	{
	
	if (wert2 > 0) 
		{
		document.getElementById(name1).value = wert1;
		}
	else
		{
		document.getElementById(name1).focus();	
		}
	
	document.getElementById(name2).value = wert2;
	document.getElementById(name1).className = 'dd4';
	document.getElementById(name1).style.backgroundColor = '#FFFFFF';
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	
	document.getElementById(naechstes).disabled = false;
	document.getElementById(naechstes).focus();
	
	}	

// ***** Werte3 aus Auswahl-Menü setzen *****

function setze_input_wert3(name1, wert1, name2, wert2, name3, wert3)
	{
	
	document.getElementById(name1).value = wert1;
	document.getElementById(name2).value = wert2;
	document.getElementById(name3).value = wert3;
	document.getElementById(name1).className = 'dd4';
	document.getElementById(name1).style.backgroundColor = '#FFFFFF';
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	
	}	

// ***** Werte aus Land-Auswahl-Menü setzen *****

function setze_input_land(name1, wert1, name2, wert2, name3, wert3, name4, wert4, name5, wert5, pos)
	{
	
	document.getElementById(name1).value = wert1;
	document.getElementById(name2).value = wert2;
	document.getElementById(name3).value = wert3;
	document.getElementById(name4).value = wert4;
	document.getElementById(name5).value = wert5;
	document.getElementById('staat_pos').value = pos;
	document.getElementById(name1).className = 'dd4';
	document.getElementById(name1).style.backgroundColor = '#FFFFFF';
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	
	document.getElementById('plz').disabled = false;
	document.getElementById('plz').style.backgroundColor = '#FFFFFF';
	document.getElementById('plz').value = '';
	
	if (wert2 >= 1)
		{
		document.getElementById('ort').disabled = false;
		document.getElementById('ort').style.backgroundColor = '#FFFFFF';
		document.getElementById('ort').value = '';
		}
	
	document.getElementById('bundesland').disabled = false;
	document.getElementById('bundesland').style.backgroundColor = '#FFFFFF';
	document.getElementById('bundesland').className = 'dd4';
	document.getElementById('bundesland').value = '';
	document.getElementById('bundesland_id').value = 0;
	
	document.getElementById('vw1').disabled = false;
	document.getElementById('vw1').style.backgroundColor = '#FFFFFF';
		
	document.getElementById('plz').focus();
	
	}	

// ***** Feld farbig markieren *****

function feld_markieren1(pagename)
	{
	
	div_ausblenden();
	
	pagename.className = 'dd2';

	}

function feld_markieren2(pagename)
	{
	
	div_ausblenden();
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	pagename.style.backgroundColor = '#FDEEE3';

	}

// ***** Feld auf Inhalt prüfen *****

function feld_checken(pagename, muss)
	{
	
	testThis = pagename.value;
        	
	//alert(FormularFelder[i]);
	
	if (testThis.length < 1 && muss == 1)
		{
    		pagename.style.backgroundColor = '#FDEEE3';
    		}
	else
		{
    		pagename.style.backgroundColor = '#FFFFFF';
		}
	}

// ***** PLZ-Feld  prüfen *****

function plz_checken(pagename, muss)
	{
	
	testThis = pagename.value;
        	
	//alert(testThis);
	
	var fehler = true; //if (a_anzeige_neu)
	
	if (testThis.length + 1 < document.getElementById('plz_zeichen').value)
		{
    		pagename.style.backgroundColor = '#FDEEE3';
    		}
	else
		{
			
		document.getElementById('ort').disabled = false;
			document.getElementById('ort').style.backgroundColor = '#FFFFFF';
				
		if (document.getElementById('staat_id').value < 4)
			{
				
			los(document.getElementById('staat_id').value, testThis);
			
			document.getElementById('ort').className = 'dd4';
			document.getElementById('ort').value = '';
			document.getElementById('ort').focus()
			
			}	
    		
    		pagename.style.backgroundColor = '#FFFFFF';
    		
		}
	
	}

// ***** Produkt-Checkbox prüfen *****

function check_produkt(welches)
	{
	
	if (document.getElementById('p' + welches).value == 0)
		{
		document.getElementById('produkt' + welches).src = '/images/checkbox_an.gif';
		document.getElementById('p' + welches).value = 1;
		}
	else
		{
		document.getElementById('produkt' + welches).src = '/images/checkbox_aus.gif';
		document.getElementById('p' + welches).value = 0;
		}
		
	}

// ***** alle offenen DIV's ausblenden *****

function div_ausblenden()
	{
		
	document.getElementById('id1').style.display = 'none';
	document.getElementById('id2').style.display = 'none';
	document.getElementById('adp').value = 0;
	}
	
// ***** Position des aktuellen Elements bestimmen ****
		
function getPosition(obj)
	{

	var pos = { x:0, y:0 };

	do
		{
		pos.x += obj.offsetLeft;
		pos.y += obj.offsetTop;
		} while (obj = obj.offsetParent);

	return pos;

	}

// ***** System-Werte setzen / prüfen *****
	
function setupDescriptions()
	{

	var x = navigator.appVersion;
	y = x.substring(0,4);

	if (y>=4) setVariables();

	}

var x,y,a,b;

function setVariables()
	{

	if (navigator.appName == "Netscape")
		{

		h=".left=";
		v=".top=";
		dS="document.";
		sD="";

		}
	else 
		{

		h=".pixelLeft=";
		v=".pixelTop=";
		dS="";
		sD=".style";

		}
	
	}

var isNav = (navigator.appName.indexOf("Netscape") !=-1);
