var o_popup_to_hide	= 	null;
var timer			=	null;
a_forms_verif	=	new Array();
a_forms_verif["mail_1"]	="Veuillez saisir un email<br/><br/>";
a_forms_verif["pwd_1"]	="Veuillez saisir un mot de passe<br/><br/>";
function submitChgMdp(){

	// CHG Mail
	var o_input	=	document.getElementById('mail_1');
	var o_li	=	document.getElementById("l_"+o_input.id);
	var o_popup	=	document.getElementById("p_"+o_input.id);
	var o_popup_text	=	document.getElementById("pt_"+o_input.id);
	
	if(o_input.value==""){
		o_li.className="no";
		
		o_popup_text.innerHTML	=	"<em>"+a_forms_verif[o_input.id]+"</em>";
		if(o_popup_to_hide)
			o_popup_to_hide.style.display	=	"none";	
		o_popup.style.display	=	"block";					
		o_popup_to_hide	=	o_popup;			
		timerClose();				
		return false;
	}
	
	// CHG Mot de passe	
	var o_input	=	document.getElementById('pwd_1');
	var o_li	=	document.getElementById("l_"+o_input.id);
	var o_popup	=	document.getElementById("p_"+o_input.id);
	var o_popup_text	=	document.getElementById("pt_"+o_input.id);
	
	if(o_input.value==""){
		o_li.className="no";
		
		o_popup_text.innerHTML	=	"<em>"+a_forms_verif[o_input.id]+"</em>";
		if(o_popup_to_hide)
			o_popup_to_hide.style.display	=	"none";	
		o_popup.style.display	=	"block";					
		o_popup_to_hide	=	o_popup;			
		timerClose();				
		return false;
	}
	
	o_form	=	document.getElementById('f_register');
	o_form.submit();
}

function blurInput(o_input){
	
	var o_li	=	document.getElementById("l_"+o_input.id);
	var o_popup	=	document.getElementById("p_"+o_input.id);
	var o_popup_text	=	document.getElementById("pt_"+o_input.id);	
	if(o_input.value==""){
		o_li.className="no";
		
		o_popup_text.innerHTML	=	"<em>"+a_forms_verif[o_input.id]+"</em>";
		if(o_popup_to_hide)
			o_popup_to_hide.style.display	=	"none";	
		o_popup.style.display	=	"block";					
		o_popup_to_hide	=	o_popup;			
		timerClose();				
		
	}else{
		
		o_li.className="yes";
	}
	
}
function timerClose(){
	timer=setInterval("closePopup()", 2000);

}

function closePopup(){
if(o_popup_to_hide)
	o_popup_to_hide.style.display	=	"none";
	clearInterval(timer);
}