//================================================================================
//STEP 1: Define on/off buttons
//================================================================================
// Developer Notes
// - Page variable for opening pages to each section should be defined as "intro"
// - For "onMouseOut" code below, need to escape single quote (') with "\"
//================================================================================
//-- BUTTON 1: Grand Waikikian
function primaryNav1(section) {
	// If defined as section 1
	if (section == "one") {
		// If intro page, use hilite button but disable link
		if (page == "intro") {
			document.write('<img src="images/nav_grandwaikikian_on.gif" alt="The Grand Waikikian" name="but_waikikian" width="146" height="30" border="0">');
		// Else if not intro page, use hilite button but enable link
		} else {
			document.write('<a href="grand-waikikian.html"><img src="images/nav_grandwaikikian_on.gif" alt="The Grand Waikikian" name="but_waikikian" width="146" height="30" border="0"></a>');
		}
	// Else if not section 1, use non-hilite button	
	} else {
		document.write('<a href="grand-waikikian.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_waikikian\',\'\',\'images/nav_grandwaikikian_over.gif\',1)"><img src="images/nav_grandwaikikian_off.gif" alt="The Grand Waikikian" name="but_waikikian" width="146" height="30" border="0"></a>'); 
	}
}
//-- BUTTON 2: Lagoon Rejuvenation
function primaryNav2(section) {
	if (section == "two") {
		if (page == "intro") {
			document.write('<img src="images/nav_lagoon_on.gif" alt="Lagoon Rejuvenation" name="but_lagoon" width="146" height="30" border="0">');
		} else {
			document.write('<a href="lagoon-rejuvenation.html"><img src="images/nav_lagoon_on.gif" alt="Lagoon Rejuvenation" name="but_lagoon" width="146" height="30" border="0"></a>');
		}
	} else {
		document.write('<a href="lagoon-rejuvenation.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_lagoon\',\'\',\'images/nav_lagoon_over.gif\',1)"><img src="images/nav_lagoon_off.gif" alt="Lagoon Rejuvenation" name="but_lagoon" width="146" height="30" border="0"></a>');
	}
}
//-- BUTTON 3: Shops & Restaurants
function primaryNav3(section) {
	if (section == "three") {
		if (page == "intro") {
			document.write('<img src="images/nav_shops_on.gif" alt="Shops & Restaurants" name="but_shops" width="139" height="30" border="0">');
		} else {
			document.write('<a href="shops-and-restaurants.html"><img src="images/nav_shops_on.gif" alt="Shops & Restaurants" name="but_shops" width="139" height="30" border="0"></a>');
		}
	} else {
		document.write('<a href="shops-and-restaurants.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_shops\',\'\',\'images/nav_shops_over.gif\',1)"><img src="images/nav_shops_off.gif" alt="Shops & Restaurants" name="but_shops" width="139" height="30" border="0"></a>');
	}
}
//-- BUTTON 4: Press Room
function primaryNav4(section) {
	if (section == "four") {
		if (page == "intro") {
			document.write('<img src="images/nav_press_on.gif" alt="Press Updates" name="but_press" width="88" height="30" border="0">');
		} else {
			document.write('<a href="press-room.html"><img src="images/nav_press_on.gif" alt="Press Updates" name="but_press" width="88" height="30" border="0"></a>');
		}
 	} else {
		document.write('<a href="press-room.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_press\',\'\',\'images/nav_press_over.gif\',1)"><img src="images/nav_press_off.gif" alt="Press Updates" name="but_press" width="88" height="30" border="0"></a>');
	}
}
//-- BUTTON 5: Construction Updates
function primaryNav5(section) {
	if (section == "five") {
		if (page == "intro") {
			document.write('<img src="images/nav_traffic_on.gif" alt="Construction Updates" name="but_traffic" width="148" height="30" border="0">');
		} else {
			document.write('<a href="construction-updates.html"><img src="images/nav_traffic_on.gif" alt="Construction Updates" name="but_traffic" width="148" height="30" border="0"></a>');
		}
	} else {
		document.write('<a href="construction-updates.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_traffic\',\'\',\'images/nav_traffic_over.gif\',1)"><img src="images/nav_traffic_off.gif" alt="Construction Updates" name="but_traffic" width="148" height="30" border="0"></a>');
	}
}

// STEP 2: Generate the navbar
document.write('<div class="primaryNav">');
primaryNav1(section)
document.write('<img src="images/nav_divider.gif" width="1" height="30">');
primaryNav2(section)
document.write('<img src="images/nav_divider.gif" width="1" height="30">');
primaryNav3(section)
document.write('<img src="images/nav_divider.gif" width="1" height="30">');
primaryNav4(section)
document.write('<img src="images/nav_divider.gif" width="1" height="30">');
primaryNav5(section)
document.write('<img src="images/nav_divider.gif" width="1" height="30">');
document.write('<a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'but_home\',\'\',\'images/nav_home_over.gif\',1)"><img src="images/nav_home_off.gif" alt="Home" name="but_home" width="56" height="30" border="0"></a>');
document.write('</div>');