// JavaScript Document

			//produits peaux sèches
			//-------------------------------------------------------------------------
			produitsPeauxSeches = new Array();
			produitsPeauxSeches[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsPeauxSeches[1] = 'Huile précieuse';
			produitsPeauxSeches[2] = 'Crème Confort<br/>Réparatrice ';
			produitsPeauxSeches[3] = 'Emulsion Douceur<br/>Réparatrice';
			produitsPeauxSeches[4] = 'Soin Nuit<br/>Nutri-Actif';
			produitsPeauxSeches[5] = 'Soin<br/>Yeux-Lèvres<br/>Redensifiant';
			produitsPeauxSeches[6] = 'Masque<br/>Nutri-Intensif';
			produitsPeauxSeches[7] = 'Huile Sèche<br/>Régénérante<br/>Corps';
			produitsPeauxSeches[8] = 'Crème<br/>Soyeuse Mains<br/>et Ongles';
			produitsPeauxSeches[9] = 'Nutrition<br/>et Fermeté';
			
			
			//produits anti-age
			//-------------------------------------------------------------------------
			produitsAntiAge = new Array();
			produitsAntiAge[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsAntiAge[1] = 'Huile<br />Précieuse';
			produitsAntiAge[2] = 'Soin Tenseur<br/>Redensifiant';
			produitsAntiAge[3] = 'Soin Nuit<br/>Nutri-Actif';
			produitsAntiAge[4] = 'Soin<br/>Yeux-Lèvres<br/>Redensifiant';
			produitsAntiAge[5] = 'Masque<br/>Nutri-Intensif';
			produitsAntiAge[6] = 'Huile Sèche<br/>Régénérante<br/>Corps';
			produitsAntiAge[7] = 'Crème<br/>Soyeuse Mains<br/>et Ongles';
			produitsAntiAge[8] = 'Nutrition<br/>et Fermeté';
			
			
			//produits anti-rides
			//-------------------------------------------------------------------------
			produitsAntiRides = new Array();
			produitsAntiRides[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsAntiRides[1] = 'Sérum Antirides<br/>Réparateur';
			produitsAntiRides[2] = 'Crème';
			produitsAntiRides[3] = 'Soin Nuit';
			produitsAntiRides[4] = 'Soin Yeux<br/>Antirides';
			produitsAntiRides[5] = 'Masque<br/>Antirides<br/>Rajeunissant';
			produitsAntiRides[6] = 'Patchs Antirides<br/>Lissants Contour<br/>des Yeux';
			produitsAntiRides[7] = 'Emulsion';
			produitsAntiRides[8] = 'Crème<br/>SPF15';
			produitsAntiRides[9] = 'Elixir de Jeunesse';
			
			
			//produits énergie
			//-------------------------------------------------------------------------
			produitsEnergie = new Array();
			produitsEnergie[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsEnergie[1] = 'Elixir Lissant Peau Neuve<br/>Suractivateur d\'éclat';
			produitsEnergie[2] = 'Crème Légère<br/>Hydra-Energisante<br/>SPF 15';
			produitsEnergie[3] = 'Crème Velours<br/>Hydra-Energisante<br/>SPF 15';
			produitsEnergie[4] = 'Soin Yeux Fraîcheur<br/>Défatigant';
			
						
			//produits anti-taches
			//-------------------------------------------------------------------------
			produitsAntiTaches = new Array();
			produitsAntiTaches[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsAntiTaches[1] = 'Sérum Éclaircissant<br/>Intensif';
			produitsAntiTaches[2] = 'Crème Protection<br>Anti-Taches SPF 15';
			produitsAntiTaches[3] = 'Concentré Correcteur<br/>Anti-Taches';
			

            //produits hydratation (AQUAPULPE)
			//-------------------------------------------------------------------------
			produitsHydratation = new Array();
			produitsHydratation[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsHydratation[1] = 'Elixir<br>Hydratant<br/>Intensif';
			produitsHydratation[2] = 'Gel-Crème<br>Sorbet<br>Hydratant';
			produitsHydratation[3] = 'Crème<br>Sorbet<br>Hydratante';
			produitsHydratation[4] = 'Soin<br>Hydra-Défense<br>SPF15';
			produitsHydratation[5] = 'Masque<br/>Réhydratant<br/>Express';
			
			
			//produits peaux grasses
			//-------------------------------------------------------------------------
			produitsPeauxGrasses = new Array();
			produitsPeauxGrasses[0] = '&Mu;&epsilon;  &alpha;&pi;&epsilon;&sigma;&tau;&alpha;&gamma;&mu;&#941;&nu;&omicron; &epsilon;&kappa;&chi;&#973;&lambda;&iota;&sigma;&mu;&alpha; &mu;&epsilon;&lambda;&iota;&lambda;&#974;&tau;&omicron;&upsilon; &#13;';
			produitsPeauxGrasses[1] = 'Gel Nettoyant<br/>Assainissant';
			produitsPeauxGrasses[2] = 'Lotion<br/>Astringente';
			//produitsPeauxGrasses[3] = 'Gel-Crème<br/>Rééquilibrant';
			produitsPeauxGrasses[4] = 'Concentré<br/>Perfecteur<br/>Assainissant';
			produitsPeauxGrasses[5] = 'Masque<br/>Clarifiant<br/>3 en 1';
			produitsPeauxGrasses[6] = 'Soin<br/>Assainissant<br/>Rénovateur';
			produitsPeauxGrasses[7] = 'Gel-Crème<br/>Hydra-Matifiant';
			
			
			//produits démaquillage
			//-------------------------------------------------------------------------
			produitsDemaquillage = new Array();
			produitsDemaquillage[0] = 'Gel Nettoyant<br/>Moussant';
			produitsDemaquillage[1] = 'Mousse<br/>Nettoyante<br/>Démaquillante';
			produitsDemaquillage[2] = 'Lait<br/>Démaquillant';
			produitsDemaquillage[3] = 'Eau<br/>Démaquillante<br/>Micellaire';
			produitsDemaquillage[4] = '2 en 1<br/>Démaquillant';
			produitsDemaquillage[5] = 'Lotion<br/>Tonique';
			produitsDemaquillage[6] = 'Démaquillant<br/>Yeux';
			produitsDemaquillage[7] = 'Gelée Exfoliante';
			
			
			//produits solaire1
			//-------------------------------------------------------------------------
			produitsSolaires1 = new Array();
			produitsSolaires1[0] = 'Complément<br/>Alimentaire';
			produitsSolaires1[1] = 'Crème Légère Visage<br/>SPF50 +';
			produitsSolaires1[2] = 'Beaume Réparateur<br/>Après Soleil';
			produitsSolaires1[3] = 'Lait Velouté<br/>Après Soleil';
			produitsSolaires1[4] = 'Gel Douche<br/>Après Soleil';
			produitsSolaires1[5] = 'Gelée Légère<br/>Autobronzante';
			produitsSolaires1[6] = 'Gel Crème Fraîcheur <br/>Anti-âge Après-Soleil';
			
			
			
			mentionSolaire = 'A votre convenance';			
			
			//produits solaire2
			//-------------------------------------------------------------------------
			produitsSolaires2 = new Array();
			produitsSolaires2[0] = 'Complément<br/>Alimentaire';
			produitsSolaires2[1] = 'Spray Ultra léger<br/>SPF 50 &#942; 30';
			produitsSolaires2[2] = 'Baume Stick <br/>Non Gras<br/>SPF 50';
			produitsSolaires2[3] = 'Lait velouté<br/>SPF 50 &#942; 30';
			produitsSolaires2[4] = 'Baume Réparateur<br/>Après Soleil';
			produitsSolaires2[5] = 'Lait Velouté<br/>Après Soleil';
			produitsSolaires2[6] = 'Gel Douche<br/>Après Soleil';
			produitsSolaires2[7] = 'Gelée Légère<br/>Autobronzante';
			produitsSolaires2[8] = 'Crème Légère<br/>SPF 30';
			produitsSolaires2[9] = 'Fluide non Gras<br/> SPF30';
			produitsSolaires2[10] ='Compact Teinté<br/>Eclat SPF 30';
			
			
			//produits solaire3
			//-------------------------------------------------------------------------
			produitsSolaires3 = new Array();
			produitsSolaires3[0] = 'Complément<br/>Alimentaire';
			produitsSolaires3[1] = 'Spray Ultra-Léger Moyenne<br/>SPF 20';
			produitsSolaires3[2] = 'Crème Légère <br/>SPF 20';
			produitsSolaires3[3] = 'Lait velouté<br/>SPF 20';
			produitsSolaires3[4] = 'Baume Réparateur<br/>Après Soleil';
			produitsSolaires3[5] = 'Lait Velouté<br/>Après Soleil';
			produitsSolaires3[6] = 'Gel Douche<br/>Après Soleil';
			produitsSolaires3[7] = 'Gelée Légère<br/>Autobronzante';
			produitsSolaires3[8] = 'Gelée Fondante<br/>SPF 15';
			produitsSolaires3[9] = 'Huile Sèche Soyeuse<br> SPF 15';
			produitsSolaires3[10] = 'Fluide Fraîcheur SPF 20';
			
window.onload = function removeAlt() {

	for ( var i = 0; i< document.images.length; i++ ) 
	{
	
		if ( typeof( document.images[i].alt ) == 'string' ) {
		
		document.images[i].alt = "";
		
		}
	
		if ( typeof( document.images[i].title ) == 'string' ) {
		
		document.images[i].title = "";
		
		}
	
	}

}			
            
function openMenu(id){
	
	//sous menu
    if((id.toString()).indexOf(".") != -1 ){
		
		var cut = (id.toString()).split(".");
		var menu = cut[0];
		var smenu = cut[1];
		
		for(j=1; j<3;j++){	
		
			document.getElementById('sMenu' + menu + '.' + j).style.display = 'none';
		
		}
		
		document.getElementById('sousMenu3').style.display = 'block';
		
	    document.getElementById('sMenu' + menu).style.display = 'block';
		document.getElementById('sMenu' + id).style.display = 'block';
		document.getElementById('rub' + menu).className = 'rub'+menu+'On';
		document.getElementById('sRub' + id).className = 'menuItemClick';
	
	}
	
	//menu simple
	else{
		
		if(id==3){
			document.getElementById('sousMenu3').style.display = 'block';
		}
		
		
		document.getElementById('sMenu' + id).style.display = 'block';
		document.getElementById('rub' + id).className = 'rub'+id+'On';
	}
}

function closeMenu(id){
	
	document.getElementById( 'sMenu' + id ).style.display = 'none';
	document.getElementById('sousMenu3').style.display = 'none';
	
	if((id.toString()).indexOf(".") == -1 ){
				
		document.getElementById('rub'+id).className = 'rub'+id;	
		
	}
	else{
		
		document.getElementById('sRub' + id).className = 'menuItem';
		
		
	}
	
	for(i= 1; i < 7 ; i++){
			
		if(i != 4){
			
			document.getElementById( 'sMenu' + i ).style.display = 'none';
		}
	}
}


function ongletInit(){
	window.document.getElementById( "onglet1_txt" ).style.display = "block";
	if ( window.document.getElementById( "onglet2_img" ) != null ){
	window.document.getElementById( "onglet2_txt" ).style.display = "none";
	}
	window.document.getElementById( "onglet3_txt" ).style.display = "none";
	if ( window.document.getElementById( "onglet4_img" ) != null ){
		window.document.getElementById( "onglet4_txt" ).style.display = "none";
	}	
}

function onglet( id, type )
{
	
	

		bt = window.document.getElementById( id + "_img" );
		txt = window.document.getElementById( id + "_txt" );
		
		
		
	
			if ( type == "out" ){
				if ( txt.style.display == "none" || txt.style.display == "undefined" || txt.style.display == "" ){
				
					bt.style.visibility = 'hidden';
				
				}
				
			}else if ( type == "over" ){
				
				bt.style.visibility = 'visible';
				
			}	
	  
	

}

function ongletClick ( id ) {

	bt = window.document.getElementById( id + "_img" );
	txt = window.document.getElementById( id + "_txt" );

	window.document.getElementById( "onglet1_img" ).style.visibility = "hidden";
	
	if ( window.document.getElementById( "onglet2_img" ) != null ){
	window.document.getElementById( "onglet2_img" ).style.visibility = "hidden";
	}
	window.document.getElementById( "onglet3_img" ).style.visibility = "hidden";
	
	if ( window.document.getElementById( "onglet4_img" ) != null ){
		window.document.getElementById( "onglet4_img" ).style.visibility = "hidden";
	}
	
	window.document.getElementById( "onglet1_txt" ).style.display = "none";
	
	
	if ( window.document.getElementById( "onglet2_img" ) != null ){
		window.document.getElementById( "onglet2_txt" ).style.display = "none";
	}
	
	window.document.getElementById( "onglet3_txt" ).style.display = "none";
	
	if ( window.document.getElementById( "onglet4_img" ) != null ){
		window.document.getElementById( "onglet4_txt" ).style.display = "none";
	}
		
	bt.style.visibility = "visible";
	txt.style.display = "block";

}

function navGammeSolaire(id){


	 for(i=1; i<5; i++){
		
		document.getElementById('page' + i).style.display = 'none';  
	
	 }
	   
	document.getElementById('page' + id).style.display = 'block';  
}


// -------------------- Contacts --------------

function visible( obj, v ) {
	obj.style.display = ( v ) ? 'block' : 'none';
}

function checkChars( str_length, max_chars ) {
	return max_chars - str_length;
}

function charsChecker( obj, alertObj, max_chars )
{
	obj.onblur = obj.onkeyup = function()
	{
		var n = checkChars( this.value.length, max_chars );
		
		if ( n < 0 ) {
			alertObj.innerHTML = 'Please remove ' + (-n) + ' chars from your text field.';
		}
		else {
			alertObj.innerHTML = n;
		}
	};
	
	obj.onblur();
}

function isValidEmail( $str )
{ 
	var $isValid = true;
	
	$str = $str + '';
	
	//
	if ($str.indexOf("@") == -1) {
		$isValid = false;
	}
	// 
	var $array = new Array();
	$array = $str.split("@");
	//
	if ( $array.length != 2 )
	{
		$isValid = false;
		return $isValid;
	}
	
	if ($array[0] == "") {
		$isValid = false;
	}
	if ($array[1].indexOf(".") == -1) {
		$isValid = false;
	}
	// 
	var $array2 = new Array();
	$array2 = $array[1].split(".");
	//
	if ($array2[0] == "") {
		$isValid = false;
	}
	if ($array2[1] == "") {
		$isValid = false;
	}
	// 
	return $isValid;
}

function isValidZipCode( str )
{
	var isValid = true;
	
	str = str + '';
	
	
	if(str == '')
	{
		isValid = false;
	}
	/*
	if ( str.substr(0,1) == '0' )
	{  
		if ( isNaN( str.substr(1,4) ) ) {
			isValid = false; 
		}
		else
		{
			if ( str.substr(1,4) == '0000' ) {
				isValid = false; 
			}
		}
	}
	else
	{  
		if ( isNaN( str ) ) { 
			isValid = false;
		}
	}
	
	if ( str.length != 5 ) { 
		isValid = false; 
	}
	*/
	return isValid;
}

function isValidPhone($str)
{

	
	var $isValid = true;
	
	$str = $str + '';
	var $prefix = $str.substr(0,2); 
	
	/*if ( $prefix != "01" && $prefix != "02" && $prefix != "03" && $prefix != "04" && $prefix != "05" && $prefix != "08" && $prefix != "09") {
		$isValid = false;  
	}*/
	if ($str.length != 10) { 
		$isValid = false;
	}
	
	return $isValid;
}

function isValidMobile( $str )
{
	
	
	var $isValid = true;
	
	$str = $str + '';
	
	var $prefix = $str.substr(0,2); 
	
	
	/*if ($prefix != "06" && $prefix != "09") {
		$isValid = false;
	}*/
	if ($str.length != 10) {
		$isValid = false;
	}
	
	return $isValid;
}

function formatDate( str, separator )
{
	var _ = str;
	
	var _split = str.split( separator );
	
	var s_jj = new String( _split[0] );
	var s_mm = new String( _split[1] );
	var s_aaaa = new String( _split[2] );
	
	var jj = new Number( s_jj );
	var mm = new Number( s_mm );
	
	if ( jj < 10 ) { 
		s_jj = '0' + jj;
	}
	
	if ( mm < 10 ) { 
		s_mm = '0' + mm;
	}
	
	_ = s_jj + separator + s_mm + separator + s_aaaa;
	
	return _;
}

function isValidDate( str, separator )
{
	var $isValid = true;
	
	str = str + '';
	str = formatDate( str, separator );
	
	var _split = str.split( separator );
	
	if ( _split.length != 3 ) {
		$isValid = false;
	}
	else
	{
		if ( (_split[0].length == 2) && (_split[1].length == 2) && (_split[2].length == 4) )
		{
			if ( isNaN( new String(_split[0]) ) || isNaN( new String(_split[1]) ) || isNaN( new String(_split[2]) ) )
			{
				$isValid = false;
			}
			else
			{
				var c1 = new Number( new String(_split[0]) );
				var c2 = new Number( new String(_split[1]) );
				var c3 = new Number( new String(_split[2]) );
				
				if ( c1 > 31 || c2 > 12 ) {
					$isValid = false;
				}
				else 
				{
					var _date = new Date();
				
					_date.setYear( c3 );
					_date.setMonth( c2 - 1 );
					_date.setDate( c1 );
					
					var test_jj = ( _date.getDate() < 10 ) ? '0' + _date.getDate() : _date.getDate();
					var test_mm = ( (_date.getMonth() + 1) < 10 ) ? '0' + (_date.getMonth() + 1) : (_date.getMonth() + 1);
					
					var test_date = test_jj + separator + test_mm + separator + _date.getFullYear();
					
					if ( test_date != str ) {
						$isValid = false;
					}
				}
			}
		}
		else
		{
			$isValid = false;
		}
	}
	
	return $isValid;
}

function checkForm( objs )
{
	 
	
	
	for ( var i = 0; i < objs.length; i++ )
	{ 
		if ( objs[i].type == 'text' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( (objs[i].elt.value.length < 1) || (objs[i].elt.value.length > objs[i]._max) ) 
			{	
				if ( !optional ) 
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
			
			if ( typeof( objs[i]._min ) != 'undefined' )
			{
				if ( objs[i].elt.value.length < objs[i]._min )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
			}
		}
		else if ( objs[i].type == 'checkbox' )
		{
			var n = 0;
			
			for ( var ii = 0; ii < objs[i].elt.length; ii++ )
			{
				if ( objs[i].elt[ii].checked ) {
					n++;
				}
			}
			
			objs[i]._min = ( typeof( objs[i]._min ) == 'undefined' ) ? 0 : objs[i]._min;
			objs[i]._max = ( typeof( objs[i]._max ) == 'undefined' ) ? objs[i].elt.length : objs[i]._max;
			
			if ( (n < objs[i]._min) || (n > objs[i]._max) )
			{
				if ( typeof( objs[i].callback ) != 'undefined' ) {
					objs[i].callback( objs[i] );
				}
				else {
					alert( objs[i].msg );
				}
				
				return false;
			}
		}
		else if ( objs[i].type == 'mail' )
		{ 
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidEmail( objs[i].elt.value ) )
			{
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
		}
		else if ( objs[i].type == 'zipcode' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidZipCode( objs[i].elt.value ) )
			{
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
		}
		else if ( (objs[i].type == 'phone') || (objs[i].type == 'mobile') )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidPhone( objs[i].elt.value ) && !isValidMobile( objs[i].elt.value ) )
			{ 
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {  
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 ) 
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
						
						return false;
					}
				}
			}
		}
		else if ( objs[i].type == 'date' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidDate( objs[i].elt.value, '/' ) )
			{ 
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
						
						return false;
					}
				}
			}
		}
		else if ( objs[i].type == 'noZero' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !optional )
			{
				if ( objs[i].elt.value == '0' )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {  
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
			}
		}else if ( objs[i].type == 'pays' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( objs[i].elt.value == 0 )
			{ 
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
			}
		}
	}
	
	return true;
}



