/*************************
*     js.js
*  
* fonction globales
* @author nicolas rossi
*************************/


 //chargement des images
function preload(){
    imgload=new Array();
    for(var j=0; j<preload.arguments.length; j++){
      imgload[j]=new Image();
      imgload[j].src=preload.arguments[j];
    }
}

//fonction de vérification d'un mail
function checkmail(mail){
    //vérification du mail        
        testm = false ;
        for (var j=1 ; j<(mail.length) ; j++) {
             if (mail.charAt(j)=='@') {
                 if (j<(mail.length-4)){
                    for (var k=j ; k<(mail.length-2) ; k++) {
                        if (mail.charAt(k)=='.') testm = true;
                    }
                }
            }
        }
        if (testm==false) {return false;}        
        else return true;
}