<!--

Normal1 = new Image();
Normal1.src = "/de_DE/img/benutzung/anwendung/1_norm.jpg";
Highlight1 = new Image();
Highlight1.src = "/de_DE/img/benutzung/anwendung/1_over.jpg";

Normal2 = new Image();
Normal2.src = "/de_DE/img/benutzung/anwendung/2_norm.jpg";
Highlight2 = new Image();
Highlight2.src = "/de_DE/img/benutzung/anwendung/2_over.jpg";

Normal3 = new Image();
Normal3.src = "/de_DE/img/benutzung/anwendung/3_norm.jpg";
Highlight3 = new Image();
Highlight3.src = "/de_DE/img/benutzung/anwendung/3_over.jpg";

Normal4 = new Image();
Normal4.src = "/de_DE/img/benutzung/anwendung/4_norm.jpg";
Highlight4 = new Image();
Highlight4.src = "/de_DE/img/benutzung/anwendung/4_over.jpg";

function Bildwechsel(Bildnr,Bildobjekt) {window.document.images[Bildnr].src = Bildobjekt.src;}


function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function opentaf() {
var fenster = window.open('/de_DE/tellafriend.html','tellafriend','scrollbars=yes,resizable=yes,width=370,height=550,top=100,left=100,screenx=100,screeny=100');
// history.back();
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

		function popUp(loc)

		{

         		 window.open(loc,'tiny_window','width=440,height=500,resizable=no,status=no,scrollbars=yes,toolbar=no,directories=no,location=no,screenX=200,screenY=200');

		}

function checkAge(refAge, birthYear)
{


  /* checkAge checks if a person with birth month birthMonth and birth year birthYear is of age
     refAge or older than refAge. Birth day will be the first of the month in the check.*/
  var birthDay = '1';
  var birthMonth = '1';
  var dtBirth = new Date(birthYear, birthMonth, birthDay);

  var dtCurrent = new Date();
  var dtRef = new Date(dtCurrent.getYear()-refAge, dtCurrent.getMonth(), dtCurrent.getDate());

  return (dtBirth <= dtRef);
}


function isEmail(string)

{

   if (!string) return false;

   var iChars = "*|,\":<>[]{}`\';()&$#%";



   for (var i = 0; i < string.length; i++) {

      if (iChars.indexOf(string.charAt(i)) != -1)

         return false;

   }

   return true;

}





function isProper(string)

{

   if (!string) return false;

   var iChars = "*|,\"<:>[]{}`\';()@&$#%";



   for (var i = 0; i < string.length; i++) {

      if (iChars.indexOf(string.charAt(i)) != -1)

         return false;

   }

   return true;

}



function checkForm(form)

{
    text = form.lastName.value;
    if(text.length<=0)
    {
            alert("Bitte geben Sie Ihren Nachnamen ein");
            form.lastName.focus();
            return false;

    } else {
			   if(isProper(text) == false)
    			   {
                   alert("Bitte geben Sie Ihren Nachnamen ein.");
                   form.lastName.focus();
                   return false;
    			   }
			   }


   	text = form.EMail.value;
	if(text.length<=0)
		{
	alert("Bitte geben Sie Ihre Email-Adresse ein.");
		     form.EMail.focus();
			 return false;
		} else {
			   if(isEmail(text) == false)
    			   {
                   alert("Bitte geben Sie Ihre gültige E-Mail Adresse ein.");
                   form.EMail.focus();
                   return false;
    			   }
			   }

		var  z;
		z = form.ageyyyy.selectedIndex

		 if( z==0 )
		    {
		    	alert("Bitte geben Sie ein gültiges Geburtsjahr ein.");
				form.ageyyyy.focus();
		    	return false;
	    	}

	    if(!checkAge(13,form.ageyyyy.value))
	    {
	    	alert("Leider können wir keine Fragen von Personen unter 13 Jahren annehmen.");
			form.ageyyyy.focus();
	    	return false;
	    	}
    text = form.Content.value
	
	
if(!checkAge(18,form.ageyyyy.value))
{
	 if (confirm("Bitte bestätige, dass du die Erlaubnis deiner Eltern oder Erziehungsberechtigten hast, bevor das Kontaktformular versendet werden kann. Wenn du die Bestätigung deiner Eltern oder Erziehungsberechtigten hast, klicke auf OK, andererseits auf Abbrechen")){	
    	 return true;
	}else{
		form.ageyyyy.focus();
    	return false;
	}
}


if(text.length<=0)

    {
            alert("Bitte geben Sie Ihre Anfrage ein.");
            form.Content.focus();
            return false;
    }

}

function  direct()
{
  document.contact_us.firstName.focus();
 }

function isEmail(string)
{
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}

function isProper(string)
{
    if (string.search(/^\w+( \w+)?$/) != -1)
        return true;
    else
        return false;
}

function openTerms1()
{
  win=open ("/de_DE/terms.html","Terms","height=150,width=300,left=200,top=400,toolbar=no,menubar=no,scrollbars=no,resizable=no");
  win.focus();
}
//-->