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

if (ie||w3c){
	// déclaration des variables uniquement pour IE vive microsoft ?!!
	var overlay;
	var my_window;
}

function affiche_overlay_window(image_fond_overlay){
	if (ie||w3c){
		// creation de l'overlay et affichage de l'image
		if(image_fond_overlay != ""){
			montreoverlay("<img src='"+image_fond_overlay+"' />");
			montrefenetre();
		}
		else{
			montreoverlay("");
			montrefenetre();
		}
	}
}

function montreoverlay(text){
	if (w3c||ie){
		overlay = document.all ? document.all["overlay"] : document.getElementById ? document.getElementById("overlay") : ""
		overlay.innerHTML = text; // fixe le code HTML dans l'overlay balise (div)
		overlay.style.visibility = "visible"; // modification du style
	}
}

function montrefenetre(){
  if (w3c||ie){
	my_window = document.all ? document.all['window'] : document.getElementById ? document.getElementById('window') : ""
	//affichage de la fenetre
    my_window.style.visibility = "visible";
  }
}

function cachetout(){
	if (w3c||ie){
		// masque l'overlay (balise div [overlay])
		overlay = document.all ? parent.document.all['overlay'] : parent.document.getElementById ? parent.document.getElementById('overlay') : "";
		if (overlay || overlay == "" ){
			overlay.style.visibility = "hidden";
		}
		// masque la fenetre (balise div [window] )
		my_window = document.all ? parent.document.all['window'] : parent.document.getElementById ? parent.document.getElementById('window') : "";
		if (my_window || my_window == "" ){
			my_window.style.visibility = "hidden";
		}
	}
}
