// ARRAYS OF AREAS AND CORRESSPONDING THEIR CHECKBOX ID
areanames = new Array("alsace","aquitaine","auvergne","brittany","burgundy","champagne","franche","languedoc","limousin","payloire","loire","nord","normandy","picardy","paris","charentes","provence","pyrenees","rhone");


// FUNCTION TO ACTIVATE ROLLOVERS IN MAP WHEN MOUSE IS OVER TEXT
function spanhover(thearea) {
	
	var movieclip = '/map/' + thearea;
	var boxclip = '/map/' + 'box_' + thearea;
	document.flashMap.TGotoFrame(movieclip,1);
	document.flashMap.TGotoFrame(boxclip,1);
	window.document.getElementById(thearea).style.color = "#990000";
}

function spanhoveroff(thearea) {
	
	var movieclip = '/map/' + thearea;
	var boxclip = '/map/' + 'box_' + thearea;
	document.flashMap.TGotoFrame(movieclip,0);
	document.flashMap.TGotoFrame(boxclip,0);
	window.document.getElementById(thearea).style.color = "#003366";
	document.getElementById("selectmap").selectedIndex = -1;
}

function maphover(thearea) {
	for (i = 0; i <= 18; i ++) {	
		if (thearea == areanames[i]) {
			window.document.getElementById(thearea).style.color = "#990000";
		} else {
			//alert(thearea + " != " +areanames[i]);
			window.document.getElementById(areanames[i]).style.color = "#003366";
		} 
	}
}


function maphoveroff(thearea) {	
	window.document.getElementById(thearea).style.color = "#003366";
	document.getElementById("selectmap").selectedIndex = -1;
}


function gototarea(thearea) {	
	for (i = 0; i <= 18; i ++) {	
		if (thearea == areanames[i]) {
			url = "dept_search_pages/search_" + thearea + ".php"; //+ eval(i + 1)   
			window.location.href = url;
		} 
	}
}

function changeList(){
	var objlist = document.getElementById("selectmap");
	for (i = 0; i < objlist.options.length; i++) {	
		if (objlist.options[i].selected==true) {
			var movieclip = '/map/' + objlist.options[i].value;
			document.flashMap.TGotoFrame(movieclip,1);
		} else {
			var movieclip = '/map/' + objlist.options[i].value;
			document.flashMap.TGotoFrame(movieclip,0);
		} 
	}
}

function selectValues(intIndex){
	var objlist = document.getElementById("selectmap");
	objlist.options[intIndex].selected = true;
}

function unSelectValues(intIndex){
	var objlist = document.getElementById("selectmap");
	objlist.options[intIndex].selected = false;
}
