/*****************************************************************************************
	Script       : Affiche cache un objet / mise a jour lien Afficher/Cacher correspondant.
	Version      : v1.0 - 07/08/2005
	Auteur 		 : Gouny Bertrand
	Copyright    : www.philateliste-web.com - Gouny Bertrand - 2005

	Informations : Vous pouvez utiliser ou redistribuer ce script librement.
	Contact 	 : http://www.philateliste-web.com/nous_contacter.php?style=dev
	
							Utilisé sur divers pages
******************************************************************************************/
var div_aff_agrandir;
var nouvhauteur;
var debut;
var anc_hauteur;
var compte;

function aff_agrandirdiv(){
	if (nouvhauteur>0.5){
		objet(div_aff_agrandir).style.height = debut+(nouvhauteur/4)+'px';//mise a jour de la hauteur
		debut += nouvhauteur/4;		
		nouvhauteur -= nouvhauteur/4;
		compte = window.setTimeout("aff_agrandirdiv()",20);//relance la fonction toutes les x ms 
	}
	else{			
		window.clearTimeout(compte)
		objet(div_aff_agrandir).style.height=anc_hauteur+'px';//redéfinie la hauteur avant l'effet.
    }
}

function afficher_categorie(id_div){
	if (objet(id_div).style.display == "none"){
		objet(id_div).style.display = "block";
		objet(id_div).style.overflow = "hidden";
		
		div_aff_agrandir=id_div;
		anc_hauteur = objet(id_div).offsetHeight;
		nouvhauteur=anc_hauteur;
		objet(div_aff_agrandir).style.height='1px';
		debut=0;
		aff_agrandirdiv();
	}
	else{
		objet(id_div).style.display = "none";
	}
}
function changecontenu(id_div,id_div2){
	if(objet(id_div2).style.display == "none"){
		objet(id_div).innerHTML="Afficher";
	}
	else{
		objet(id_div).innerHTML="Cacher";
	}
}