var navArray = new Array(8);
var Features=0;
var Trips=1;
var WhatsNew=2;
var Gear=3;
var Columns=4;
var Sports=5;
var Subscribe=6;
var AboutUs=7;
var Home=8;
var NGACurrentLocation = 0;
navArray[0] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavFeatures%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/0605/features/whales.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWhaling%20War%20Zone%3C/a%3E%3Ca%20href%3D%22/adventure/photography/contest/snowboarding-tahoe.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWinners%3A%20Action%20Photo%20Contest%3C/a%3E%3Ca%20href%3D%22/adventure/festivals.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ESummer%20Festivals%3C/a%3E%3Ca%20href%3D%22/adventure/0605/features/sebastian_junger.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ESebastian%20Junger%27s%20Lessons%20From%20the%20Road%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[1] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavTrips%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/travel_directory.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ETravel%20Directory%3C/a%3E%3Ca%20href%3D%22/adventure/travel/greek-islands.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWhere%20Next%3A%20Greek%20Islands%3C/a%3E%3Ca%20href%3D%22/adventure/travel/south_africa.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWorld%20Class%20Adventure%20Travel%3C/a%3E%3Ca%20href%3D%22/adventure/travel/pennsylvania.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWild%20Roads%3A%20Pennsylvania%3C/a%3E%3Ca%20href%3D%22/adventure/travel/california.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ESecret%20California%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[2] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavWhatsNew%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/vacation-packages/europe-asia-southwest.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ENew%20ADVENTURE%20Deals%21%3C/a%3E%3Ca%20href%3D%22/adventure/weekend-getaways-summer.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ENext%20Weekend%3A%20Getaways%20Near%20You%3C/a%3E%3Ca%20href%3D%22/adventure/0605/whats_new/lewis_gordon_pugh.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EWhat%20It%20Takes%3A%20To%20Swim%20With%20Icebergs%3C/a%3E%3Ca%20href%3D%22/adventure/audio.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EAudio%20Interviews%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[3] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavGear%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/reviews/camping_gear.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EUser%20Reviews%3C/a%3E%3Ca%20href%3D%22/adventure/0605/gear/bikes-mountain.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EThe%20Best%20New%20Bikes%3C/a%3E%3Ca%20href%3D%22/adventure/0605/gear/bearproofing.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EInstant%20Expert%3A%20Bearproofing%3C/a%3E%3Ca%20href%3D%22/adventure/0603/gear/running_shoes.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ERunning%20Shoes%20+%20Gear%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[4] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavColumns%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/0605/columns/yosemite_hike.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EYour%20Turn%3A%20Backcountry%20Yosemite%3C/a%3E%3Ca%20href%3D%22/adventure/0605/columns/robert_young_pelton.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ERobert%20Young%20Pelton%3A%20The%20Kidnap%20Course%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[5] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavSports%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/photography/rafting-salmon-river/photo.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EPhoto%20Gallery%3A%20Rafting%20the%20Middle%20Fork%3C/a%3E%3Ca%20href%3D%22/adventure/0605/sports/bug_repellents.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EBattle%20the%20Buzz%3A%20Bug%20Repellants%3C/a%3E%3Ca%20href%3D%22/adventure/0605/sports/hiking_food.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EThe%20Carb%20Craze%3A%20Hiking%20Foods%3C/a%3E%3Ca%20href%3D%22/adventure/0603/sports/travel_health_hypothermia.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EAsk%20Dr.%20Extreme%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[6] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavSubscribe%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22https%3A//www.subscribengadventure.com/oldsite/directorder.aspx%3FEFFORTKEY%3DNAAFXQ5%26MSCCMPLX%3D%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ESubscribe%20Now%21%3C/a%3E%3Ca%20href%3D%22https%3A//secure.customersvc.com/wes/servlet/Show%3FWESPAGE%3Dam/home1.jsp%26MSRSMAG%3DNA%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3ERenew%20or%20Adjust%20Your%20Subscription%3C/a%3E%3Ca%20href%3D%22https%3A//secure.customersvc.com/wes/servlet/Show%3FWESPAGE%3Dam/Services/faq/nafaq.jsp%26MSRSMAG%3DNA%23Section_B2%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EOrder%20Back%20Issues%3C/a%3E%3Ca%20href%3D%22https%3A//secure.customersvc.com/wes/servlet/Show%3FWESPAGE%3Dam/Services/faq/nafaq.jsp%26MSRSMAG%3DNA%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EFrequently%20Asked%20Questions%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[7] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20id%3D%22yellowNavAboutUs%22%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Ca%20href%3D%22/adventure/about.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EContact%20Us%3C/a%3E%3Ca%20href%3D%22/adventure/writers-photographers.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3E%3Ci%3EAdventure%3C/i%3E%20Team%3C/a%3E%3Ca%20href%3D%22/adventure/about_advertise.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EAdvertise%20With%20Us%3C/a%3E%3Ca%20href%3D%22/adventure/about_press.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EPress%20Inquiries%3C/a%3E%3Ca%20href%3D%22/adventure/about_internships.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EInternships%3C/a%3E%3Ca%20href%3D%22/adventure/about_writers.html%22%20class%3D%22yellowNav%22%20onClick%3D%22%22%3EContributor%20Guidelines%3C/a%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
navArray[8] = '%3Ctable%20id%3D%22yellowNav%22%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%220%22%3E%3Ctbody%3E%3Ctr%3E%3Ctd%20valign%3D%22middle%22%20height%3D%2227%22%3E%3Cimg%20src%3D%22/adventure/images/shim.gif%22%20height%3D%2227%22%20width%3D%221%22%3E%3C/td%3E%3C/tr%3E%3C/tbody%3E%3C/table%3E';
if(typeof(NGANavType) != 'undefined')
{
  var flipped = false; if(NGANavType == 8) { NGANavType=0; flipped = true; }
  document.write(unescape(navArray[NGANavType]));
  if(flipped)NGANavType=8
    ngaCurrentLocation = NGANavType;
}

