//=======================================================================================
var IE7 = ( -1 != String(navigator.appVersion).indexOf("MSIE 7") )? true : false;
//=======================================================================================
function menuderoul(divid)
{
	this.div = document.getElementById(divid);
	if( this.div )
	{
	   this.lis = this.div.getElementsByTagName("LI");
	   for(var i=0; i<this.lis.length ; i++ )
	   {
		   this.lis[i].onmouseover =  
			   function() 
			   {
				   this.className+=" over";
			   }
		   this.lis[i].onmouseout =
			   function()
			   {
				   this.className=this.className.replace(" over", "");
			   }
	   }
	}
}
//=======================================================================================
// Affiche les bordures des divs --- Utile en DEV.
function fnShowDivIds()
{
	var d = document;
	for (var i=0; i<d.getElementsByTagName("DIV").length; i++)
	{
		var oDiv = d.getElementsByTagName("DIV")[i];
		if("DIV" == oDiv.parentNode.tagName)
		{
			oDiv.style.border = "1px dotted blue";
			
		}
		else
		{
			oDiv.style.border = "1px solid green";
		}
		//-----------------------------------------------
		if(oDiv.id)
		{
			var oSpan = d.createElement("SPAN");
				oSpan.style.backgroundColor = "#CCCCCC";
				oSpan.innerHTML=""+oDiv.id;
			oDiv.appendChild(oSpan);
		}
		//-----------------------------------------------
		oDiv.style.margin = "10px";
	}
}
//============================================================
function fnGetGoodStylesheet()
{
  var sLang = document.body.className.split(" ")[0];
	var sCssHref = ("fr" != sLang)? "/f2styles/filter_"+sLang+".css" : "/f2styles/filter.css";
	var oFrontGlobal = document.getElementById('front-global');

	var oCssLng = document.createElement("LINK");
			oCssLng.setAttribute("rel", "stylesheet");
			oCssLng.setAttribute("title", "Manghebati");
			oCssLng.setAttribute("type", "text/css");
			oCssLng.setAttribute("href", sCssHref);
			document.body.insertBefore(oCssLng, oFrontGlobal);
}
//============================================================
if(DHTML && DOM)
{
	window.attachEvent
		(
		"onload",
			function () 
			{
			    if(MS)
			    {
					menuderoul('navigation-menu');
			    }
			    // fnShowDivIds();
		    	fnGetGoodStylesheet();
			    
			}
		)
}
//============================================================
