var w3c=document.getElementById && !document.all;
var ie=document.all;

if (ie||w3c) {
	// Déclaration des variables uniquement pour IE
	var overlay;
	var my_window;
}

function AfficherOverlays(strFond, strContenu){
	// Affiche l'overlay avec un tableau à l'intérieur
	AfficherFond(strFond, "<table class='image_calque' valign='center' border='0' align='center'><tr><td></td></tr>");
	// Affiche le contenu
	AfficherContenu(strContenu);
	
	var htmlElement = document.getElementsByTagName('html')[0];
	htmlElement.style.overflow = 'hidden';
}

function AfficherFond(id, text) {
	if (w3c||ie){
		overlay = document.all ? document.all[id] : document.getElementById ? document.getElementById(id) : ""
		overlay.innerHTML = text; // Place le contenu spécifié dans le fond
		overlay.style.visibility = "visible"; // Affiche le fond
		overlay.style.width = "100%";
		overlay.style.height = "100%";
	}
}

function AfficherContenu(id) {
	if (w3c||ie){
		// Affichage du contenu
		my_window = document.all ? document.all[id] : document.getElementById ? document.getElementById(id) : ""
		my_window.style.visibility = "visible";
		overlay.style.width = "100%";
		overlay.style.height = "100%";
	}
}

function CacherOverlays(strFond, strContenu) {
	if (w3c||ie){
		// Masque le fond
		my_window = parent.document.getElementById(strFond);
		my_window.style.visibility = "hidden";
		
		// Masque le contenu
		my_window = document.all ? parent.document.all[strContenu] : parent.document.getElementById ? parent.document.getElementById(strContenu) : ""
		my_window.style.visibility = "hidden";
		
		var htmlElement = document.getElementsByTagName('html')[0];
		htmlElement.style.overflow = 'inherit';
	}
} 