function checkForm2( objs )
{
	for ( var i = 0; i < objs.length; i++ )
	{ 
		if ( objs[i].type == 'text' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( (objs[i].elt.value.length < 1) || (objs[i].elt.value.length > objs[i]._max) ) 
			{	
				if ( !optional ) 
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
			
			if ( typeof( objs[i]._min ) != 'undefined' )
			{
				if ( objs[i].elt.value.length < objs[i]._min )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
			}
		}
		else if ( objs[i].type == 'checkbox' )
		{
			var n = 0;
			
			for ( var ii = 0; ii < objs[i].elt.length; ii++ )
			{
				if ( objs[i].elt[ii].checked ) {
					n++;
				}
			}
			
			objs[i]._min = ( typeof( objs[i]._min ) == 'undefined' ) ? 0 : objs[i]._min;
			objs[i]._max = ( typeof( objs[i]._max ) == 'undefined' ) ? objs[i].elt.length : objs[i]._max;
			
			if ( (n < objs[i]._min) || (n > objs[i]._max) )
			{
				if ( typeof( objs[i].callback ) != 'undefined' ) {
					objs[i].callback( objs[i] );
				}
				else {
					alert( objs[i].msg );
				}
				
				return false;
			}
		}
		else if ( objs[i].type == 'mail' )
		{ 
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidEmail( objs[i].elt.value ) )
			{
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
		}
		
		else if ( objs[i].type == 'zipcode' )
		{
			
			
			
			if(objs[i].elt.value == '' || objs[i].elt.value == 'undefined '){
				return false;
			}
			
			
			/*var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidZipCode( objs[i].elt.value ) )
			{
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
					
						return false;
					}
				}
			}
			*/
		}
		
		else if ( (objs[i].type == 'phone') || (objs[i].type == 'mobile') )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidPhone( objs[i].elt.value ) && !isValidMobile( objs[i].elt.value ) )
			{ 
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {  
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 ) 
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
						
						return false;
					}
				}
			}
		}
		else if ( objs[i].type == 'date' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !isValidDate( objs[i].elt.value, '/' ) )
			{ 
				if ( !optional )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
				else
				{
					if ( objs[i].elt.value.length > 0 )
					{
						if ( typeof( objs[i].callback ) != 'undefined' ) {  
							objs[i].callback( objs[i] );
						}
						else {
							alert( objs[i].msg );
						}
						
						return false;
					}
				}
			}
		}
		else if ( objs[i].type == 'noZero' )
		{
			var optional = false;
			
			if ( typeof( objs[i].optional ) != 'undefined' ) {
				optional = objs[i].optional;
			}
			
			if ( !optional )
			{
				if ( objs[i].elt.value == '0' )
				{
					if ( typeof( objs[i].callback ) != 'undefined' ) {  
						objs[i].callback( objs[i] );
					}
					else {
						alert( objs[i].msg );
					}
					
					return false;
				}
			}
		}
	}
	
	return true;
}