window.onload = NavOnLoadEvent;

function NavOnLoadEvent()
{
	CheckBrowser();
	var trimmedLoc = window.location.href;
	var tableMain = document.getElementById('yellowNav');
	var kids = tableMain.getElementsByTagName('A');
	var itemCount = kids.length;

	if((typeof(NGANavType) != 'undefined' && (typeof(subNavID) == 'undefined' || NGACurrentLocation == subNavID) ))
	{
		var cPathSplit = window.location.href.split('/');
		var loc = cPathSplit[cPathSplit.length-1];

		//- Special Case for Reviews pages -//
		if( trimmedLoc.indexOf( '/reviews/' ) > -1 )
		{
			loc = cPathSplit[cPathSplit.length-2];

			for(var i=0; i<itemCount; i++)
			{
				var cPathSplit2 = kids[i].href.split('/');
				var locNav = cPathSplit2[cPathSplit2.length-2];

				if(locNav == loc  && kids[i].href.charAt(kids[i].href.length - 1) != '#')
				{
					kids[i].className = 'yellowNavOn';
					break;
				}
			}

			return;
		}

		//- Gallery and Gear pages -//
		if( loc.indexOf( '_gallery' ) > -1 || loc.indexOf( '_gear' ) > -1 )
		{
			var newLoc = "";
			loc = loc.slice( 0, loc.indexOf( '.htm' ) );
			for(var i=0; i<loc.length; i++)
			{
				if(isNaN(loc.charAt(i)))
					newLoc += loc.charAt(i);
			}

			for(var ii=0; ii<itemCount; ii++)
			{
				var cPathSplit2 = kids[ii].href.split('/');
				var temp = cPathSplit2[cPathSplit2.length-1];
				temp = temp.slice( 0, temp.indexOf( '.htm' ) );

				var locNav = "";
				for(var i=0; i<temp.length; i++)
				{
					if(isNaN(temp.charAt(i)))
						locNav += temp.charAt(i);
				}

				if(locNav == newLoc  && kids[ii].href.charAt(kids[ii].href.length - 1) != '#')
				{
					kids[ii].className = 'yellowNavOn';
					break;
				}
			}
		}
		//- Best of Africa pages -//
		else if( loc.indexOf( 'africa_' ) > -1 && window.location.href.indexOf( '/trips/africa_' ) > -1 )
		{
			var newLoc = "";
			newLoc = loc.slice( 0, loc.indexOf( 'africa_' ) + 7 );

			for(var ii=0; ii<itemCount; ii++)
			{
				var cPathSplit2 = kids[ii].href.split('/');
				var temp = cPathSplit2[cPathSplit2.length-1];
				var locNav = temp.slice( 0, temp.indexOf( 'africa_' ) + 7 );

				if(locNav == newLoc  && kids[ii].href.charAt(kids[ii].href.length - 1) != '#')
				{
					kids[ii].className = 'yellowNavOn';
					break;
				}
			}
		}
		else
		{
			for(var i=0; i<itemCount; i++)
			{
				var cPathSplit2 = kids[i].href.split('/');
				var locNav = cPathSplit2[cPathSplit2.length-1];

				if(locNav == loc  && kids[i].href.charAt(kids[i].href.length - 1) != '#')
				{
					kids[i].className = 'yellowNavOn';
					break;
				}
			}
		}
	}
	else
	{
		if((typeof(subNavID) == 'undefined' || subNavID == null) || NGACurrentLocation == subNavID)
		{
			for(var i=0; i<itemCount; i++)
			{
				if(kids[i].href == trimmedLoc)
				{
					kids[i].className = 'yellowNavOn';
					break;
				}
			}
		}
	}
}
/*<A HREF='/adventure/0605/features/whales.html'>Whaling War Zone</A>
<A HREF='/adventure/photography/contest/snowboarding-tahoe.html'>Winners: Action Photo Contest</A>
<A HREF='/adventure/festivals.html'>Summer Festivals</A>
<A HREF='/adventure/0605/features/sebastian_junger.html'>Sebastian Junger's Lessons From the Road</A>
<A HREF='/adventure/travel_directory.html'>Travel Directory</A>
<A HREF='/adventure/travel/greek-islands.html'>Where Next: Greek Islands</A>
<A HREF='/adventure/travel/south_africa.html'>World Class Adventure Travel</A>
<A HREF='/adventure/travel/pennsylvania.html'>Wild Roads: Pennsylvania</A>
<A HREF='/adventure/travel/california.html'>Secret California</A>
<A HREF='/adventure/vacation-packages/europe-asia-southwest.html'>New ADVENTURE Deals!</A>
<A HREF='/adventure/weekend-getaways-summer.html'>Next Weekend: Getaways Near You</A>
<A HREF='/adventure/0605/whats_new/lewis_gordon_pugh.html'>What It Takes: To Swim With Icebergs</A>
<A HREF='/adventure/audio.html'>Audio Interviews</A>
<A HREF='/adventure/reviews/camping_gear.html'>User Reviews</A>
<A HREF='/adventure/0605/gear/bikes-mountain.html'>The Best New Bikes</A>
<A HREF='/adventure/0605/gear/bearproofing.html'>Instant Expert: Bearproofing</A>
<A HREF='/adventure/0603/gear/running_shoes.html'>Running Shoes + Gear</A>
<A HREF='/adventure/0605/columns/yosemite_hike.html'>Your Turn: Backcountry Yosemite</A>
<A HREF='/adventure/0605/columns/robert_young_pelton.html'>Robert Young Pelton: The Kidnap Course</A>
<A HREF='/adventure/photography/rafting-salmon-river/photo.html'>Photo Gallery: Rafting the Middle Fork</A>
<A HREF='/adventure/0605/sports/bug_repellents.html'>Battle the Buzz: Bug Repellants</A>
<A HREF='/adventure/0605/sports/hiking_food.html'>The Carb Craze: Hiking Foods</A>
<A HREF='/adventure/0603/sports/travel_health_hypothermia.html'>Ask Dr. Extreme</A>
<A HREF='https://www.subscribengadventure.com/oldsite/directorder.aspx?EFFORTKEY=NAAFXQ5&MSCCMPLX='>Subscribe Now!</A>
<A HREF='https://secure.customersvc.com/wes/servlet/Show?WESPAGE=am/home1.jsp&MSRSMAG=NA'>Renew or Adjust Your Subscription</A>
<A HREF='https://secure.customersvc.com/wes/servlet/Show?WESPAGE=am/Services/faq/nafaq.jsp&MSRSMAG=NA#Section_B2'>Order Back Issues</A>
<A HREF='https://secure.customersvc.com/wes/servlet/Show?WESPAGE=am/Services/faq/nafaq.jsp&MSRSMAG=NA'>Frequently Asked Questions</A>
<A HREF='/adventure/about.html'>Contact Us</A>
<A HREF='/adventure/writers-photographers.html'><i>Adventure</i> Team</A>
<A HREF='/adventure/about_advertise.html'>Advertise With Us</A>
<A HREF='/adventure/about_press.html'>Press Inquiries</A>
<A HREF='/adventure/about_internships.html'>Internships</A>
<A HREF='/adventure/about_writers.html'>Contributor Guidelines</A>
*/

