// Thanks for the help and free js code. :)
// Modified by phil.

// ARRAYS OF AREAS AND CORRESSPONDING THEIR CHECKBOX ID
areanames = new Array("burton","ashby","coalville","rugeley","lichfield","swadlincote");

// FUNCTION TO ACTIVATE ROLLOVERS IN MAP WHEN MOUSE IS OVER TEXT
function spanhover(thearea) {
	
	var movieclip = '/map/' + thearea;
	document.flashMap.GotoFrame(movieclip,1);
	window.document.getElementById(thearea).style.color = "#FFCC33";
}

function spanhoveroff(thearea) {
	
	var movieclip = '/map/' + thearea;
	document.flashMap.GotoFrame(movieclip,0);
	window.document.getElementById(thearea).style.color = "#003366";
}

function maphover(thearea) {
	for (i = 0; i <= 2; i ++) {	
		if (thearea == areanames[i]) {
			window.document.getElementById(thearea).style.color = "#FFCC33";
		} else {
			//alert(thearea + " != " +areanames[i]);
			window.document.getElementById(areanames[i]).style.color = "#FFCC33";
		} 
	}
}


function maphoveroff(thearea) {	
	window.document.getElementById(thearea).style.color = "#003366";
}


function gototarea(thearea) {	
	for (i = 0; i <= 2; i ++) {	
		if (thearea == areanames[i]) {
			url = "/" + thearea + "/search.html"; //+ eval(i + 1)
			window.location.href = url;
		} 
	}
}