// ************************************************************************
// At WebData - Version 1.3.3.0 - CATEGORIES.JS
// ************************************************************************
// Conception & Programmation : At ss2i - http://www.at-ssii.com
// Copyright © 1998-2005 : At services - http://www.at-services.ch
// ************************************************************************
// Dernières modifications : 19-09-2004 13:33
// ************************************************************************
// SCRIPT DE MANAGEMENT DES LISTES IMBRIQUEES SUR 2 NIVEAUX
// ************************************************************************

var tarticles1 = new Array(["","Actualité régionale","Actualité web","Contes","Coups de coeur....","Ecologie","Notes de lecture","Patrimoine","Utopie"],[],[],[],[],[],[],[],[]);
tarticles1 [""] = new Array([""])
tarticles1 [""][""] = new Array([""])
tarticles1 ["Actualité régionale"] = new Array(["","Chiffres/Statistiques","Entreprises","Législation","Sport","Tourisme/Loisirs"])
tarticles1 ["Actualité web"] = new Array(["","Chiffres/Statistiques","Infos pratiques","Logiciels/Outils","Sites"])
tarticles1 ["Contes"] = new Array(["",""])
tarticles1 ["Coups de coeur...."] = new Array(["","Cinéma","Livres","Musique"])
tarticles1 ["Ecologie"] = new Array(["",""])
tarticles1 ["Notes de lecture"] = new Array(["","Essais","Romans"])
tarticles1 ["Patrimoine"] = new Array(["",""])
tarticles1 ["Utopie"] = new Array(["",""])
tarticles1 ["Actualité régionale"][""] = new Array([""])
tarticles1 ["Actualité web"][""] = new Array([""])
tarticles1 ["Contes"][""] = new Array([""])
tarticles1 ["Coups de coeur...."][""] = new Array([""])
tarticles1 ["Ecologie"][""] = new Array([""])
tarticles1 ["Notes de lecture"][""] = new Array([""])
tarticles1 ["Patrimoine"][""] = new Array([""])
tarticles1 ["Utopie"][""] = new Array([""])


function articles1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var formarticles1 = document.forms["farticles"];
	if ( numform != null ) { formarticles1 = document.forms["farticles"+numform]; }
	if ( (formarticles1 != null) && ( formarticles1.elements["champs"+numjs1] != null ) && ( formarticles1.elements["champs"+numjs12] != null ) )
	{
		if ( formarticles1.elements["rf"+numjs1] != null )
		{
			var newOpt;
			var sel2 = formarticles1.elements["rf"+numjs1].value + '';
			var sel3 = formarticles1.elements["rf"+numjs12].value + '';
			for ( var i = 0 ; i < tarticles1[0].length ; i++ )
			{
				newOpt = new Option(tarticles1[0][i]);
				formarticles1.elements["champs"+numjs1].options[i] = newOpt;
				formarticles1.elements["champs"+numjs1].options[i].value = tarticles1[0][i];
				if (sel2 == tarticles1[0][i]) formarticles1.elements["champs"+numjs1].selectedIndex = i;
			}
			var sel2 = formarticles1.elements["champs"+numjs1].options[ formarticles1.elements["champs"+numjs1].selectedIndex ].value + "";
			for ( var i = 0 ; i < tarticles1[sel2][0].length ; i++ )
			{
				newOpt = new Option(tarticles1[sel2][0][i]);
				formarticles1.elements["champs"+numjs12].options[i] = newOpt;
				formarticles1.elements["champs"+numjs12].options[i].value = tarticles1[sel2][0][i];
				if (sel3 == tarticles1[sel2][0][i]) formarticles1.elements["champs"+numjs12].selectedIndex = i;
			}
		
		}
		else if ( formarticles1.elements["champs"+numjs1].options != null )
		{
			var newOpt;
			var sel2 = tarticles1[0][0];
			var sel3 = tarticles1[sel2][0][0];
	
			for ( var i = 0 ; i < tarticles1[0].length ; i++ )
			{
				newOpt = new Option(tarticles1[0][i]);
				formarticles1.elements["champs"+numjs1].options[i] = newOpt;
				formarticles1.elements["champs"+numjs1].options[i].value = tarticles1[0][i];
				if (sel2 == tarticles1[0][i]) formarticles1.elements["champs"+numjs1].selectedIndex = i;
			}
			var sel2 = formarticles1.elements["champs"+numjs1].options[ formarticles1.elements["champs"+numjs1].selectedIndex ].value + "";
			for (var i = 0 ; i < tarticles1[sel2][0].length ; i++ )
			{
				newOpt = new Option(tarticles1[sel2][0][i]);
				formarticles1.elements["champs"+numjs12].options[i] = newOpt;
				formarticles1.elements["champs"+numjs12].options[i].value = tarticles1[sel2][0][i];
				if (sel3 == tarticles1[sel2][0][i]) formarticles1.elements["champs"+numjs12].selectedIndex = i;
			}
		
		}
	}
}

function chgarticles1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var formarticles1 = document.forms["farticles"];
	if ( numform != null ) { formarticles1 = document.forms["farticles"+numform]; }
	var newOpt;
	
	var sel = formarticles1.elements["champs"+numjs1].options[ formarticles1.elements["champs"+numjs1].selectedIndex ].value ;
	var dim = formarticles1.elements["champs"+numjs12].length;
	for (var i = 0 ; i < dim ; i ++)
	{
		formarticles1.elements["champs"+numjs12].options[0] = null;
	}

	for (var i = 0 ; i < tarticles1[sel][0].length ; i++)
	{
		newOpt = new Option(tarticles1[sel][0][i]);
		formarticles1.elements["champs"+numjs12].options[i] = newOpt;
		formarticles1.elements["champs"+numjs12].options[i].value = tarticles1[sel][0][i]
	}
	formarticles1.elements["champs"+numjs12].selectedIndex = 0;
	
}
