function verifEmail(_WWLOC_EMAIL)
{
	var _WWLOC_POSAT=(_WWLOC_EMAIL.indexOf("@")+1);
	var _WWLOC_POSPREC=0;
	var _WWLOC_POS=0;
	var _WWLOC_LONGEXT=0;
	if((_WWLOC_POSAT<2))
	{
		return(false);
	}
	_WWLOC_POS = _WWLOC_POSAT;
	while(true)
	{
		_WWLOC_POSPREC = (_WWLOC_POS+1);
		_WWLOC_POS = (_WWLOC_EMAIL.indexOf(".",_WWLOC_POSPREC-1)+1);
		if((_WWLOC_POS==0))
		{
			break;
		}
	}
	_WWLOC_POS = _WWLOC_POSPREC;
	if((_WWLOC_POS==(_WWLOC_POSAT+1)))
	{
		return(false);
	}
	_WWLOC_LONGEXT = _WWLOC_EMAIL.substring(_WWLOC_POS-1,_WWLOC_EMAIL.length).length;
	if(((_WWLOC_LONGEXT<2)||(_WWLOC_LONGEXT>4)))
	{
		return(false);
	}
	return(true);
}
//chaîne+flag(1=retirer les espaces à gauche,2=à droite,3=les deux)
function SansEspace( szChaine , nPartie )
{
	szChaine = szChaine.toString();
	var nPremier = 0;
	var nDernier = szChaine.length-1;
	// Si on a demandé sans espace à gauche
	if (nPartie & 1) while (szChaine.charAt(nPremier)==" ") nPremier++;
	// Si on a demandé sans espace à droite
	if (nPartie & 2) while (szChaine.charAt(nDernier)==" ") nDernier--;
	//On vérifie que la chaîne n'était pas consituée que d'espaces
	if (nDernier == -1 && nPremier == szChaine.length) return "";
	// On découpe la sous chaine
	return szChaine.substring(nPremier,nDernier+1);
}
function bIsNetscape()
{
	return ( navigator.appName=="Netscape" )
}
///////////////////////////////////////////////////////////////////////
function bIsExplorer()
{
	return ( navigator.appName=="Microsoft Internet Explorer" )
}
///////////////////////////////////////////////////////////////////////
function bIsLetter (c)
{   return ( ((c >= "a") && (c <= "z")) ||
			 ((c >= "A") && (c <= "Z")) ||
			 ( c == "á" ) || ( c == "à" ) || ( c == "â" ) ||
			 ( c == "é" ) || ( c == "è" ) || ( c == "ê" ) ||
			 ( c == "ï" ) || ( c == "î" ) ||
			 ( c == "ö" ) || ( c == "ô" ) ||
			 ( c == "ü" ) || ( c == "ù" ) || ( c == "û" ) ||
			 ( c == "ç" ) )
}
///////////////////////////////////////////////////////////////////////
function bIsDigit (c)
{	return ( (c >= "0") && (c <= "9") )	}
///////////////////////////////////////////////////////////////////////
function bIsControl(c)
{	return ( c < " " )		}
///////////////////////////////////////////////////////////////////////
function Lettre(evt)
{
	var car;

	if ( bIsNetscape() )
	{
		car = String.fromCharCode(evt.which);
		// on accepte la touche si c'est bien une lettre :
		return bIsLetter(car) || bIsControl(car);
	}
	if ( bIsExplorer() )
	{
		car = String.fromCharCode(evt.keyCode);
		// on accepte la touche si c'est bien une lettre :
		evt.returnValue = bIsLetter(car);
	}

	return true;
}

///////////////////////////////////////////////////////////////////////
function Chiffre(evt)
{
	var car;

	if ( bIsNetscape() )
	{
		car = String.fromCharCode(evt.which);
		return ( bIsDigit(car) || bIsControl(car) );
	}
	if ( bIsExplorer() )
	{
		car = String.fromCharCode(evt.keyCode);
		evt.returnValue = bIsDigit(car);
	}

	return true;
}
///////////////////////////////////////////////////////////////////////
function LettreChiffre(evt)
{
	var car;

	if ( bIsNetscape() )
	{
		car = String.fromCharCode(evt.which);
		return bIsLetter(car) || bIsDigit(car) || bIsControl(car) ;
	}
	if ( bIsExplorer() )
	{
		car = String.fromCharCode(evt.keyCode);
		evt.returnValue = bIsLetter(car) || bIsDigit(car);
	}
	return true;
}
///////////////////////////////////////////////////////////////////////
function ToutEnMaj(evt)
{
	var car;
	// code différent pour netscape et ie :
	if ( bIsNetscape() )
	{	// conversion code ascii -> caractère :
		car = String.fromCharCode(evt.which);
		// est-ce que c'est une lettre minuscule :
		if ( ( car>='a' ) && ( car<='z') )
		{	// oui => on la convertit en majuscule :
			evt.which = escape(car.toUpperCase());
			// et on se l'envoie :
			evt.target.handleEvent(evt);
			// mais on n'accepte pas la minuscule courante :
			//return false;
		}
	}
	if ( bIsExplorer() )
	{	// conversion en caractère :
		car = String.fromCharCode(evt.keyCode);
		// puis passage en majuscule et code ascii :
		evt.keyCode = car.toUpperCase().charCodeAt(0);
	}
	return true;
}


function montreCache(nNumSection){
	if(nNumSection==-1)return;
	if(nNumSection==-2){
		for(var i=0;i<tabSections.length;i++){
		  document.getElementById(tabSections[i]).style.display="inline";
		  if(typeof(tabMSections)!="undefined")document.getElementById(tabMSections[i]).style.color="#000";
		}
		
	}
	else{
		var oElement = document.getElementById(tabSections[nNumSection]);
		if(oElement.style.display!="none"){
			oElement.style.display="none";
			if(typeof(tabMSections)!="undefined")document.getElementById(tabMSections[nNumSection]).style.color="#808080";
		}
		else{
			oElement.style.display="inline";	
			if(typeof(tabMSections)!="undefined")document.getElementById(tabMSections[nNumSection]).style.color="#000";
			for(var i=0;i<tabSections.length;i++){
				if(nNumSection!=i){
					document.getElementById(tabSections[i]).style.display="none";
					if(typeof(tabMSections)!="undefined")document.getElementById(tabMSections[i]).style.color="#808080";
				}
			}
		}
	}
	document.getElementById("montre").value=nNumSection;
}

location.querystring = (function() {

    // The return is a collection of key/value pairs

    var queryStringValues = {};

    // Gets the query string, starts with '?'

    var querystring = decodeURI(location.search);

    // document.location.search is empty if no query string

    if (!querystring) {
        return {};
    }

    // Remove the '?' via substring(1)

    querystring = querystring.substring(1);

    // '/' seperates values

    var values = querystring.split("/");

    // Load the values of the return collection

    for (var i = 1; i < values.length; i++) {        
        queryStringValues[i-1] = values[i];
    }   
	
	if(queryStringValues.length<1) return {};
	
    // Return the values tab

    return queryStringValues;
})();
