// JavaScript Document
<!--
		
function openWin(pageURL,pageNAME,pagePARAMS) {
	pageNAME	= (pageNAME) ? pageNAME : 'page' ;
	pagePARAMS	= (pagePARAMS) ? pagePARAMS : 'menubar=0,resizable=0,scrollbars=1,width=350,height=450' ;
	var newwin = window.open(pageURL,pageNAME,pagePARAMS);
}

function externalLinks() { 
	 if (!document.getElementsByTagName) return; 
	 var anchors = document.getElementsByTagName("a"); 
	 for (var i=0; i<anchors.length; i++) { 
	   var anchor = anchors[i]; 
	   if (anchor.getAttribute("href") && 
		   anchor.getAttribute("rel") == "external") 
		 anchor.target = "ref"; 
	 } 
} 


//accès thématique
var numThemes = 7;

var themes = new Array(numThemes);
themes[0]='Annuaire';
themes[1]='Conseil de développement';
themes[2]='Déchets';
themes[3]='Forêts';
themes[4]='Habitat';
themes[5]='Solaire';
themes[6]='Transports';
themes[7]='Agriculture';

var pages = new Array(numThemes);

pages[0]=new Array("Annuaire des entreprises;/fr/entreprendre/annuaire-des-entreprises/index.html");
pages[1]=new Array("Citoyenneté;/fr/citoyennete/index.html");
pages[2]=new Array("Déchets – Asssainissement;/fr/notre-agglo/nos-missions-et-services/dechets/index.html");
pages[3]=new Array("Forêts;/fr/notre-agglo/nos-missions-et-services/forets/index.html");
pages[4]=new Array("Habitat – Equipements publics;/fr/notre-agglo/nos-missions-et-services/habitat/index.html");
pages[5]=new Array("Energies;/fr/developpement-durable/les-actions/energies/index.html","Les aides;http://www.agglo-ghb.net/fr/developpement-durable/les-aides/index.html");
pages[6]=new Array("Transports;/fr/notre-agglo/nos-missions-et-services/transports/index.html");
pages[7]=new Array("Agriculture – forêt;/fr/notre-agglo/nos-missions-et-services/agriculture-foret/index.html");

function initQuickLinks() { 
	//on récupère les listes de sélection
	themesSel = document.getElementById("themes");
	//et on les alimente
	for(i=0;i<numThemes;i++){
		themesSel.options[themesSel.options.length] = new Option(themes[i],'');
	}
	updateQuickLinks(0);
}

function updateQuickLinks(indexTheme){
	//nettoyage
	document.getElementById("pages").length = 0;
	pagesSel = document.getElementById("pages");
	
	//alimentation
	for(j=0;j<pages[indexTheme].length;j++){
		nameAndValue = pages[indexTheme][j].split(';');
		pagesSel.options[pagesSel.options.length] = new Option(nameAndValue[0],nameAndValue[1]);
	}
}

//-->