
/****************************************
* Javascript de Jean-Philippe Sarrosquy *
* visiter : http://www.itssystem.com    *
* Pour des JavaScripts gratuits         *
****************************************/

<!--

// Fonction pour valider un formulaire--------------------------------------------
function Verif(){     

var strError = "";
var strCountError = 0;

		if (document.form.Login.value == ""){      
		strError = ""+ strError +"Inscrire votre Login<BR>"  
		strCountError = strCountError + 1;  
	}

		if (document.form.Password.value == ""){      
		strError = ""+ strError +"Inscrire votre Mot de passe<BR>"  
		strCountError = strCountError + 1;  
	} 

// Formulaire valide -----------------------------------------------------------------------------------------
	if (strError != "" )  {
	document.form.Login.focus();  
	ErrorMessage(strError,strCountError);
	return false; 
	}
	else
	return true;   
}
// End----------------------------------------------------------------------------------------------------------------


// Creation de la page d'erreur ---------------------------------------------------------
function ErrorMessage(strError,strCountError) { 

 	w = 320;
	h = 160;
	pw = parseInt((screen.width-w)/2);
	ph = parseInt((screen.height-h)/2);
	strPluriel = "";
	
if (strCountError > 1){
	strPluriel = "s";
}	
	
  	storywin = window.open('','','width=320,height=160,scrollbars=no,resizable=no,screenX='+ pw +',screenY='+ ph +',left='+ pw +',top='+ ph +''); 
  	with (storywin.document)
  { 
      writeln('<html><head>')
      writeln('<title>Une erreur pour acceder a votre compte</title>')
	  writeln('<link rel="stylesheet" href="css/style.css" type="text/css">')
      writeln('</head>')
      writeln('<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">')  
      writeln('<table width="300" border="0" cellspacing="0" cellpadding="0">')
	  writeln('<br>')
      writeln('  <tr>')
      writeln('    <td width="10"><img src="images/spacer.gif" width="10" height="1"></td>')
      writeln('    <td width="290" class="titre" height="20">'+ strCountError +' erreur'+ strPluriel +' pour votre inscription.</td>')
      writeln('  </tr>')
      writeln('  <tr>')
      writeln('    <td>&nbsp;</td>')
      writeln('    <td><br>'+ strError +'<br>')
      writeln('      <br>')
      writeln('    </td>')
      writeln('  </tr>')
      writeln('  <tr>')
      writeln('    <td>&nbsp;</td>')
      writeln('    <td><a href="javascript:window.close();">Fermer la fen&ecirc;tre</a></td>')
      writeln('  </tr>')
      writeln('</table>') 	  
      writeln('</body></html>')
  }
 	if (eval('storywin.focus()')) {
	win.moveTo(pw, ph);
	} 
 
} 

// --> 

