

//******************************************************************************
//
//	gestion d'affichage des fenętres
//
//******************************************************************************

function getXhr()
{
	var xhr = null; 
	if(window.XMLHttpRequest) // Firefox et autres
	   xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject){ // Internet Explorer 
	   try {
		xhr = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch (e) {
		xhr = new ActiveXObject("Microsoft.XMLHTTP");
	    }
	}
	else { // XMLHttpRequest non supporté par le navigateur 
	   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	   xhr = false; 
	} 
	return xhr
}

function affiche_amicale()
{
	var xhr01 = getXhr();
	xhr01.onreadystatechange = function()
	{
		if(xhr01.readyState == 4 && xhr01.status == 200)
		{
			document.getElementById('information').innerHTML = xhr01.responseText;
		}
	}
	xhr01.open("POST","asm.php",true);
	xhr01.send(null);
}

function affiche_action()
{
	var xhr02 = getXhr();
	xhr02.onreadystatechange = function()
	{
		if(xhr02.readyState == 4 && xhr02.status == 200)
		{
			document.getElementById('information').innerHTML = xhr02.responseText;
		}
	}
	xhr02.open("POST","action.php",true);
	xhr02.send(null);
}

function affiche_bureau()
{
	var xhr03 = getXhr();
	xhr03.onreadystatechange = function()
	{
		if(xhr03.readyState == 4 && xhr03.status == 200)
		{
			document.getElementById('information').innerHTML = xhr03.responseText;
		}
	}
	xhr03.open("POST","bureau.php",true);
	xhr03.send(null);
}

function affiche_partenaire()
{
	var xhr04 = getXhr();
	xhr04.onreadystatechange = function()
	{
		if(xhr04.readyState == 4 && xhr04.status == 200)
		{
			document.getElementById('information').innerHTML = xhr04.responseText;
		}
	}
	xhr04.open("POST","partenaire.php",true);
	xhr04.send(null);
}

function affiche_contact()
{
	var xhr05 = getXhr();
	xhr05.onreadystatechange = function()
	{
		if(xhr05.readyState == 4 && xhr05.status == 200)
		{
			document.getElementById('information').innerHTML = xhr05.responseText;
		}
	}
	xhr05.open("POST","contact.php",true);
	xhr05.send(null);
}

function affiche_tof_president()
{
	var xhr06 = getXhr();
	xhr06.onreadystatechange = function()
	{
		if(xhr06.readyState == 4 && xhr06.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr06.responseText;
		}
	}
	xhr06.open("POST","fiche_president.php",true);
	xhr06.send(null);
}
function affiche_tof_vice_president()
{
	var xhr07 = getXhr();
	xhr07.onreadystatechange = function()
	{
		if(xhr07.readyState == 4 && xhr07.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr07.responseText;
		}
	}
	xhr07.open("POST","fiche_vice_president.php",true);
	xhr07.send(null);
}
function affiche_tof_secretaire()
{
	var xhr08 = getXhr();
	xhr08.onreadystatechange = function()
	{
		if(xhr08.readyState == 4 && xhr08.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr08.responseText;
		}
	}
	xhr08.open("POST","fiche_secretaire.php",true);
	xhr08.send(null);
}
function affiche_tof_tresorier()
{
	var xhr09 = getXhr();
	xhr09.onreadystatechange = function()
	{
		if(xhr09.readyState == 4 && xhr09.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr09.responseText;
		}
	}
	xhr09.open("POST","fiche_tresorier.php",true);
	xhr09.send(null);
}

function affiche_action_montpellier()
{
	var xhr10 = getXhr();
	xhr10.onreadystatechange = function()
	{
		if(xhr10.readyState == 4 && xhr10.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr10.responseText;
		}
	}
	xhr10.open("POST","action_montpellier.php",true);
	xhr10.send(null);
}

function affiche_action_toulouse()
{
	var xhr11 = getXhr();
	xhr11.onreadystatechange = function()
	{
		if(xhr11.readyState == 4 && xhr11.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr11.responseText;
		}
	}
	xhr11.open("POST","action_toulouse.php",true);
	xhr11.send(null);
}

function affiche_abonnement()
{
	var xhr12 = getXhr();
	xhr12.onreadystatechange = function()
	{
		if(xhr12.readyState == 4 && xhr12.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr12.responseText;
		}
	}
	xhr12.open("POST","abonnement.php",true);
	xhr12.send(null);
}

function affiche_tof_bureau_directeur()
{
	var xhr13 = getXhr();
	xhr13.onreadystatechange = function()
	{
		if(xhr13.readyState == 4 && xhr13.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr13.responseText;
		}
	}
	xhr13.open("POST","fiche_bureau_directeur.php",true);
	xhr13.send(null);
}

function affiche_tof_president_honneur()
{
	var xhr14 = getXhr();
	xhr14.onreadystatechange = function()
	{
		if(xhr14.readyState == 4 && xhr14.status == 200)
		{
			document.getElementById('bureau_fiche').innerHTML = xhr14.responseText;
		}
	}
	xhr14.open("POST","fiche_president_honneur.php",true);
	xhr14.send(null);
}

function affiche_action_montpellier_album()
{
	var xhr15 = getXhr();
	xhr15.onreadystatechange = function()
	{
		if(xhr15.readyState == 4 && xhr15.status == 200)
		{
			document.getElementById('action_montpellier_album_2').innerHTML = xhr15.responseText;
		}
	}
	xhr15.open("POST","<img src='css/png/asm_date.png'>",true);
	xhr15.send(null);
}

function affiche_action_stfrancais()
{
	var xhr16 = getXhr();
	xhr16.onreadystatechange = function()
	{
		if(xhr16.readyState == 4 && xhr16.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr16.responseText;
		}
	}
	xhr16.open("POST","action_stfrancais.php",true);
	xhr16.send(null);
}

function affiche_action_munster()
{
	var xhr17 = getXhr();
	xhr17.onreadystatechange = function()
	{
		if(xhr17.readyState == 4 && xhr17.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr17.responseText;
		}
	}
	xhr17.open("POST","action_munster.php",true);
	xhr17.send(null);
}

function affiche_action_castres()
{
	var xhr18 = getXhr();
	xhr18.onreadystatechange = function()
	{
		if(xhr18.readyState == 4 && xhr18.status == 200)
		{
			document.getElementById('action_info').innerHTML = xhr18.responseText;
		}
	}
	xhr18.open("POST","action_castres.php",true);
	xhr18.send(null);
}
//******************************************************************************
//
//	gestion d'apparition des div
//
//******************************************************************************

function montre(id)
{
	elem = document.getElementById(id);
	elem.style.display = 'block';
}

function cache(id)
{
	elem = document.getElementById(id);
	elem.style.display = 'none';
}
//******************************************************************************
//
//	gestion d'animation des boutons
//
//******************************************************************************

function anime(id,anime,stable)
{
	elem = document.getElementById(id);
	elem.style.backgroundImage = 'url('+anime+')';
	delai = window.setTimeout(desanime, 1000, id, stable);
}

function desanime(id, stable)
{
	elem2 = document.getElementById(id);
	elem2.style.backgroundImage = 'url('+stable+')';
}

function change_image(id, tof)
{
	elem = document.getElementById(id);
	elem.style.backgroundImage = 'url('+tof+')';
}

