
/** lien home page **/
function globalSilhouetteLink()
{
	window.parent.document.location.href = "soins/produit_anti-cellulite1.php";
}

/** lien anim flash home page **/
function homePageLink()
{
	window.parent.document.location.href = "soins/produit_anti-cellulite1.php";
}


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 = "";
		
		}
	
	}

}



var actif= "0";

function showMenu(rubrique)
{
	
	if(rubrique == "6"){
		if(window.document.getElementById("item"+ rubrique)){
			window.document.getElementById("item"+ rubrique).className="menuItemTextOverSpecial";
		}
	}
	else{
		if(window.document.getElementById("item"+ rubrique)){
			window.document.getElementById("item"+ rubrique).className="menuItemTextOver";
		}
	}  
	
	if(window.document.getElementById("puce"+ rubrique)){
		window.document.getElementById("puce"+ rubrique).style.visibility ="visible";
	}
	
	if(window.document.getElementById("puce"+ actif)){
		window.document.getElementById("puce"+ actif).style.visibility ="visible";
	}
	
	if(window.document.getElementById("srub"+ rubrique)){
		window.document.getElementById("srub"+ rubrique).style.display = "block";
	}
	
	
	if(rubrique != actif){	
		if(window.document.getElementById("srub"+ actif)){
			window.document.getElementById("srub"+ actif).style.display = "none";
		}
	}
	
}


function hideMenu(rubrique)
{
	
	if( rubrique != actif){	
		if(rubrique == '6'){
			window.document.getElementById("item"+ rubrique).className="special";
		}
		else{
			window.document.getElementById("item"+ rubrique).className="menuItemText";
		}
	}
	if(window.document.getElementById("puce"+ rubrique)){	
		window.document.getElementById("puce"+ rubrique).style.visibility ="hidden";
	}
	if(window.document.getElementById("srub"+ rubrique)){
		window.document.getElementById("srub"+ rubrique).style.display = "none";
	}
	
	if(window.document.getElementById("srub"+ actif)){
		window.document.getElementById("srub"+ actif).style.display = "block";
	}
	
	if(window.document.getElementById("puce"+ actif)){
		window.document.getElementById("puce"+ actif).style.visibility ="visible";
	}
	
}


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<4; i++){
		
		document.getElementById('page' + i).style.display = 'none';  
	
	 }
	   
	document.getElementById('page' + id).style.display = 'block';  
}



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") {
		$isValid = false;
	}
	if ($str.length != 10) {
		$isValid = false;
	}
	
	return $isValid;
}

function isValidPhone2($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;  
	}

	
	return $isValid;
}

function isValidMobile2( $str )
{
	
	
	var $isValid = true;
	
	$str = $str + '';
	
	var $prefix = $str.substr(0,2); 
	
	
	if ($prefix != "06") {
		$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 ( !isValidPhone2( objs[i].elt.value ) && !isValidMobile2( 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 == 'pays' )
		{
			var optional = false;
			
			if(objs[i].elt.selectedIndex == 0)
			{
				objs[i].callback( objs[i] );
				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;
}



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 '){
				objs[i].callback( objs[i] );
				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 ( !isValidPhone2( objs[i].elt.value ) && !isValidMobile2( 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;
}

function similarStr( str1, 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:'Your two e-mail address aren&acute;t the same.'} );
	}
	
	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:'Your two passwords aren&acute;t the same.'} );
	}
	
	return v;
}

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_1' ).style.display = "block";	
	window.document.getElementById( 'Mask_Page_2' ).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_1' ).style.display = "none";
	window.document.getElementById( 'Mask_Page_2' ).style.display = "none";	
	window.document.getElementById( nom ).style.display = "none";
	
}

function maskPage()
{
	var obj = document.getElementById('Mask_Page_1').style;
	var obj = document.getElementById('Mask_Page_2').style;
	
	//var winY = document.documentElement.scrollTop;
	var winY = getScrollY()-400;
	var winL = 916;
	//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';
	}
}

function getXhr(){
  
  if(window.XMLHttpRequest) xhr = new XMLHttpRequest(); 
  
  else if(window.ActiveXObject)
   {  
    try
     {
      xhr = new ActiveXObject("Msxml2.XMLHTTP");
     }
    catch (e)
     {
      xhr = new ActiveXObject("Microsoft.XMLHTTP");
     }
   }
  else 
   { 
    xhr = false; 
   }
}

