function email(name, domain, tld) {
	var printemail = '<a href="mailto:'+name+'@'+domain+'.'+tld+'" title="'+name+'@'+domain+'.'+tld+'">'+name+'@'+domain+'.'+tld+'</a>';
	document.write(printemail);
}

function chkmail(mailstring) {
	var resmail=mailstring.match(/\b(^(\S+@).+((\..{2,10}))$)\b/gi);
	if (resmail==null){ return false; }else{ return true; }
}

function checkData(theForm) {
	theForm.action = 'anfrage-buchung.html';

	if(theForm.fullname.value=="") {
		theForm.fullname.focus();
		return(false);
	}

	if(theForm.street.value=="") {
		theForm.street.focus();
		return(false);
	}

	if(theForm.email.value=="") {
		theForm.email.focus();
		return(false);
	}

	if(theForm.email.value!="") {
		var mailres=chkmail(theForm.email.value);
		if (mailres==false) {
			theForm.email.focus();
			return(false);
		}
	}

	if(theForm.email.value!=theForm.emailrepeat.value) {
		theForm.emailrepeat.focus();
		return(false);
	}

	if(theForm.privacy.checked!=true) {
		theForm.privacy.focus();
		return(false);
	}
}

