function verifForm(){
	if (document.forms['inscription'].password1.value!=document.forms['inscription'].password2.value) {
	 alert('Vos mots de passe sont diff&eacute;rents');
	 return;
	 }
	else if (document.forms['inscription'].email.value.length==0) {
	 alert('Veuillez entrer votre email');
	 return;
	 }
	else if (document.forms['inscription'].email.value!=document.forms['inscription'].email2.value) {
	 alert('Vos adresses emails ne correspondent pas');
	 return;
	 }
	else if (document.forms['inscription'].nickName.value.length==0) {
	 alert('Veuillez entrer un surnom');
	 return;
	 }
	else if (document.forms['inscription'].password1.value.length<5) {
	 alert('Veuillez entrer minimum 5 caractères pour votre mot de passe');
	 return;
	 }
	else if (document.forms['inscription'].checkCGU.checked==false) {
	 alert('Veuillez lire et approuver les conditions g&eacute;n&eacute;rales d\'utilisation.');
	 return;
	 }
	else if (document.forms['inscription'].verif_code.value.length!=5) {
	 alert('Veuillez entrer le code de v&eacute;rification.');
	 return;
	 }
	else {
	var i=0
		for (i; i<document.forms['inscription'].password1.value.length ; i++){
			if ((document.forms['inscription'].password1.value.charAt(i)<'A' || document.forms['inscription'].password1.value.charAt(i)>'Z') && 
			(document.forms['inscription'].password1.value.charAt(i)<'a' || document.forms['inscription'].password1.value.charAt(i)>'z') &&
			(document.forms['inscription'].password1.value.charAt(i)<'0' || document.forms['inscription'].password1.value.charAt(i)>'9')){
				alert ('Caract&egrave;res non valides pr&eacute;sents dans votre mot de passe');
				return;
			}
		}
	}
	document.forms['inscription'].submit();
}

function verifForm2(){
if (document.forms['inscription'].password1.value!=document.forms['inscription'].password2.value) {
	 alert('Vos mots de passe sont diff&eacute;rents');
	 return;
	 }
	else if (document.forms['inscription'].email.value.length==0) {
	 alert('Veuillez entrer votre email');
	 return;
	 }
	else if (document.forms['inscription'].nickName.value.length==0) {
	 alert('Veuillez entrer un surnom');
	 return;
	 }
	else if (document.forms['inscription'].password1.value.length>0) {
  	 if (document.forms['inscription'].password1.value.length<5) {
      	 alert('Veuillez entrer minimum 5 caractères pour votre mot de passe');
      	 return;
      }
	 }
	else {
	var i=0
		for (i; i<document.forms['inscription'].password1.value.length ; i++){
			if ((document.forms['inscription'].password1.value.charAt(i)<'A' || document.forms['inscription'].password1.value.charAt(i)>'Z') && 
			(document.forms['inscription'].password1.value.charAt(i)<'a' || document.forms['inscription'].password1.value.charAt(i)>'z') &&
			(document.forms['inscription'].password1.value.charAt(i)<'0' || document.forms['inscription'].password1.value.charAt(i)>'9')){
				alert ('Caract&egrave;res non valides pr&eacute;sents dans votre mot de passe');
				return;
			}
		}
	}
	document.forms['inscription'].submit();
}

function displayPass(){
  document.getElementById("pass").innerHTML='<p>Entrez votre email ci-dessous.</p>';
	document.getElementById("pass").innerHTML+='<p>Email : <input name="mail" type="text" size="35"></p>';
	document.getElementById("pass").innerHTML+='<p><input type ="submit" value="Envoyer"></p>';
}

function displayDownload(ver){
  document.getElementById("download").innerHTML='<br /><a href="downloads/helpmeonline_windows_'+ver+'.exe"><img src="images/win.gif"> Cliquez ici pour t&eacute;l&eacute;charger Help Me Online pour Window XP ou Vista.</a>';
  document.getElementById("download").innerHTML+='<br /><a href="downloads/helpmeonline_windows_'+ver+'_x64.exe"><img src="images/win64.gif"> Cliquez ici pour t&eacute;l&eacute;charger Help Me Online pour Window XP ou Vista x64 (version 64 bits).</a>';
  document.getElementById("download").innerHTML+='<br /><a href="downloads/helpmeonline_macos_'+ver+'.dmg"><img src="images/osx.gif"> Cliquez ici pour t&eacute;l&eacute;charger Help Me Online pour MacOS X.</a><br />Pour MacOS X, vous devez &eacute;galement <a href="http://www.apple.com/support/downloads/javaformacosx105update1.html">installer JAVA.</a>';
  document.getElementById("download").innerHTML+='<br /><br /><br /><a href="docs/mode-emploi-nv-version-client.pdf"><img src="images/pdf_icon.gif" width="25" height="25"> Mode d\'emploi - Version Client</a>';
  document.getElementById("download").innerHTML+='<br /><a href="docs/mode-emploi-nv-version-intervenant.pdf"><img src="images/pdf_icon.gif" width="25" height="25"> Mode d\'emploi - Version Intervenant</a>';
}


function MM_swapImgRestore() { //v3.0
  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_preloadImages() { //v3.0
  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_findObj(n, d) { //v4.01
  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() { //v3.0
  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];}
}
