function set_focus() {
     document.contact.name.focus();
   }

function formCheck(){
var content = document.contact.name.value;
	content = content.toLowerCase();

	var nameLetters ='abcdefghijklmnopqrstuvwxyz.- ';

	if((checkContent(content,nameLetters) == false)||(content == "")){

	alert("Name Falsch. Bitte korrigieren.");
	document.contact.name.focus()
	return false;
}

function checkContent(toCheck,criteria){
		for(i=0;i<toCheck.length;i++){
		letter = toCheck.charAt(i);
		if(criteria.indexOf(letter) == -1){
		return false;
				}

			}
			return true;
		}

  var content = document.contact.email.value;

	if((checkMail(content) == false)||(content == "")){
	alert("Mail ist nicht korekt. Bitte korrigieren.");
	document.contact.email.focus();
	return false;
		}


  function checkMail(mailadresse){
		var atPos;
		var anotherAtPos;
		var pointPos;

		atPos = mailadresse.indexOf('@');
		pointPos = mailadresse.lastIndexOf('.');
		anotherAtPos = mailadresse.indexOf('@', atPos + 1);


		if((atPos != -1)&&(anotherAtPos == -1)){
		if (pointPos > atPos){
		return true;
		}else{
		return false;
		}
		}else{
		return false;
			}
		}
    }