// JavaScript Document
function envoieRequete(url,id) {
	var xhr_object = null;
	var position = id;
	if(window.XMLHttpRequest) xhr_object = new XMLHttpRequest();
	else
	if (window.ActiveXObject) xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	
	// On ouvre la requete vers la page désirée
	xhr_object.open("GET", url, true);
	// on change l'adresse pour les besoins de navigation
	xhr_object.onreadystatechange = function(){
	if ( xhr_object.readyState == 4 )
		{
		// j'affiche dans la DIV spécifiées le contenu retourné par le fichier
		document.getElementById(position).innerHTML = xhr_object.responseText;
		}
	}
	// dans le cas du get
	xhr_object.send(null);
} 

function dimension(){
	var iframeid="_contenu";
	var supplement=10;
	var taille;
	if (!window.parent) return;
	var myiframe = window.parent.document.getElementById(iframeid);
	if(!myiframe) return;
	taille=document.body.scrollHeight+supplement;
	alert("taille : "+taille);
	myiframe.style.height = taille+"px";

}
	
function doPassVar(args){
   var sendText = args.value;
   window.document.myFlash.SetVariable("myVar", sendText);
}

function afficheMenu(YesNo){
	// display='inline' a été remplacé par display='block' pour la compatibilité ave IE6
	if(YesNo=='Yes') {
		document.getElementById('info').style.display='none';
		document.getElementById('menu_g').style.display='inline';}
	else {
		document.getElementById('menu_g').style.display='none';
		document.getElementById('info').style.display='inline';}
	
}

function validerEnvoi(){
	return confirm("Etes-vous prêt à envoyer ce message ?");
}
	
function modifierTitre(args){
	document.title=args;	
}
	
function modifierFond(taille){
	if(taille=='petit') {
		document.getElementById('contenu').style.background='url(Images/background/background_R.gif) center no-repeat';
	}
}
	
	
	
