function popup(url,nom,largeur,hauteur,scrol,status) { window.open(url,nom,"width="+largeur+",height="+hauteur+",scrollbars="+scrol+",status="+status); } function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&&i0&&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 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up); nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { nbArr = document[grpName]; if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up; nbArr[nbArr.length] = img; } } } function movedown(){ if (window.moveupvar) clearTimeout(moveupvar) if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100)) crossobj.style.top=parseInt(crossobj.style.top)-speed+"px" else if (ns4&&crossobj.top>=(contentheight*(-1)+100)) crossobj.top-=speed movedownvar=setTimeout("movedown()",20) } function moveup(){ if (window.movedownvar) clearTimeout(movedownvar) if (iens6&&parseInt(crossobj.style.top)<=0) crossobj.style.top=parseInt(crossobj.style.top)+speed+"px" else if (ns4&&crossobj.top<=0) crossobj.top+=speed moveupvar=setTimeout("moveup()",20) } function stopscroll(){ if (window.moveupvar) clearTimeout(moveupvar) if (window.movedownvar) clearTimeout(movedownvar) } function movetop(){ stopscroll() if (iens6) crossobj.style.top=0+"px" else if (ns4) crossobj.top=0 } function getcontent_height(){ if (iens6) contentheight=crossobj.offsetHeight else if (ns4) document.nscontainer.document.nscontent.visibility="show" } function control_mail(email) { var regExpEmailAdress=/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/g; var resultat = email.match(regExpEmailAdress); if(resultat!=null && resultat.length==1) { return true; } else { return false; } } function control_int(chiffre) { var regExpInt=/^[0-9]+$/g; var resultat = chiffre.match(regExpInt); if(resultat!=null && resultat.length==1) { return true; } else { return false; } } function fncKeyStop() { // Check if the control key is pressed. // If the Netscape way won't work (event.modifiers is undefined), // try the IE way (event.ctrlKey) var ctrl = typeof event.modifiers == 'undefined' ? event.ctrlKey : event.modifiers & Event.CONTROL_MASK; // Check if the 'V' key is pressed. // If the Netscape way won't work (event.which is undefined), // try the IE way (event.keyCode) var v = typeof event.which == 'undefined' ? event.keyCode == 86 : event.which == 86; // If the control and 'V' keys are pressed at the same time if ( ctrl && v ) { // ... discard the keystroke and clear the text box //document.form.elements['myText'].value = ''; return false; } return true; } function DecomposeDate(LeParam1){ // Sépare les jours, les mois et les années dans une date de type "22/05/1981" // Renvoye le tout dans un tableau de taille 3 LeRetour = new Array(3); LeJour=""; LeMois=""; LeAnnee=""; // Extraction du jour i=0; while((LeParam1.charAt(i)!="/")&&(i<10)){ LeJour+=LeParam1.charAt(i); i++; } if(LeJour.charAt(0)=="0"){ LeJour=LeJour.charAt(1); } LeParam1=LeParam1.substring(i+1,LeParam1.length); // Extraction du mois i=0; while((LeParam1.charAt(i)!="/")&&(i<10)){ LeMois+=LeParam1.charAt(i); i++; } if(LeMois.charAt(0)=="0"){ LeMois=LeMois.charAt(1); } LeParam1=LeParam1.substring(i+1,LeParam1.length); // Extraction de l'année LeAnnee=LeParam1; LeRetour[0]=LeJour; LeRetour[1]=LeMois; LeRetour[2]=LeAnnee; return LeRetour; } // Renvoye une date en format anglais avec le séparateur choisi "02/03/1981" -> "1981-3-2" // Le premier paramètre est la date a convertir, le second est le caractère de séparation choisi function DateAnglaise(LeParam1,LeParam2) { LaDate = new Array(3); LaDate = DecomposeDate(LeParam1); LeRetour = LaDate[2]+LeParam2+LaDate[1]+LeParam2+LaDate[0]; return LeRetour; } function ComparerDates(LeParam1,LeParam2) { // Compare 2 dates au format jj/mm/aaaa // Renvoye 0 si égalité, 1 si la première est supérieure, sinon 2 var LeParam1 = DateAnglaise(LeParam1,"/");// Ne pas oublier d'utiliser cette fonction // pour convertir en date anglaise, sinon le 05/07/2003 sera compris "7 mai 2003" par JavaScript var LeParam2 = DateAnglaise(LeParam2,"/"); LeParam1 = Date.parse(LeParam1); LeParam2 = Date.parse(LeParam2); if (LeParam1 == LeParam2) { return 0; } if (LeParam1 > LeParam2) { return 1; } else { return 2; } }