/********************************/
/* AUTEUR: LELEONY Philippe     */
/* DATE DE CREATION: 04/09/2000 */
/* MISE A JOUR : 31/08/2000     */
/********************************/


/*----------------------------------------------------------------------------------------*/
/* Vérifie que "email" est un email correct :                                             */ 
/*   - présence d'un @ (position : au moins 2ème caractère)                               */
/*   - présence d'un point après l'@ (position : au moins 2 caractères après l'@)         */
/*   - présence de caractères après le point                                              */
/*----------------------------------------------------------------------------------------*/
function testEmail(email) {	
	var n, p1, p2;
	var ok = false;
	
	n  = email.length;
	p1 = email.indexOf('@', 0);
	p2 = email.indexOf('.', p1);
	
	if (p1 > 0 && p2 > (p1 + 1) && n > (p2 + 1))
		ok = true;

	return ok;
}


/*----------------------------------------------------------------------------------------*/
/* Renvoie vrai si au moins un élément du tableau "oRC" est séléctionné, faux sinon.      */
/* "oRC" est soit un objet radio, soit un objet checkbox.                                 */
/*----------------------------------------------------------------------------------------*/
function testRadioCheckBox(oRC) {
	var n, i = 0, ok;
	
	ok = false;
	n = oRC.length;
		
	while (!ok && i < n) {
		ok = oRC[i].checked;
		i++;
	}
	
	return ok;
}

function checkPlugin(plgIn, theURL, altURL, autoGo) {
	var ok=false;
	document.MM_returnValue = false;
	
	//with (navigator)
	
	if (navigator.appName.indexOf('Microsoft')==-1) {
      if (plgIn == 'Shockwave Flash' ) {
			if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
					  if (navigator.plugins && navigator.plugins[plgIn])
						  ok = true;
			}
		}

	} else if (navigator.appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
		if (plgIn.indexOf("Flash")!=-1 ){
			ok=true;
		} else {
			ok=autoGo;
		}
	}

	if (!ok) theURL=altURL;
	
	if (theURL) top.location=theURL;
}


