/*
 * Affiche ou masque un element
 */
function setVisible(elementId,txtAff,txtMasque)
{
	var targetElement;
	var targetElementLink;

	targetElement = document.getElementById(elementId) ;
	targetElementLink = document.getElementById(elementId+'Link');

	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "" ;
		targetElementLink.innerHTML = txtMasque ;
	} else {
		targetElement.style.display = "none" ;
		targetElementLink.innerHTML = txtAff ;
	}
}

/*
 * Surbrillance
 */
function highlight(target, theStyle) {

	// Support des styles
	if(typeof(target.className) == 'undefined') {
     		return false;
     	}
     		        
        // On applique le style
        target.className = theStyle;
   	return true;
}

/*
 * Confirmation
 */     
function confirmAction(message,action){
        if(confirm(message)){
        	document.location.href=action;
	}
}		                    
