function emptyvalidation(entered, alertbox)
{
	with(entered)
	{
		if (value==null || value=="")
		{
			if (alertbox!="")
			{
				alert(alertbox);
			}
			return false;
		}
		else 
		{
			return true;
		}
	}
}

function emailvalidation(entered, alertbox)
{
// E-mail Validation by Henrik Petersen / NetKontoret
// Explained at www.echoecho.com/jsforms.htm
// Please do not remove this line and the two lines above.
		with (entered)
		{
			apos=value.indexOf("@"); 
			dotpos=value.lastIndexOf(".");
			lastpos=value.length-1;
			if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) 
			{
				if (alertbox) 
				{
					alert(alertbox);
				} 
				return false;
			}
			else 
				{
					return true;
				}
		}
} 

//function checkInput()
//{
//	var input = true;
//	if (document.form1.email.value == "@")
//	alert("Bitte geben Sie einen Wert ein");
//	E-Mail.focus();
//	return false;
//}

function checkInput(form1)
{
//	var email = document.form1.email.value;
//	alert('Hallo, Haupt-Script läuft');
	with(form1)
	{
		
		if (emptyvalidation(Name, "Bitte geben Sie ihren Nachnamen ein!") == false)
		{
			Name.focus();
			return false;
		}
		
		
		if (emailvalidation(mail, "Bitte geben Sie eine gültige E-Mail Adresse ein!") == false)
	{
		mail.focus();
		return false;
	}
	}
} 