var intV = 0;

function hideMsg( obj )
{
	clearInterval( intV );
	
	visible( obj, false );
}

function affichMsg( container, box, msg )
{
	visible( container, true );
	
	var winY = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
	
	container.style.top = winY + 'px'; 
	box.innerHTML = msg;	
	
	hideMsg_str = 'hideMsg(' + container.id + ')';
	
	intV = setInterval( hideMsg_str, 3000 );
}

function restoreClass( id )
{ 	
	window.document.getElementById('erreur').innerHTML = '';
	
	clearInterval( intV );
	window.document.getElementById( id ).className = 'textField';
}

function highLighted( obj )
{
	window.document.getElementById('erreur').innerHTML = obj.msg;
	
	//obj.elt.className = 'hightLForm'; 
	//intV = setInterval( ('restoreClass(\'' + obj.elt.id + '\')'), 3000 );
}

function similarStr( str1, str2 ) {
	//alert('str1:' + str1 + "str2:"+ str2);
	return (str1 === str2);
}

function checkEmailSim()
{
	var v = similarStr( window.document.getElementById('email').value, window.document.getElementById('confemail').value );
	
	if ( !v ) {
		highLighted( {elt:window.document.getElementById('confemail'),msg:'&Omicron;&iota;  &delta;&#973;&omicron; &delta;&iota;&epsilon;&upsilon;&theta;&#973;&nu;&sigma;&epsilon;&iota;&sigmaf; e.mail &delta;&epsilon;&nu; &epsilon;&#943;&nu;&alpha;&iota; &#943;&delta;&iota;&epsilon;&sigmaf;&nbsp; &#13;'} );
	}
	
	return v;
}