function envoiMDP(chemin){
		
				
	if ( isValidEmail ( document.forms["popupmotdepasse_form"].elements["popupmotdepasse_email"].value )  )
	{
		xhr = getXhr();
		
		if ( getXhr() != false )
		{
		
		xhr.onreadystatechange = function()
		{
						
			if(xhr.readyState == 4 && xhr.status == 200)
			 {
				var docXML= xhr.responseXML;
				var items = docXML.getElementsByTagName("reponse");
						
				
				if ( items.item(0).firstChild.data == "error" )
				{
					setError( "popupmotdepasse_erreur", "Erreur technique" );
					
				}
				else
				{
					closePopup( "popupmotdepasse" );
					affichPopup( "popupmotdepassevalid" );
					
				}
			
			 }
		}
		
		
		
	   
	   
		if(chemin == 'home')
		{
			xhr.open("POST",'include/fonctions/envoiMDP.php',true);

		}
		else
		{
			xhr.open("POST",'../include/fonctions/envoiMDP.php',true);
		}
		
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		xhr.send( "email=" + document.forms["popupmotdepasse_form"].elements["popupmotdepasse_email"].value );
	  
	  }
	
	}else{
		
		setError( "popupmotdepasse_erreur", "Please use a valid e-mail" );
		
	}
}



function setError( champs, ch )
{
	window.document.getElementById( champs ).style.visibility = 'visible';
	window.document.getElementById( champs ).innerHTML = ch;	
	intV = setInterval( 'hideError(\'' + champs + '\')', 2000 );
}

function hideError( champs )
{ 
	var obj = window.document.getElementById( champs );
	obj.style.visibility = 'hidden';
	clearInterval( intV );
}

