// ************************************************************************
// At WebData - Version 1.3.3.0 - CATEGORIES.JS
// ************************************************************************
// Copyright © At services, 1998-2006 - http://www.at-services.fr
// Dernières modifications : 21-02-2006 13:33
// ************************************************************************
// SCRIPT DE MANAGEMENT DES LISTES IMBRIQUEES SUR 3 NIVEAUX
// ************************************************************************

var tphototheque1 = new Array(["","Panoramiques","Photos aériennes","Reportages","Thèmes"],[],[],[],[]);
tphototheque1 [""] = new Array([""])
tphototheque1 [""][""] = new Array([""])
tphototheque1 ["Panoramiques"] = new Array(["","Forêt","Golf","Tempête"])
tphototheque1 ["Photos aériennes"] = new Array(["","Agriculture","Chalosse-Tursan-Armagnac","Golf","Grands chantiers","Grands lacs","Littoral","Paysage"])
tphototheque1 ["Reportages"] = new Array(["","Tempête"])
tphototheque1 ["Thèmes"] = new Array(["","Agriculture","Chasse","Divers","Economie","Faune","Forêt","Fête","Gastronomie","Grands lacs","Loisirs","Patrimoine","Paysage","Plage","Port","Rivière","Tourisme","Vignoble","Ville, village"])
tphototheque1 ["Panoramiques"][""] = new Array([""])
tphototheque1 ["Panoramiques"] ["Forêt"] = new Array([""])
tphototheque1 ["Panoramiques"] ["Golf"] = new Array([""])
tphototheque1 ["Panoramiques"] ["Tempête"] = new Array([""])
tphototheque1 ["Photos aériennes"][""] = new Array([""])
tphototheque1 ["Photos aériennes"] ["Agriculture"] = new Array(["","Equitation","Maïsiculture"])
tphototheque1 ["Photos aériennes"] ["Chalosse-Tursan-Armagnac"] = new Array(["","Maïsiculture"])
tphototheque1 ["Photos aériennes"] ["Golf"] = new Array([""])
tphototheque1 ["Photos aériennes"] ["Grands chantiers"] = new Array([""])
tphototheque1 ["Photos aériennes"] ["Grands lacs"] = new Array([""])
tphototheque1 ["Photos aériennes"] ["Littoral"] = new Array([""])
tphototheque1 ["Photos aériennes"] ["Paysage"] = new Array(["","Forêt"])
tphototheque1 ["Reportages"][""] = new Array([""])
tphototheque1 ["Reportages"] ["Tempête"] = new Array([""])
tphototheque1 ["Thèmes"][""] = new Array([""])
tphototheque1 ["Thèmes"] ["Agriculture"] = new Array(["","Chalosse","Elevage","Irrigation","Maïsiculture"])
tphototheque1 ["Thèmes"] ["Chasse"] = new Array(["","Chasse-field","Palombe"])
tphototheque1 ["Thèmes"] ["Divers"] = new Array([""])
tphototheque1 ["Thèmes"] ["Economie"] = new Array(["","Nautisme","marchés"])
tphototheque1 ["Thèmes"] ["Faune"] = new Array([""])
tphototheque1 ["Thèmes"] ["Forêt"] = new Array(["","Automne","Divers","Forêt","Incendie","Piste cyclable","Sylviculture","chemin","exploitation forestiere","hiver","sous-bois"])
tphototheque1 ["Thèmes"] ["Fête"] = new Array(["","Course landaise","spectacles"])
tphototheque1 ["Thèmes"] ["Gastronomie"] = new Array([""])
tphototheque1 ["Thèmes"] ["Grands lacs"] = new Array(["","Automne"])
tphototheque1 ["Thèmes"] ["Loisirs"] = new Array(["","Canöe","Cyclo","Equitation","Golf","Nautisme","Pêche","Randonnée"])
tphototheque1 ["Thèmes"] ["Patrimoine"] = new Array(["","Armagnac","Automne","Chalosse"])
tphototheque1 ["Thèmes"] ["Paysage"] = new Array(["","Chalosse","Forêt","Tursan"])
tphototheque1 ["Thèmes"] ["Plage"] = new Array(["","Dunes","Surf","phares"])
tphototheque1 ["Thèmes"] ["Port"] = new Array([""])
tphototheque1 ["Thèmes"] ["Rivière"] = new Array([""])
tphototheque1 ["Thèmes"] ["Tourisme"] = new Array(["","Camping","Canöe","Piste cyclable","Thermalisme"])
tphototheque1 ["Thèmes"] ["Vignoble"] = new Array(["","Armagnac","Tursan"])
tphototheque1 ["Thèmes"] ["Ville, village"] = new Array(["","Armagnac","Chalosse","Fleurs"])


