// JavaScript Document
function chargerLes2(pageGauche,pagePrincipale) {
	parent.frames["leftFrameBRQ"].window.location=pageGauche;
	parent.frames["mainFrameBRQ"].window.location=pagePrincipale;
}

function chargerGauche(pageGauche) {
	parent.frames["leftFrameBRQ"].window.location=pageGauche;
	parent.frames["mainFrameBRQ"].window.location="Main.php";
}

function chargerPrincipale(pagePrincipale) {
	parent.frames["mainFrameBRQ"].window.location=pagePrincipale;
}
function chargerTopMain() {

	var haut="top.php?ladate="+window.document.getElementById("ladate").value;
	var princ="main.php?ladate="+window.document.getElementById("ladate").value;
	parent.frames["topFrameBRQ"].window.location=haut;
	parent.frames["mainFrameBRQ"].window.location=princ;
}

function ouvrirCR(operation,designation,ladate) {
	var laPage = "Compte_Rendu.php?operation="+operation+"&designation="+designation+"&ladate="+ladate;
	parent.frames["mainFrameBRQ"].window.location=laPage;
}
function ouvrirMain_1(ladate) {
	var laPage = "main_1.php?ladate="+ladate;
	parent.frames["mainFrameBRQ"].window.location=laPage;
}
function enregCR(ladate,loperation) {
	var laPage = "main_1.php?letexte="+window.document.getElementById("letexte").value+"&ladate="+ladate+"&loperation="+loperation;
	alert(laPage);
	parent.frames["mainFrameBRQ"].window.location=laPage;
}

var popUpWin=0;
function MM_openBrWindow(leCode) { //v2.0
	var top=(screen.height-(750))/2;
	var left=(screen.width-(675))/2;
	var lefic = "DetailOperation.php?leParam="+leCode;
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	popUpWin = window.open(lefic,'popUpWin','top='+top+',left='+left+',width='+675+',height='+750+',resizable=yes');
}
var popUpListe=0;
function MM_openBrListe(ladate) { //v2.0
	var h = 750;
	var w = 675;
	var top=(screen.height-(h))/2;
	var left=(screen.width-(w))/2;
	var lefic = "listeInter.php?ladate="+ladate;
	if(popUpListe)
	{
		if(!popUpListe.closed) popUpListe.close();
	}
	popUpListe = window.open(lefic,'popUpWin','top='+top+',left='+left+',width='+w+',height='+h+',resizable=yes,scrollbars=yes');

}
function afficheAppels() {
	var ladate = window.document.getElementById("ladate").value;
	Afficher_div();
	requeteAppels(ladate);
}

function Afficher_div() {
  	document.getElementById('div_appels').style.visibility = "visible";
  	//document.getElementById('appels').style.visibility = "visible";

}

function Masquer_div() {
  	document.getElementById('div_appels').style.visibility = "hidden";
}

function Afficher_ifr() {
  	document.getElementById('if_appels').height="250";
}

function Masquer_ifr() {
  	document.getElementById('if_appels').height="5";
}
function afficher_details(elt) {
	var etat = document.getElementById(elt).className;
	//alert(etat);
	
	if (etat=="aff") 
		{ document.getElementById(elt).className = "masq";} 
		else 
		{ document.getElementById(elt).className = "aff";}

}
function afficher_vehicules(inter, image) {
	//var etat = document.getElementById(inter).className;
	//alert(inter);
	var tr = 'tr'+inter;
	var plus = "Images/plus.gif";
	var moins = "Images/moins.gif"
	var etat = document.getElementById(tr).className;
	
	if (etat=="aff") 
		{ 
		//document.getElementById(inter).className = "masq";
		document.getElementById(tr).className = "masq" ;
		document.images[image].src= plus;

		} 
	else 
		{ 
		requeteVehicules(inter);
		//document.getElementById(inter).className = "aff";
		document.getElementById(tr).className = "aff" ;
		document.images[image].src= moins;
		}

}
function afficheligne() {

	var etat = document.getElementById("ligne").className;
	
	if (etat=="aff") 
		{ document.getElementById("ligne").className = "masq";} 
		else 
		{ document.getElementById("ligne").className = "aff";}

}

