function mouse_hover_elmts_bas()
{
	$(".content_bas_list li a.img_action_link").each(
	function()
	{
		var el = $(this);
		var els = el.children("#img_action");
		
		el.hover(
			function()
			{		
				els.css("display", "block");
			},
			function()
			{		
				els.css("display", "none");
			}
		);
	});
}

function autoempty(){
	$("form input.autoempty").each(function(){
		var defaultText = $(this).val();
		
		$(this).focus(function(){
			if ($(this).val()==defaultText){
				$(this).val("");
			}
		});
		
		$(this).blur(function(){
			if ($(this).val()==""){
				$(this).val(defaultText);
			}
		});
	});	
	$("form textarea.autoempty_txta").each(function(){
		var defaultText = $(this).text();
		
		$(this).focus(function(){
			if ($(this).text()==defaultText){
				$(this).text("");
			}
		});
		
		$(this).blur(function(){
			if ($(this).text()==""){
				$(this).text(defaultText);
			}
		});
	});	
}

function test_champs(){
	
	var e=true;
	var t=true;
			
	
	if(document.formulaire.mail.value.length != 0)
	{
		if ((document.formulaire.mail.value.indexOf("@")=="-1") || (document.formulaire.mail.value.indexOf(".") =="-1"))
		{
			 //document.formulaire.mail.focus();
			 e=false;
  		}
	}else
	{
		t=false;
	}
	
	if(document.getElementById("quest_Nom").value.length == 0)
	{
		t=false;
	}
	if(document.getElementById("quest_Prenom").value.length == 0)
	{
		t=false;
	}
	if(document.getElementById("quest_Societe").value.length == 0)
	{
		t=false;
	}
	if(document.getElementById("quest_Fonction").value.length == 0)
	{
		t=false;
	}
	
	if(t==true && e==true)
	{
		return true;
	}else
	{
		if(t==false)
		{
			alert("Veuillez remplir les champs obligatoires (*) ");
			return false;
		}else if(e==false)
		{
			alert("Veuillez entrer une adresse mail valide");
			return false;
		}
	}
}

/*********************************************/

$(document).ready(function(){
	mouse_hover_elmts_bas();
});

$(document).ready(function(){
	autoempty();
});
