var CurSubMenu = 1;

function SubMenu(Obj, Etat)
{
	Num = Obj.id.substr(8,1);
	
	for (i = 1; i < 6; i++)
	{
		if (CurSubMenu != i)
		{
			document.getElementById("SubMenu_" + i).style.backgroundPosition = "0 0";
		}
		
	}

	if (CurSubMenu != Num)
	{
		if (Etat == 1)
		{
			Obj.style.backgroundPosition = "0 -24";		
		} else {
			Obj.style.backgroundPosition = "0 0";		
		}	
	}


}		

function ShowSubMenu(Obj)
{
	Num = Obj.id.substr(8,1);
	
	for (i = 1; i < 6; i++)
	{
		if (i == Num)
		{
			CurSubMenu = i;
			document.getElementById("SubMenu_" + i).style.backgroundPosition = "0 -24";
			document.getElementById("SubPage_" + i).style.display = "";
		} else {
			document.getElementById("SubMenu_" + i).style.backgroundPosition = "0 0";
			document.getElementById("SubPage_" + i).style.display = "none";
		}

	}
	
	if (Num == 4)
	{
	    document.getElementById("cmdImprimer").disabled = true;	    
	} else {
	    document.getElementById("cmdImprimer").disabled = false;	    
	}

}

function Aller_A(URL)
{
	window.location.replace(URL);
}

function Aller_A_Blank(URL)
{

	w = window.open(URL);
}


function Image_Popup(Image_URL, Titre, Couleur_Fond)
 {

	window.open('../popup_image.aspx?image_url=' + Image_URL + '&Titre=' + Titre,'chargement','resizable=auto, location=no, width=100, height=100, menubar=no, status=no, scrollbars=no, menubar=no');
}

function popup(page, largeur, hauteur) {
  window.open(page, "", "scrollbars=yes,menubar=no,toolbar=no,resizable=no,width=" + largeur + ",height=" + hauteur);
}
	
	
	