function checkMPSim()
{
	var v = similarStr( window.document.getElementById('mp').value, window.document.getElementById('confmp').value );
	
	if ( !v ) {
		highLighted( {elt:window.document.getElementById('confmp'),msg:'&Omicron;&iota;  &delta;&#973;&omicron; &delta;&iota;&epsilon;&upsilon;&theta;&#973;&nu;&sigma;&epsilon;&iota;&sigmaf; e.mail &delta;&epsilon;&nu; &epsilon;&#943;&nu;&alpha;&iota; &#943;&delta;&iota;&epsilon;&sigmaf;&nbsp; &#13;'} );
	}
	
	return v;
}

/******************************************************** POPUPS ******************************************************/
function getBrowserCodeName()
{
	var name = null;
	
	if ( document.getElementById && !document.all )
	{
		name = 'NS6';
	}
	else if ( document.all )
	{
		name = 'IE';
	}
	else if ( navigator.appName == 'Netscape' && navigator.appVersion.charAt( 0 ) == '4' )
	{
		name = 'NS';
	}
	else if ( navigator.userAgent.indexOf( 'Mac' ) != -1 )
	{
		name = 'MAC';
	}
	
	return name;
}


function detectIE6(){
	var IE6 = false

	var strChUserAgent = navigator.userAgent;
	var intSplitStart = strChUserAgent.indexOf("(",0);
	var intSplitEnd = strChUserAgent.indexOf(")",0);
	var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);

	if(strChMid.indexOf("MSIE 6") != -1) IE6 = true;

	return IE6;
}



