// 04.09.2009 Feldmarkierungen [far]

function checkForm()
{
// VORNAME  
	if(document.mailer.vorname.value.length < 3)
	{
		document.mailer.vorname.style.backgroundColor='#ffdddd';
		var fehler = true;
		// document.mailer.vorname.focus();
	}
	var pruef_text = document.mailer.vorname.value.toUpperCase();
	for(n = 0; n < pruef_text.length; n++)
    {
		if(pruef_text.charAt(n) < "0" || pruef_text.charAt(n) > "9"){}else
		{
			document.mailer.vorname.style.backgroundColor='#ffdddd';
			var fehler = true;
		}
	}
	
// NACHNAME  
	if(document.mailer.nachname.value.length < 3 || !isNaN (document.mailer.nachname.value))
	{
	document.mailer.nachname.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.nachname.focus();
	}
	var pruef_text = document.mailer.nachname.value.toUpperCase();
	for(n = 0; n < pruef_text.length; n++)
    {
		if(pruef_text.charAt(n) < "0" || pruef_text.charAt(n) > "9"){}else
		{
			document.mailer.nachname.style.backgroundColor='#ffdddd';
			var fehler = true;
		}
	}
	
// STRASSE  
	if(document.mailer.str.value.length < 3 || !isNaN (document.mailer.str.value))
	{
	document.mailer.str.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.str.focus();
	}
	var pruef_text = document.mailer.str.value.toUpperCase();
	for(n = 0; n < pruef_text.length; n++)
    {
		if(pruef_text.charAt(n) < "0" || pruef_text.charAt(n) > "9"){}else
		{
			document.mailer.str.style.backgroundColor='#ffdddd';
			var fehler = true;
		}
	}

// HSN  
	if( document.mailer.hsn.value.length < 1)
	{
	document.mailer.hsn.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.hsn.focus();
	}

// PLZ  
	if(document.mailer.plz.value.length < 5 || document.mailer.plz.value.length > 10)
	{
	document.mailer.plz.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.plz.focus();
	}

// ORT  
	if( document.mailer.ort.value.length < 3 || !isNaN (document.mailer.ort.value))
	{
	document.mailer.ort.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.ort.focus();
	}

// EMAIL  
	if(document.mailer.email.value.indexOf('@')==-1 || document.mailer.email.value.indexOf('.')==-1)
	{
	document.mailer.email.style.backgroundColor='#ffdddd';
	var fehler = true;
	//document.mailer.email.focus();
	}

// Fehler
	if(fehler == true)
	{
	document.getElementById('hinweis').style.display='block';
	document.getElementById('hinweis_agb').style.display='none';
	document.getElementById('hinweis_ds').style.display='none';
	document.getElementById('hinweis_radio').style.display='none';
	return false
	}

// Promotion

    var boolRadio = false;

    for(var i=0; i<4; i++)
	{
        if(document.mailer.promo[i].checked)
        {
			boolRadio = true;
		}
    }
	
	if(boolRadio == false)
	{
	document.getElementById('hinweis_agb').style.display='none';
	document.getElementById('hinweis').style.display='none';
	document.getElementById('hinweis_ds').style.display='none';
	document.getElementById('hinweis_radio').style.display='block';
	return false
	}

// DATENSCHUTZ
	if(document.mailer.ds.checked==false)
	{
	document.getElementById('hinweis_ds').style.display='block';
	document.getElementById('hinweis').style.display='none';
	document.getElementById('hinweis_agb').style.display='none';
	document.getElementById('hinweis_radio').style.display='none';
	return false
	}

// AGB
	if(document.mailer.agb.checked==false)
	{
	document.getElementById('hinweis_agb').style.display='block';
	document.getElementById('hinweis').style.display='none';
	document.getElementById('hinweis_ds').style.display='none';
	document.getElementById('hinweis_radio').style.display='none';
	return false
	}

}

//-->