function toggle(n, name) {
    var node = n.firstChild;
    // parcourt tous les fils pour trouver l'element div
    //node = node.nextSibling;
    while ( node ) {
	if (node.nodeName == "DIV") {
	    //document.write ("truc");
	    // cache les autres boîtes
	    if ( node.getAttribute("name") != name) {
		node.style.display = 'none';
	    } else {
		// affiche ou cache la boîte
		if ( node.style.display == 'none' ) {
		    node.style.display = 'block';
		} else {
		    node.style.display = 'none';
		}
	    }
	}
	node = node.nextSibling;
    }
}

function filterBib() {
    var article_flag = document.getElementById("article-box").checked;
    var confint_flag = document.getElementById("confint-box").checked;
    var confnat_flag = document.getElementById("confnat-box").checked;
    var workshop_flag = document.getElementById("workshop-box").checked;

    var flag = true;
    for (i = 0; flag; i++) {
	flag = false;
	var article = document.getElementById("article-" + i);
	var confint = document.getElementById("confint-" + i);
	var confnat = document.getElementById("confnat-" + i);
	var workshop = document.getElementById("workshop-" + i);

	if (article != null) {
	    flag = true;
	    if (article_flag) {
		article.style.display = 'block';
	    } else {
		article.style.display = 'none';
	    }
	}

	if (workshop != null) {
	    flag = true;
	    if (workshop_flag) {
		workshop.style.display = 'block';
	    } else {
		workshop.style.display = 'none';
	    }
	}

	if (confint != null) {
	    flag = true;
	    if (confint_flag) {
		confint.style.display = 'block';
	    } else {
		confint.style.display = 'none';
	    }
	}

	if (confnat != null) {
	    flag = true;
	    if (confnat_flag) {
		confnat.style.display = 'block';
	    } else {
		confnat.style.display = 'none';
	    }
	}
    }
}