function getScrollY() {
  scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
  } else if( document.body && ( document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
  } else if( document.documentElement && ( document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
  }
  return scrOfY;
}


function affichPopup( nom ){
	
	/*Sous IE6 on masque les listes de formulaires*/
	if ( detectIE6() ){
		
		tags = document.getElementsByTagName( "select" );
	
		for( i=0; i<tags.length; i++ ){
				tags.item( i ).style.visibility = "hidden";
			}
	
	}
		
	maskPage();
	window.document.getElementById( 'mask_page' ).style.display = "block";	
	

	window.document.getElementById( nom ).style.display = "block";
	
}

function closePopup( nom ){
	
	/*Sous IE6 on masque les listes de formulaires*/
	if ( detectIE6() ){
		
		tags = document.getElementsByTagName( "select" );
	
		for( i=0; i<tags.length; i++ ){
				tags.item( i ).style.visibility = "visible";
			}
	
	}
	
	window.document.getElementById( 'mask_page' ).style.display = "none";
	
	window.document.getElementById( nom ).style.display = "none";
	
}


//Init des positions du masque
function maskPage()
{
	var obj = document.getElementById('mask_page').style;
	
	//var winY = document.documentElement.scrollTop;
	var winY = getScrollY();
	var winL = 1024;
	//var winH = document.documentElement.clientHeight;
	var winH = "";
	if ( window.innerHeight ) winH = window.innerHeight;
	if ( document.documentElement ) winH = document.documentElement.clientHeight;
	if ( document.body ) winH = document.body.clientHeight;
	
	if ( getBrowserCodeName() == 'IE' )
	{ 
		obj.width = winL;
		obj.height = winH + winY;
	}
	else if ( getBrowserCodeName() == 'NS6' || getBrowserCodeName() == 'NS' )
	{
		obj.width = winL + 'px';
		obj.height = ( winH + winY ) + 'px';
	}
}