function selectionphototheque(numforms)
{
	if ( numforms != null && document.forms["fphototheque"+numforms] ) { formulaire = document.forms["fphototheque"+numforms]; }
	else if ( document.forms["fphototheque"] ) { formulaire = document.forms["fphototheque"]; }
	else { formulaire = null; }
}

function phototheque1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var numjs13 = numjs1 + 2;
	selectionphototheque(numform);
	
	if ( formulaire != null && (formulaire.elements["champs"+numjs1] != null || formulaire.elements["rf"+numjs1] != null) && formulaire.elements["champs"+numjs12] != null && formulaire.elements["champs"+numjs13] != null )
	{
		if ( formulaire.elements["rf"+numjs1] != null )
		{		
			var newOpt;
			var sel2 = formulaire.elements["rf"+numjs1].value + '';
			if ( formulaire.elements["rf"+numjs12] )
			{
				for (var i = 0 ; i < tphototheque1[0].length ; i++ )
				{
					newOpt = new Option(tphototheque1[0][i]);
					formulaire.elements["champs"+numjs1].options[i] = newOpt;
					formulaire.elements["champs"+numjs1].options[i].value = tphototheque1[0][i];
					if (sel2 == tphototheque1[0][i]) formulaire.elements["champs"+numjs1].selectedIndex = i;
				}
				var sel2 = formulaire.elements["champs"+numjs1].options[ formulaire.elements["champs"+numjs1].selectedIndex ].value + "";
				var sel3 = formulaire.elements["rf"+numjs12].value + '';
			}
			for (var i = 0 ; i < tphototheque1[sel2][0].length ; i++ )
			{
				newOpt = new Option(tphototheque1[sel2][0][i]);
				formulaire.elements["champs"+numjs12].options[i] = newOpt;
				formulaire.elements["champs"+numjs12].options[i].value = tphototheque1[sel2][0][i];
				if (sel3 == tphototheque1[sel2][0][i]) formulaire.elements["champs"+numjs12].selectedIndex = i;
			}
			if ( formulaire.elements["rf"+numjs13] ) var sel4 = formulaire.elements["rf"+numjs13].value + '';
			var sel3 = formulaire.elements["champs"+numjs12].options[ formulaire.elements["champs"+numjs12].selectedIndex ].value + "";
			for (var i = 0 ; i < tphototheque1[sel2][sel3][0].length ; i++)
			{
				opt = ( tphototheque1[sel2][sel3][0][i] == "" ? "" : tphototheque1[sel2][sel3][0][i] );
				newOpt = new Option(opt);
				formulaire.elements["champs"+numjs13].options[i] = newOpt;
				formulaire.elements["champs"+numjs13].options[i].value = opt;
				if (sel4 == tphototheque1[sel2][sel3][0][i]) formulaire.elements["champs"+numjs13].selectedIndex = i;
			}
		}
		else
		{
			var newOpt;
			var sel2 = tphototheque1[0][0];
			var sel3 = tphototheque1[sel2][0][0];
			var sel4 = tphototheque1[sel2][sel3][0][0];
			for (var i = 0 ; i < tphototheque1[0].length ; i++ )
			{
				newOpt = new Option(tphototheque1[0][i]);
				formulaire.elements["champs"+numjs1].options[i] = newOpt;
				formulaire.elements["champs"+numjs1].options[i].value = tphototheque1[0][i];
				if (sel2 == tphototheque1[0][i]) formulaire.elements["champs"+numjs1].selectedIndex = i;
			}
			var sel2 = formulaire.elements["champs"+numjs1].options[ formulaire.elements["champs"+numjs1].selectedIndex ].value + "";
			for (var i = 0 ; i < tphototheque1[sel2][0].length ; i++ )
			{
				newOpt = new Option(tphototheque1[sel2][0][i]);
				formulaire.elements["champs"+numjs12].options[i] = newOpt;
				formulaire.elements["champs"+numjs12].options[i].value = tphototheque1[sel2][0][i];
				if (sel3 == tphototheque1[sel2][0][i]) formulaire.elements["champs"+numjs12].selectedIndex = i;
			}
			var sel3 = formulaire.elements["champs"+numjs12].options[ formulaire.elements["champs"+numjs12].selectedIndex ].value + "";
			for (var i = 0 ; i < tphototheque1[sel2][sel3][0].length ; i++)
			{
				opt = ( tphototheque1[sel2][sel3][0][i] == "" ? "" : tphototheque1[sel2][sel3][0][i] );
				newOpt = new Option(opt);
				formulaire.elements["champs"+numjs13].options[i] = newOpt;
				formulaire.elements["champs"+numjs13].options[i].value = opt;
				if (sel4 == tphototheque1[sel2][sel3][0][i]) formulaire.elements["champs"+numjs13].selectedIndex = i;
			}
		}
	}
}

