﻿function ouvrirPopup(url, fenetre, height, width)
{
	newwindow=window.open(url + '?url=' + location.href, fenetre, 'height=' + height + ',width=' + width + ',top=200,left=200,toolbar=0,location=0,Directories=0,Status=1,Menubar=0,Scrollbars=0,Resizable=1');
	if (window.focus) {newwindow.focus()}
}

function changerTitre()
{
	var hasInnerText =
	(document.getElementsByTagName("body")[0].innerText != undefined) ? true : false;
	
	var elemTitre = document.getElementById("Titre");
	
	if(!hasInnerText){
	    var titre = elemTitre.textContent;
	} else{
	    var titre = elemTitre.innerText;
	}
	
	if (titre != null && titre != "")
	{
		document.title = titre;
	}
}

function fermer() { 
	opener=self; 
	self.close(); 
} 


function ajusterConteneur()
{
	var height1= window.innerHeight - 80;
	var height2= document.body.clientHeight - 80;
	if(window.innerHeight){	
		document.getElementById("conteneur").style.height = height1 + "px";
	}
	else if (document.body.clientHeight) {
		document.getElementById("conteneur").style.height = height2 + "px";
	}
}
	
window.onresize=ajusterConteneur;
