//<script language="javascript">

// Global variables
var xmlhttp;

// Array of pages used in the search for redirecting to tracks
var SearchPages = new Array(
	"",											// Dummy entry for all tracks
	"http://www.trampingtracks.co.nz/tracks_north_island.html",			//NORTH ISLAND
	"http://www.trampingtracks.co.nz/auckland-tracks.html",				//AUCKLAND
	"http://www.trampingtracks.co.nz/hawkes-bay-walks.html",				//HAWKES BAY 
	"http://www.trampingtracks.co.nz/tauranga-tracks.html",				//TAURANGA
	"http://www.trampingtracks.co.nz/wellington-walks.html",			//WELLINGTON
	"http://www.trampingtracks.co.nz/tracks_south_island.html",			//SOUTH ISLAND
	"http://www.trampingtracks.co.nz/nelson-tramping.html"         //Nelson
	);

function test_region()
{
	// Check we've not simply got a region search
	if ((document.getElementById("srch_location").selectedIndex != 0) &&
		(document.getElementById("srch_duration").selectedIndex == 0))
	{
		document.location = SearchPages[document.getElementById("srch_location").selectedIndex];
		return false;
	}
	return true;
}

function lstName_OnChange()
{
	try
	{
		var lstName = document.getElementById("lstName");
		// Load the story archive document
		var sValue = lstName.options[lstName.selectedIndex].value;
	
		if (sValue.length > 0)
		{
			location = "http://www.trampingtracks.co.nz/" + sValue;
		}
	}
	catch(e)
	{
		//alert(e);
		throw e;
	}
}
//</script>