function chgphototheque1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var numjs13 = numjs1 + 2;
	selectionphototheque(numform);
	
	var newOpt;
	
	var sel = formulaire.elements["champs"+numjs1].options[ formulaire.elements["champs"+numjs1].selectedIndex ].value ;
	var dim = formulaire.elements["champs"+numjs12].length;
	for (var i = 0 ; i < dim ; i ++)
	{
		formulaire.elements["champs"+numjs12].options[0] = null;
	}

	for (var i = 0 ; i < tphototheque1[sel][0].length ; i++)
	{
		newOpt = new Option(tphototheque1[sel][0][i]);
		formulaire.elements["champs"+numjs12].options[i] = newOpt;
		formulaire.elements["champs"+numjs12].options[i].value = tphototheque1[sel][0][i]
	}
	formulaire.elements["champs"+numjs12].selectedIndex = 0;
	chg2phototheque1(numjs1)
	formulaire.elements["champs"+numjs13].selectedIndex = 0;
}

function chg2phototheque1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var numjs13 = numjs1 + 2;
	selectionphototheque(numform);
	
	var newOpt;
	
	var sel = formulaire.elements["champs"+numjs12].options[ formulaire.elements["champs"+numjs12].selectedIndex ].value ;
	var sel2 = formulaire.elements["champs"+numjs1].options[ formulaire.elements["champs"+numjs1].selectedIndex ].value ;	
	var dim = formulaire.elements["champs"+numjs13].length;
	
	for (var i = 0 ; i < dim ; i ++)
	{
		formulaire.elements["champs"+numjs13].options[0] = null;
	}
	
	for (var i = 0 ; i < tphototheque1[sel2][sel][0].length ; i++)
	{
		var val = tphototheque1[sel2][sel][0][i];
		newOpt = new Option(( val == "" ? "" : val ));
		formulaire.elements["champs"+numjs13].options[i] = newOpt;
		formulaire.elements["champs"+numjs13].options[i].value = ( val == "" ? "" : val )
	}
}

function chgrf2phototheque1(numjs1,numform)
{
	var numjs12 = numjs1 + 1;
	var numjs13 = numjs1 + 2;
	selectionphototheque(numform);
	
	var newOpt;
	
	var sel = formulaire.elements["champs"+numjs12].options[ formulaire.elements["champs"+numjs12].selectedIndex ].value ;
	var sel2 = formulaire.elements["champs"+numjs1].value ;	
	var dim = formulaire.elements["champs"+numjs13].length;
	
	for (var i = 0 ; i < dim ; i ++)
	{
		formulaire.elements["champs"+numjs13].options[0] = null;
	}
	
	for (var i = 0 ; i < tphototheque1[sel2][sel][0].length ; i++)
	{
		var val = tphototheque1[sel2][sel][0][i];
		newOpt = new Option(( val == "" ? "" : val ));
		formulaire.elements["champs"+numjs13].options[i] = newOpt;
		formulaire.elements["champs"+numjs13].options[i].value = ( val == "" ? "" : val )
	}
}

