<!--

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('taf.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("Veuillez mentionner votre nom.");
            form.lastName.focus();
            return false;

    } else {
			   if(isProper(text) == false)
    			   {
                   alert("Veuillez mentionner votre nom.");
                   form.lastName.focus();
                   return false;
    			   }
			   }


   	text = form.EMail.value;
	if(text.length<=0)
		{
	alert("Veuillez mentionner votre adresse e-mail.");
		     form.EMail.focus();
			 return false;
		} else {
			   if(isEmail(text) == false)
    			   {
                   alert("Veuillez mentionner votre adresse e-mail.");
                   form.EMail.focus();
                   return false;
    			   }
			   }

		var  z;
		z = form.ageyyyy.selectedIndex

		 if( z==0 )
		    {
		    	alert("Veuillez mentionner votre année de naissance.");
				form.ageyyyy.focus();
		    	return false;
	    	}

	    if(!checkAge(13,form.ageyyyy.value))
	    {
	    	alert("Nous ne pouvons malheureusement pas accepter les questions de personnes âgées de moins de 13 ans.");
			form.ageyyyy.focus();
	    	return false;
	    	}
    text = form.Content.value
	
	
if(!checkAge(18,form.ageyyyy.value))
{
	 if (confirm("Pour pouvoir envoyer le formulaire de contact, tu dois confirmer que tes parents ou tes tuteurs légaux t’y ont autorisé. Si tu as obtenu l’autorisation de tes parents ou tuteurs, clique sur OK, sinon sur annuler.")){	
    	 return true;
	}else{
		form.ageyyyy.focus();
    	return false;
	}
}


if(text.length<=0)

    {
            alert("Veuillez formuler votre question..");
            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 ("terms.html","Terms","height=150,width=300,left=200,top=400,toolbar=no,menubar=no,scrollbars=no,resizable=no");
  win.focus();
}
//-->