var page_actuelle;

function restaure(img) 
{

var url_page = document.location;
var decoupe;
var page_actuelle;
var partie_active;

url_page = unescape(url_page);

page_actuelle = url_page.substring(url_page.indexOf("PAGE_CODE=") + 10, url_page.length);

	if (page_actuelle.indexOf("#") != -1)
	{
		page_actuelle = page_actuelle.substring(0,page_actuelle.indexOf("#"));
		//alert(page_actuelle);
	}
	
	if (page_actuelle.indexOf("_") != -1)
	{
	var Compt = 0;
	var Deb = page_actuelle.indexOf('_');
	while (Deb != -1) 
	{
		Compt++;
		Deb = page_actuelle.indexOf('_',++Deb);
	}
		if (Compt > 1)
		{
		
		page_actuelle = page_actuelle.substring(0,page_actuelle.lastIndexOf("_"));
		}
		//alert(page_actuelle);
	}

	if (page_actuelle != img)
	{
	//document.getElementById('visio').style.backgroundColor='#DDDDDD';
	//document[img].src = "../images/"+img+".gif";
	document.getElementById(img).style.backgroundImage="url(../images/" +img + ".gif)";
	}

}

function restaure2(img) 
{
	if (page_actuelle != img)
	{
	//alert(img);
	//alert("out : " + document.getElementById('visio').style.backgroundimage);
	//alert(mon_test);

	//alert("out : " + document.getElementById('visio').style.backgroundimage);
	//document.getElementById('peps').style.className='amoi';
	//document.getElementById('visio').style.backgroundColor='#FF0000';
	//background-image:url(/hepatite/images/tm-visio2.gif);
	}

}

function modif(img) 
{
//document[img].src = "../images/"+img+"2.gif";
document.getElementById(img).style.backgroundImage="url(../images/" +img + "2.gif)";
}

function modif2(img) 
{
//alert("la");
//alert("over : " + document.getElementById('peps').style.backgroundimage);
	//document.getElementById(img).style.backgroundImage="url(../images/" +img + "2.gif)";
	//alert("over : " + document.getElementById('visio').style.backgroundimage);
	//document.getElementById('peps').style.className='amoi';
	//document.getElementById('visio').style.backgroundColor='#FF0000';
	//document.getElementById('visiote').style.classname='amoi';
}

function test_rub() 
{
var url_page = document.location;
var decoupe;
var page_actuelle;
var partie_active;

url_page = unescape(url_page);

page_actuelle = url_page.substring(url_page.indexOf("PAGE_CODE=") + 10, url_page.length);
//alert(page_actuelle);
	if (page_actuelle.indexOf("#") != -1)
	{

		page_actuelle = page_actuelle.substring(0,page_actuelle.indexOf("#"));
		

	}

decoupe = page_actuelle.split("_");
if (decoupe.length > 1)
{
partie_active = decoupe[0] + "_" + decoupe[1];
}

	if (partie_active.indexOf("&") != -1)
	{
		partie_active = partie_active.substring(0,partie_active.indexOf("&"));
	}

	if (partie_active.indexOf("QUIZ")!=-1)
	{
	//document[page_actuelle].src = "../images/"+page_actuelle+"2.gif";
	document.getElementById("PRIVATE_ELEARNING").style.backgroundImage="url(../images/PRIVATE_ELEARNING2.gif)";
	}
	
	else if ((partie_active != "PUBLIC_ACCUEIL") & (partie_active != "PUBLIC_INFOSLEG") & (partie_active != "PUBLIC_INSCRIPTION") & (partie_active != "PUBLIC_CONTACT") & (partie_active != "PUBLIC_RECHERCHE") & (partie_active != "PRIVATE_RECHERCHE"))
	{
	//document[page_actuelle].src = "../images/"+page_actuelle+"2.gif";
		document.getElementById(partie_active).style.backgroundImage="url(../images/" + partie_active + "2.gif)";
	}

}

sfHover = function() {
	if(document.getElementById("nav")){
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

