var pixels_marge = 0;


function redimensionnement_iframe()
{
	if(navigator.appName=="Microsoft Internet Explorer" ){

		if (document.all)
		{
			document.all.id_iframe.contentWindow.focus();
			var nouvelle_taille = pixels_marge + document.frames("id_iframe").document.body.scrollHeight; // Tant pis pour IE
			document.all.id_iframe.style.height = nouvelle_taille;
		}
		else
		{	var id_iframe = document.getElementById('id_iframe');
			id_iframe.contentWindow.focus();
			var nouvelle_taille = pixels_marge + document.getElementById("id_iframe").contentDocument.getElementById('contenu').scrollHeight;
			id_ifame.style.height = nouvelle_taille;
			
			document.title = id_iframe.contentDocument.title;
		}
	}
	else
	{
		var id_iframe = document.getElementById('id_iframe');
		var id_page = document.getElementById('page');
		var taille_page = id_page.offsetHeight;
		
		// Redimensionnement du cadre
		id_iframe.contentWindow.focus();
		var nouvelle_taille = (id_iframe.contentDocument.getElementById('contenu').offsetHeight + pixels_marge);
		id_iframe.style.height = nouvelle_taille+"px";
		
		// Actualisation du titre selon le titre de l'iframe
		document.title = id_iframe.contentDocument.title;
		
		/* // Placement en position centrale verticale
		var taille_page = id_page.offsetHeight;
		alert(taille_page);
		id_page.style.top = '50%';
		var marginTopPx = 0 - taille_page / 2;
		alert(marginTopPx);
		id_page.style.marginTop = marginTopPx + 'px'; */
	}
}
/* function redimensionnement_iframe() // fonction à appeler dans la page contenue dans l'iframe
{
	document.body.focus();
	id_iframe.style.height = (document.body.offsetHeight + pixels_marge) + 'px';
} */