function set_action_loginext(action){
	
	var bSub = true;
	
	switch (action){
		case 'ok_1':
			if(document.getElementById("hpologinextLogin").value == '' || document.getElementById("hpologinextPass").value == ''){
				alert("Veuillez saisir votre identifiant et votre mot de passe.");
				bSub = false;
			}
			break;
	}
	if (bSub){
		document.getElementById("action_form").value = action;
		document.getElementById("hpo_loginext_form").submit();
	}
	else return false;
	
}

function set_action_loginext_acces(action){
	var bSub = true;
	
	switch (action){
		case 'ok_1':
			if(document.getElementById("hpologinextLogin_acces").value == '' || document.getElementById("hpologinextPass_acces").value == ''){
				alert("Veuillez saisir votre identifiant et votre mot de passe.");
				bSub = false;
			}
			break;
	}
	if (bSub){
		document.getElementById("action_form_acces").value = action;
		document.getElementById("hpo_loginext_form_acces").submit();
	}
	else return false;	
}

function popup_connexion(nom_de_la_page, nom_interne_de_la_fenetre){
	window.open (nom_de_la_page, nom_interne_de_la_fenetre, config='height=250, width=555 , toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
}

function popup_deconnexion(nom_de_la_page, nom_interne_de_la_fenetre){
	window.open (nom_de_la_page, nom_interne_de_la_fenetre, config='height=450, width=800 , toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
}

function set_action_loginext_deconnexion(action, url_deconnexion){
	
	if (url_deconnexion != ''){
		popup_deconnexion(url_deconnexion, 'popup_deconnexion');
	}
	
	document.getElementById("hpo_loginext_form_deconnexion").submit();	
	return false;
}



function loginExtSwitch(id){
	document.getElementById('ax_com').style.display = 'none';
	document.getElementById('ax_org').style.display = 'none';
	document.getElementById(id).style.display = 'block';
}