var timer_accordion;


var annonceursbox_height = File('libs/js/ajax_annonceurs.php?what=nbannonceurs');
annonceursbox_height = annonceursbox_height*30.5;
function accordion_show_annonceurs() 
{
	var obj = document.getElementById('annonceurs-box');
	var hauteur = obj.offsetHeight;
	if(hauteur <= 0)
	{
		setTimeout(accordion_hide_annonceurs, 8000);
		maximize();
	}
	function maximize()
	{
		var hauteur = obj.offsetHeight;
		obj.style.height=hauteur+5+'px';
		if(hauteur < annonceursbox_height)
			setTimeout(maximize, 15);
	}	

	
	//	annonceursbox_height = hauteur;

	
}

function accordion_toggle_annonceurs()
{
	var obj = document.getElementById('annonceurs-box');
	var hauteur = obj.offsetHeight;
	if(hauteur <= 0)
	{
		accordion_show_annonceurs();
	}
	else
	{
	//	accordion_hide_annonceurs();
	} 
}

function accordion_hide_annonceurs()
{
	var obj = document.getElementById('annonceurs-box');
	var hauteur = obj.offsetHeight;
	if(hauteur > 0)
		minimize();
	
	function minimize()
	{
		var hauteur = obj.offsetHeight;
		obj.style.height=hauteur-5+'px';
		if(hauteur > 0)
			setTimeout(minimize, 5);
	}
}


var partnersbox_height = File('libs/js/ajax_annonceurs.php?what=nbpartners');
partnersbox_height = partnersbox_height*30.5;
//var partnersbox_height = 90;
function accordion_show_partners() 
{
	var obj = document.getElementById('partners-box');
	var hauteur = obj.offsetHeight;
	if(hauteur <= 0)
	{
		setTimeout(accordion_hide_partners, 8000);
		maximize();
	}
	function maximize()
	{
		var hauteur = obj.offsetHeight;
		obj.style.height=hauteur+5+'px';
		if(hauteur < partnersbox_height)
			setTimeout(maximize, 15);
	}	

	
	//	annonceursbox_height = hauteur;

	
}

function accordion_toggle_partners()
{
	var obj = document.getElementById('partners-box');
	var hauteur = obj.offsetHeight;
	if(hauteur <= 0)
	{
		accordion_show_partners();
	}
	else
	{
	//	accordion_hide_partners();
	} 
}

function accordion_hide_partners()
{
	var obj = document.getElementById('partners-box');
	var hauteur = obj.offsetHeight;
	if(hauteur > 0)
		minimize();
	
	function minimize()
	{
		var hauteur = obj.offsetHeight;
		obj.style.height=hauteur-5+'px';
		if(hauteur > 0)
			setTimeout(minimize, 5);
	}
}