/*-------------------------------------------------------*
 * FAQ
 *
 * Déployer les réponses onclick.
 *
 * © Copyright 2005 e-TF1 - Tous droits réservés
 * Conception & Réalisation : e-TF1 Développements Filiales
 *-------------------------------------------------------*/

// le script s'ajoute au chargement
addEvent(window, "load", faq_init);

/**
 * Initialise le script
 */
function faq_init()
{
	var faq = document.getElementById("faq");
	if ( faq ) {
		var ul = faq.getElementsByTagName("UL");
		for ( var i = 0, n1 = ul.length ; i < n1; i++) {
			var li = ul[i].getElementsByTagName("LI");
			for ( var j = 0, n2 = li.length; j < n2; j++ ) {
				var div = li[j].getElementsByTagName("DIV");
				div[0].onclick = function() {
					the_div = this.nextSibling
					while ( the_div.nodeName && the_div.nodeName != "DIV")
						the_div = the_div.nextSibling;
					the_div.style.display = (the_div.style.display == "block" ? "none" : "block");
				}
			}
		}
	}
}
