// Copyright (c) 2003 by ARTNER EDV-Lösungen

function Highlight(theElement)
{
	if (!document.layers)
	{
		theElement.style.border="1px solid #000077";
		theElement.style.color="#005500";
		theElement.style.background="#DDFFDD";	   
	}
}

function Lowlight(theElement)
{
	if (!document.layers)
	{
		theElement.style.border="1px solid #0B8140";
		theElement.style.color="#000000";
		theElement.style.background="#ffffff";   		      	
	}
}
		   
function submitFormBestellung()
{
	var bErr = false;
	var theForm = document.forms.Bestellung;

	if (theForm.txtName.value == "") 
	{ 
		theForm.txtName.style.background="#ffaaaa";
		theForm.txtName.style.color="#ffffff";
		bErr = true;
	}

   	if (theForm.txtVorname.value == "") 
	{ 
		theForm.txtVorname.style.background="#ffaaaa";
		theForm.txtVorname.style.color="#ffffff";
		bErr = true;
	} 
	
	if (theForm.txtStrasse.value == "") 
	{ 
		theForm.txtStrasse.style.background="#ffaaaa";
		theForm.txtStrasse.style.color="#ffffff";
		bErr = true;
	} 
	
	if (theForm.txtPLZOrt.value == "") 
	{ 
		theForm.txtPLZOrt.style.background="#ffaaaa";
		theForm.txtPLZOrt.style.color="#ffffff";
		bErr = true;
	}

	if (theForm.txtBundesland.value == "") 
	{ 
		theForm.txtBundesland.style.background="#ffaaaa";
		theForm.txtBundesland.style.color="#ffffff";
		bErr = true;
	}
	
	if (theForm.txtMenge.value == "") 
	{ 
		theForm.txtMenge.style.background="#ffaaaa";
		theForm.txtMenge.style.color="#ffffff";
		bErr = true;
	} 
	
	if (theForm.optZahlung[1].checked)
	{
		if (document.forms.Bestellung.txtMR.value == '')
		{
			theForm.txtMR.style.background="#ffaaaa";
			theForm.txtMR.style.color="#ffffff";
			bErr = true;
		}
	}
			    	
	if (!bErr)
	{
		theForm.submit();
	}
	else
	{
		alert("Bitte die roten Felder überprüfen und ggf. korrigieren!");
	}
}

function submitFormInfomaterial()
{
	var bErr = false;
	var theForm = document.forms.Infomaterial;

	if (theForm.txtName.value == "") 
	{ 
		theForm.txtName.style.background="#ffaaaa";
		theForm.txtName.style.color="#ffffff";
		bErr = true;
	}

   	if (theForm.txtVorname.value == "") 
	{ 
		theForm.txtVorname.style.background="#ffaaaa";
		theForm.txtVorname.style.color="#ffffff";
		bErr = true;
	} 
	
	if (theForm.txtStrasse.value == "") 
	{ 
		theForm.txtStrasse.style.background="#ffaaaa";
		theForm.txtStrasse.style.color="#ffffff";
		bErr = true;
	} 
	
	if (theForm.txtPLZOrt.value == "") 
	{ 
		theForm.txtPLZOrt.style.background="#ffaaaa";
		theForm.txtPLZOrt.style.color="#ffffff";
		bErr = true;
	}

	if (theForm.txtBundesland.value == "")
	{
		theForm.txtBundesland.style.background="#ffaaaa";
		theForm.txtBundesland.style.color="#ffffff";
		bErr = true;
	}

	if (theForm.EMFrom1.value == "") 
	{ 
		theForm.EMFrom1.style.background="#ffaaaa";
		theForm.EMFrom1.style.color="#ffffff";
		bErr = true;
	}
			    	
	if (!bErr)
	{
		theForm.submit();
	}
	else
	{
		alert("Bitte die roten Felder überprüfen und ggf. korrigieren!");
	}
}