// JavaScript Document
function showLayer(element){
	document.getElementById(element).style.display = "";
}
function hideLayer(element){
	document.getElementById(element).style.display = "none";
}
function showHideCartouche(element){
	if (document.getElementById("cartouche"+element).style.display == "none") {
		document.getElementById("cartouche"+element).style.display = "";
		document.getElementById("puce"+element).src = "Images/puce_ouverte.gif";
	} else {
		document.getElementById("cartouche"+element).style.display = "none";
		document.getElementById("puce"+element).src = "Images/puce_fermee.gif";
	}
}
function selectCartouche(idFond,idType){
	var chaine = document.URL;
	if (idFond != 'null')
		if (chaine.indexOf(idFond,0) != -1){
			document.getElementById("cartouche"+idType).style.display = "";
			document.getElementById("puce"+idType).src = "Images/puce_ouverte.gif";
		}
	else 
		if (chaine.indexOf(idType,0) != -1){ 
			document.getElementById("cartouche"+idType).style.display = "";
			document.getElementById("puce"+idType).src = "Images/puce_ouverte.gif";
		}
}
function showCartouche(idType){	
	document.getElementById("cartouche"+idType).style.display = "";
	document.getElementById("puce"+idType).src = "Images/puce_ouverte.gif";
}
function showAll(){
	puces = document.getElementsByName("puce");
	for(i = 0; i < puces.length; i++){
		puces[i].src = "Images/puce_ouverte.gif";
		document.getElementById("cartouche"+puces[i].id.substr(4)).style.display = "";
	}
}
function showNone(){
	puces = document.getElementsByName("puce");
	for(i = 0; i < puces.length; i++){
		puces[i].src = "Images/puce_fermee.gif";
		document.getElementById("cartouche"+puces[i].id.substr(4)).style.display = "none";
	}
}
var graphWindow;
function openGraph(idFond, libelle){
	url = "graph.aspx?idFond=" + idFond + "&libelle=" + libelle ;
	if (graphWindow != null) graphWindow.close();
	graphWindow = window.open(url,"HistoVL","height=520, width=610, scrollbars=no, location=no, resizable=no, menubar=no, status=no, left=250, top=250");
}


