// JavaScript Document

function afficher_menu(obj) {

var etat_menu=document.getElementById(obj).style.display;

if (etat_menu=="none")
	{
	document.getElementById(obj).style.display = ''; // AFFICHE LE COMPOSANT
	}
else if (etat_menu=="")
	{
	document.getElementById(obj).style.display = 'none'; // AFFICHE LE COMPOSANT
	}
}



function afficher_programme(obj) {

var etat_programme=document.getElementById(obj).style.display;

if (etat_programme=="none")
	{
	document.getElementById(obj).style.display = ''; // AFFICHE LE COMPOSANT
	}
else if (etat_programme=="")
	{
	document.getElementById(obj).style.display = 'none'; // AFFICHE LE COMPOSANT
	}
}

function afficher_formulaire(obj) {

var etat_formulaire=document.getElementById(obj).style.display;

if (etat_formulaire=="none")
	{
	document.getElementById(obj).style.display = ''; // AFFICHE LE COMPOSANT
	}
else if (etat_formulaire=="")
	{
	document.getElementById(obj).style.display = 'none'; // AFFICHE LE COMPOSANT
	}
}


function fermer_formulaire_ouvert(monDiv) {
	alert (monDiv);
	/*
	var etat_image=document.getElementById(obj).style.display;
	if (etat_image=="")
		{
		document.getElementById(obj).style.display = 'none'; // AFFICHE LE COMPOSANT
		}
	*/
}


function afficher_video()
	{
	document.write("<div align='center'><?php echo $affiche_video[2]; ?></div>")	
	}



function suppr_alert(chemin,article) {

var reponse=window.confirm ("voulez-vous supprimer ce contenu du site ?");
if (reponse==false)
	{
	location.replace("");
	}
else
	{
	location.replace (chemin+article) ;
	}

}

function annuler(chemin)
	{
	location.replace (chemin)
	}




////
function open_visionneuse (film_id)
{
	var m = window.open ("radi_film.php?film_id="+film_id, "_blank", "scrollbars = yes", "attributs");
	m.moveTo(100,1000)
	m.resizeTo(880,835)
	m.focus();
}

function open_visionneuse_2 (film_id)
{
	var m = window.open ("visio_film.php?film_id="+film_id, "_blank", "scrollbars = yes", "attributs");
	m.moveTo(100,1000)
	m.resizeTo(880,835)
	m.focus();
}

function open_visionneuse_3 (film_id,type)
{
	var m = window.open ("visio_prog.php?"+type+"="+film_id, "_blank", "scrollbars = yes", "attributs");
	m.moveTo(100,1000)
	m.resizeTo(880,835)
	m.focus();
}