function ongletsProduitsRouge(disabled){
	
	var myVerticalSlide_1 = new Fx.Slide('Rubrique_Expertise');
	var myVerticalSlide_2 = new Fx.Slide('Rubrique_Innovation');
	
	if(disabled != 3)
	{
		var myVerticalSlide_3 = new Fx.Slide('Rubrique_Efficacite');
	}
	
	var myVerticalSlide_4 = new Fx.Slide('Rubrique_Conseils');
	
	myVerticalSlide_1.hide();
	
	if(disabled != 3)
	{
		myVerticalSlide_2.hide();
	}
	
	myVerticalSlide_3.hide();
	myVerticalSlide_4.hide();
	
	$('Titre_Expertise').addEvent('click', function(e){												
													
		<!-- DEBUG IE -->
		/*if ( getBrowserCodeName() == 'IE' ) {
			if ( myVerticalSlide_1.open == false ){
				myVerticalSlide_1.toggle();	
			}
		}*/
		<!-- FIN DEBUG -->
		
		if ( myVerticalSlide_2.open ){
			myVerticalSlide_2.hide();
		}
		
		if(disabled != 3)
		{
			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		if ( myVerticalSlide_4.open ){
			myVerticalSlide_4.hide();
		}
		e.stop();
			
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "block";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
	
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
		myVerticalSlide_1.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_active_rouge.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
		
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		if ( myVerticalSlide_1.open ){
			window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
	});
	
	$('Titre_Innovation').addEvent('click', function(e){
		if ( myVerticalSlide_1.open ){
			myVerticalSlide_1.hide();
		}
					
		if(disabled != 3)
		{
			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		if ( myVerticalSlide_4.open ){
			myVerticalSlide_4.hide();
		}
		e.stop();
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "block";
		
				
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
		
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
		myVerticalSlide_2.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_active_rouge.jpg) no-repeat";
		
				
		if(disabled != 3)
		{
		window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
		
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		if ( myVerticalSlide_2.open ){
			window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
	});
	
			
	if(disabled != 3)
	{

		$('Titre_Efficacite').addEvent('click', function(e){
			if ( myVerticalSlide_1.open ){
				myVerticalSlide_1.hide();
			}
			if ( myVerticalSlide_2.open ){
				myVerticalSlide_2.hide();
			}
			if ( myVerticalSlide_4.open ){
				myVerticalSlide_4.hide();
			}
			e.stop();
			window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
			window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "block";
			window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
			myVerticalSlide_3.toggle();
			window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
			window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_active_rouge.jpg) no-repeat";
			window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
			if ( myVerticalSlide_3.open ){
				window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
			}
		});
	}
	
	$('Titre_Conseils').addEvent('click', function(e){
		if ( myVerticalSlide_1.open ){
			myVerticalSlide_1.hide();
		}
		if ( myVerticalSlide_2.open ){
			myVerticalSlide_2.hide();
		}
		
				
		if(disabled != 3)
		{

			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		e.stop();
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
		
				
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
		
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "block";
		myVerticalSlide_4.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		
				
		if(disabled != 3)
		{
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
		
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_active_rouge.jpg) no-repeat";
		if ( myVerticalSlide_4.open ){
			window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_rouge.jpg) no-repeat";
		}
	});
}

function ongletsProduitsVert(disabled){
	
	var myVerticalSlide_1 = new Fx.Slide('Rubrique_Expertise');
	var myVerticalSlide_2 = new Fx.Slide('Rubrique_Innovation');
	
	if(disabled != 3)
	{
		var myVerticalSlide_3 = new Fx.Slide('Rubrique_Efficacite');
	}
	
	var myVerticalSlide_4 = new Fx.Slide('Rubrique_Conseils');
	
	myVerticalSlide_1.hide();
	myVerticalSlide_2.hide();
	
	if(disabled != 3)
	{
		myVerticalSlide_3.hide();
	}
	
	myVerticalSlide_4.hide();
	
	$('Titre_Expertise').addEvent('click', function(e){
													
		<!-- DEBUG IE -->
		/*if ( getBrowserCodeName() == 'IE' ) {
			if ( myVerticalSlide_1.open == false ){
				myVerticalSlide_1.toggle();	
			}
		}*/
		<!-- FIN DEBUG -->
		
		if ( myVerticalSlide_2.open ){
			myVerticalSlide_2.hide();
		}
		
		if(disabled != 3)
		{
			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		
		if ( myVerticalSlide_4.open ){
			myVerticalSlide_4.hide();
		}
		e.stop();
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "block";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
		
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
		myVerticalSlide_1.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_active_vert.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
		
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		if ( myVerticalSlide_1.open ){
			window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
	});
	$('Titre_Innovation').addEvent('click', function(e){
		if ( myVerticalSlide_1.open ){
			myVerticalSlide_1.hide();
		}
		if(disabled != 3)
		{
			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		if ( myVerticalSlide_4.open ){
			myVerticalSlide_4.hide();
		}
		e.stop();
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "block";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
		
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
		myVerticalSlide_2.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_active_vert.jpg) no-repeat";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		if ( myVerticalSlide_2.open ){
			window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
	});
	
	
	if(disabled != 3)
	{
		$('Titre_Efficacite').addEvent('click', function(e){
			if ( myVerticalSlide_1.open ){
				myVerticalSlide_1.hide();
			}
			if ( myVerticalSlide_2.open ){
				myVerticalSlide_2.hide();
			}
			if ( myVerticalSlide_4.open ){
				myVerticalSlide_4.hide();
			}
			e.stop();
			window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
			window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "block";
			window.document.getElementById( 'Rubrique_Conseils' ).style.display = "none";
			myVerticalSlide_3.toggle();
			window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
			window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_active_vert.jpg) no-repeat";
			window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
			if ( myVerticalSlide_3.open ){
				window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
			}
		});
	}
	$('Titre_Conseils').addEvent('click', function(e){
		if ( myVerticalSlide_1.open ){
			myVerticalSlide_1.hide();
		}
		if ( myVerticalSlide_2.open ){
			myVerticalSlide_2.hide();
		}
		if(disabled != 3)
		{
			if ( myVerticalSlide_3.open ){
				myVerticalSlide_3.hide();
			}
		}
		e.stop();
		window.document.getElementById( 'Rubrique_Expertise' ).style.display = "none";
		window.document.getElementById( 'Rubrique_Innovation' ).style.display = "none";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Rubrique_Efficacite' ).style.display = "none";
		}
		
		window.document.getElementById( 'Rubrique_Conseils' ).style.display = "block";
		myVerticalSlide_4.toggle();
		window.document.getElementById( 'Titre_Expertise' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		window.document.getElementById( 'Titre_Innovation' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		
		if(disabled != 3)
		{
			window.document.getElementById( 'Titre_Efficacite' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
		window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_active_vert.jpg) no-repeat";
		if ( myVerticalSlide_4.open ){
			window.document.getElementById( 'Titre_Conseils' ).style.background = "url(../images/soins/template/accordion_vert.jpg) no-repeat";
		}
	});
}
