﻿// JavaScript Document
// JavaScript Document


/// TESTE DU NAVIGATEUR POUR LES FONCTION DE ROLLOVER
function Teste_Navigateur()
{

		Nom_Browser = navigator.appName;
		Version_Browser = navigator.appVersion;
		if ( Nom_Browser == "Netscape" )
		{
			return 1;
		}
		if ( Nom_Browser == "Microsoft Internet Explorer" )
		{
			return 2;
		}
		return 2;
}

var extMenuSurvolle;
var rubriqueEnCours;
function changeClass(id, action)
{
	var iNav = Teste_Navigateur();
	
	if(action == 'on' && rubriqueEnCours != id)
	{
		if( iNav == 1)
		{
			//alert('MENU_'+ext);
			var obj = document.getElementById(id);
			if( obj != null ) obj.setAttribute('class', id+"_on" );
		}
		if( iNav == 2)//ie
		{
			var obj = document.getElementById(id);
			if( obj != null ) obj.className =  id+"_on";
				
		}
	}
	if(action == 'off' && rubriqueEnCours != id)
	{
		if( iNav == 1)
		{
			var obj = document.getElementById(id);
			if( obj != null ) obj.setAttribute('class',  id+"_off" );
		}
		if( iNav == 2)//ie
		{
			var obj = document.getElementById(id);
			if( obj != null ) obj.className =  id+"_off" ;
				
		}
	}
}

function iniTrubriqueSelected(NmRubrique)
{
		changeClass('barre_menu_m'+NmRubrique, 'on');
		rubriqueEnCours = 'barre_menu_m'+NmRubrique;
}
/////
function getURL(URL)
{
	window.location = URL;
}



