function msg(text){
alert(text);
}
function emailcheck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    return false
		 }

 		 return true					
	}


function validation(f){
	
	submitOK="true"
	var first_name = document.getElementById("first_name").value
	var last_name = document.getElementById("last_name").value
	var email = document.getElementById("email").value
	var checkemail = document.getElementById("checkemail").value
	warning =""

	if(first_name==""||first_name==null){
		warning = warning + "\nBitte tragen Sie hier Ihren Vornamen ein";
		submitOK="false";
	}
	
	if(last_name==""||last_name==null){
		warning = warning + "\nFüllen Sie bitte Ihre Nachname aus";
		submitOK="false";
	}	
	
	if(email==""||email==null){
		warning = warning + "\nFüllen Sie bitte Ihre E-MailAdresse aus";
		submitOK="false";		
	}

	else{
		if (emailcheck(email)==false){
			warning = warning + "\nUngültige Email-Adresse";
			submitOK="false";
		}
	}


	if(checkemail==""||checkemail==null){
		warning = warning + "\nFüllen Sie bitte Ihre Email-Adresse aus";
		submitOK="false";		
	}
	else{
		if (emailcheck(checkemail)==false){
			warning = warning + "\nUngültige Email-Adresse";
			submitOK="false";
		}else if(checkemail!=email){
			warning = warning + "\nDie bestätigte Email-Adresse ist nicht korrekt";
			submitOK="false";
		}
	}

	
	if(submitOK=="true"){
		return true;
		
	}

	else{
		alert(warning);
		return false;
	}
}




function checkCtrlIns(field)
{
if (event.ctrlKey==1 || event.keyCode==45)
{
return false
}

else
{
return true
}
}

function browser()
{
if (event.button == 2)


if (navigator.appName == 'Microsoft Internet Explorer')
{ clickIE()
}
if (navigator.appName == 'Netscape')
{ clickNS
}
else
{ clickNS
}

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
}

function reenable()
{
var message="";

function clickIE() {if (document.all) {(message);return true;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return true;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return true")
}