﻿// 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 rubriqueSelected;
function AfficheSousMenus(ext)
{
	
	var iNav = Teste_Navigateur();
	if( iNav == 1)
	{
	
		var obj = document.getElementById('LISTE_SOUSMENUS_0'+ext);
		if( obj != null ) obj.setAttribute('style', 'display:block;' );
		
		var obj = document.getElementById('LISTE_SOUSMENUS_0'+rubriqueSelected);
		if( obj != null ) obj.setAttribute('style', 'display:none;' );
		
		////// fermeture si deja ouvert
		if(ext == rubriqueSelected)
		{
			var obj = document.getElementById('LISTE_SOUSMENUS_0'+ext);
			if( obj != null ) obj.setAttribute('style', 'display:none;' );
			
			rubriqueSelected = '';
		}
		else if(ext != rubriqueSelected)
		{
			rubriqueSelected = ext;
		}		
	}
	if( iNav == 2)//ie
	{
		var obj = document.getElementById('LISTE_SOUSMENUS_0'+ext);
		if( obj != null ) {
			if( obj.style.display != 'block' )
			obj.style.display = 'block' ;
			}
		
		var obj = document.getElementById('LISTE_SOUSMENUS_0'+rubriqueSelected);
		if( obj != null ) obj.style.display = 'none' ;
		
		
		////// fermeture si deja ouvert
		if(ext == rubriqueSelected)
		{
			var obj = document.getElementById('LISTE_SOUSMENUS_0'+ext);
			if( obj != null ) obj.style.display = 'none' ;
			
			rubriqueSelected = '';
		}
		else if(ext != rubriqueSelected)
		{
			rubriqueSelected = ext;
		}
			
	}
}















//// affichage masquage des articles
var article_vivsible;

function lirelasuite(id)
{
	
	
	
	var iNav = Teste_Navigateur();
	if( iNav == 1)
	{
	
		var obj = document.getElementById('EXTRAIT'+id);
		if( obj != null ) obj.setAttribute('style', 'display:none;' );
		
		var obj = document.getElementById('ARTICLE_COMPLET'+id);
		if( obj != null ) obj.setAttribute('style', 'display:block;' );
		
		var obj = document.getElementById('EXTRAIT'+article_vivsible);
		if( obj != null ) obj.setAttribute('style', 'display:block;' );
		
		var obj = document.getElementById('ARTICLE_COMPLET'+article_vivsible);
		if( obj != null ) obj.setAttribute('style', 'display:none;' );
		
		
		//devoile(id);
		
		article_vivsible = id;
		
	}
	if( iNav == 2)//ie
	{
		var obj = document.getElementById('EXTRAIT'+id);
		if( obj != null ) obj.style.display = 'none' ;
		
		var obj = document.getElementById('ARTICLE_COMPLET'+id);
		if( obj != null ) obj.style.display = 'block';
		if( obj != null ) obj.style.filter = 'alpha(opacity=25)';
		
		var obj = document.getElementById('EXTRAIT'+article_vivsible);
		if( obj != null ) obj.style.display = 'block' ;
		
		var obj = document.getElementById('ARTICLE_COMPLET'+article_vivsible);
		if( obj != null ) obj.style.display = 'none';
		
		//devoile(id);
		
		article_vivsible = id;
			
	}
}

function lireFermer(lid)
{
	var iNav = Teste_Navigateur();
	if( iNav == 1)
	{
	
		var obj = document.getElementById('EXTRAIT'+lid);
		if( obj != null ) obj.setAttribute('style', 'display:block;' );
		
		var obj = document.getElementById('ARTICLE_COMPLET'+lid);
		if( obj != null ) obj.setAttribute('style', 'display:none;' );
		
		article_vivsible = '';
		
	}
	if( iNav == 2)//ie
	{
		var obj = document.getElementById('EXTRAIT'+lid);
		if( obj != null ) obj.style.display = 'block' ;
		
		var obj = document.getElementById('ARTICLE_COMPLET'+lid);
		if( obj != null ) obj.style.display = 'none';
		
		article_vivsible = '';
			
	}
}
function Charge_Page( url )
{
	document.location.href=url;
}
function test25(id,nbretotal){	
	for (i=1;i<=nbretotal;i++){
	if (id!='masqueaffiche'+i){
	var obj = document.getElementById('masqueaffiche'+i);
	obj.style.visibility="hidden";
    obj.style.display="none";
	}
	}
    var obj = document.getElementById(id);
	if (obj.style.visibility=="hidden"){
    obj.style.visibility="visible";
    obj.style.display="block";
    }else{
	obj.style.visibility="hidden";
    obj.style.display="none";}  	
}