function openMembres(id, idDiv)
{
	if ( document.getElementById(id).style.display == 'none')
	{
		document.getElementById(idDiv).className = 'membres_open';
		document.getElementById(id).style.display = 'block';
	} else if (document.getElementById(id).style.display == 'block')
	{
		document.getElementById(idDiv).className = 'membres_off';
		document.getElementById(id).style.display = 'none';
	}
}

var oldId = '';
function showSousMenu(id)
{
	if (id != oldId)
	{
		document.getElementById(id).style.display = 'block';
		if (document.getElementById(oldId)) document.getElementById(oldId).style.display = 'none';
		oldId = id;
	}
}

function hide()
{
	if (document.getElementById(oldId)) document.getElementById(oldId).style.display = 'none';
	oldId = '';
}

function lireSuite(id, size, divFils)
{
	itemId = id;
	id = 'description_'+id;
	
	document.getElementById('lire_suite_'+itemId).style.display = 'none';
	
	var morphElement = document.getElementById(id);
	var morphObject = new Fx.Morph(morphElement, {duration : 'short'});

	//alert(size);
	size = size/100;
	size = size*16;
	//alert(size);
	
	morphObject.start({
	 'height': size
	});
	
	
}

function openPartenaire(id, idContenaire)
{
	if (document.getElementById(id))
	{
		if (document.getElementById(id).style.display == 'none')
		{
			document.getElementById(id).style.display = 'block';
			document.getElementById(idContenaire).className = 'accordion_partenaire_open';
		} else if (document.getElementById(id).style.display == 'block') {
			document.getElementById(id).style.display = 'none'
			document.getElementById(idContenaire).className = 'accordion_partenaire_off';
		}
	}
}

Array.prototype.count = function() {
	return this.length;
}

var listePhoto = new Array;
var count = 0;
function changePhotoDecompte(tab)
{
	listePhoto = tab;
	window.setInterval("changePhotoAccueil()",3000);
}



function changePhotoAccueil()
{
	//alert(listePhoto[count][4]);
		
	if (count == listePhoto.count())
	{
		count = 0;
	}
	document.getElementById('img_photo').src = listePhoto[count][4];
	document.getElementById('nomAlbum').innerHTML = listePhoto[count][6];
	document.getElementById('href').href = listePhoto[count][7]+".html?idAlbum="+listePhoto[count][1];
	count++;
}

function selectYear(year)
{
	document.getElementById('year').value = year;
	document.forms['pagination'].submit()
}

