if(!document.getElementById)
{ 
if(document.all)
	{ 
	document.getElementById=function()
			{ 
			if(typeof document.all[arguments[0]]!="undefined")
				{ 
				return document.all[arguments[0]]
				}
			  else {
				return null
				}
    			}
  	}
	else if(document.layers)
		{	
		document.getElementById=function()
			{
			if(typeof document[arguments[0]]!="undefined")
				{ 
				return document[arguments[0]]
				}
			else {
				return null
				}
    			}
  		}
	}



function SetCookie(cookieName, cookieValue, path, expires, domain, secure) 
{
	document.cookie =
		escape(cookieName) + '=' + escape(cookieValue)
		+ (expires ? '; expires=' + expires.toGMTString() : '')
		+ (path ? '; path=' + path : '; path=' + '/')
		+ (domain ? '; domain=' + domain : '')
		+ (secure ? '; secure' : '');	

}

function getCookieVal(offset) {
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1)
      		endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg=name+"=";
	var alen=arg.length;
	var clen=document.cookie.length;
	var i=0;
	while (i<clen) {
		var j=i+alen;
		if (document.cookie.substring(i, j)==arg)
                        return getCookieVal (j);
                i=document.cookie.indexOf(" ",i)+1;
                        if (i==0) break;}
	return null;
}




function EnroulerDerouler(nomRub)
{
var rub;
var bAEnrouler;

//alert('enrouler derouler ' + 'RT : ' + nomRub);
//alert(GetCookie("style"));

rub = eval("document.RT"+nomRub);
if (!rub)
return;

               // c'est une rubrique titre
              if (rub.src.indexOf("Deroule") > 0)
              {
              bAEnrouler = true;
              rub.src = 'styles/images/menuEnroule.gif';
              }
              else
              {
              bAEnrouler = false;
              rub.src = 'styles/images/menuDeroule.gif';
              }


var sousrub;
sousrub = document.getElementById("div" + nomRub);

if (!sousrub)
return;

if (sousrub.style.display.indexOf("none") >= 0)
	{
	sousrub.style.display = "block";
	}
else
	{
	sousrub.style.display = "none";
	}
var ancienEtat = GetCookie("Menu");
var nouvEtat = "";
var n = 0;
if (ancienEtat) {
     n = ancienEtat.indexOf("."+nomRub+"-",0);
} else {
    ancienEtat = "";
}
if (n>=0) {
      nouvEtat = ancienEtat.substr(0, n+5) + bAEnrouler*1 + ancienEtat.substring(n+6, ancienEtat.length);
} else {
     nouvEtat = ancienEtat + "." + nomRub + "-" + bAEnrouler*1;
}
if ((document.URL.indexOf("127.0.0.1",0) > 0) || (document.URL.indexOf("localhost",0)) > 0) {
	SetCookie("Menu", nouvEtat, "/", null);
}
else {
	SetCookie("Menu", nouvEtat);
}

}

if (!GetCookie("Menu")) {
if ((document.URL.indexOf("127.0.0.1",0) > 0) || (document.URL.indexof("localhost",0) > 0)) {
	SetCookie("Menu", ".101-1.102-1.103-1.106-1.107-1.109-1", "/", null);
}
else {
  SetCookie("Menu", ".101-1.102-1.103-1.106-1.107-1.109-1");
}
}



