// bahamasGuide.js

// Fastforward to the Map section of the Flash movie
var movieName = "index";

function showMap() {
	thisMovie(movieName).TGotoFrame("_level0", 22);
}

// IE and Netscape refer to the movie object differently.
// This function returns the appropriate syntax depending on the browser.
function thisMovie(movieName) {
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName];
  } else {
    return document[movieName];
  }
}

// On-page drop-down navigation
islands     = new Array();
islands[0]  = "abaco";
islands[1]  = "andros";
islands[2]  = "acklinsisland";
islands[3]  = "bimini";
islands[4]  = "berry";
islands[5]  = "cat";
islands[6]  = "crookedisland";
islands[7]  = "exuma";
islands[8]  = "grandbahamaisland";
islands[9]  = "harbourislandeleuthera";
islands[10] = "inagua";
islands[11] = "longisland";
islands[12] = "nassau";
islands[13] = "sansalvador";

function makeActive(island)
{
	island = island.substring(1, island.length);
	for(var i=0; i<islands.length; i++)
	{
		var curr_island = islands[i];
		if(island == curr_island)
		{
			document.getElementById(curr_island).style.display = "";
			document.getElementById(curr_island).disabled = false;
		}
		else
		{
			document.getElementById(curr_island).style.display = "none";
			document.getElementById(curr_island).disabled = true;
		}
	}
}

function goToTarget(target)
{
	location.href=target;
}
