// JavaScript Document

var	directionsOptions = new Array(
	  // default on page open - the "select" prompt in the dropdown
	'<p><em>Please tell us where you are coming from by making a selection in the upper left drop-down box.</em></p>',
	  // for San Francisco
	'<p><strong>San Francisco</strong>\n<ul class="directionsList">\n<li>Make your way to the Bay Bridge eastbound</li>\n',
	  // for the North Bay
	'<p><strong>the North Bay</strong>\n<ul class="directionsList">\n<li>Make your way to 80 southbound</li>\n<li>...</li>\n<li>...</li>\n<li>...</li>\n',
	  // for Sacramento/Davis
	'<p><strong>Sacramento/Davis</strong>\n<ul class="directionsList">\n<li>Make your way to 80 southbound</li>\n<li>...</li>\n<li>...</li>\n<li>...</li>\n',
	  // for the South Bay
	'<p><strong>the South Bay</strong><ul class="directionsList">\n<li>Make your way to 680 northbound</li>\n<li>...</li>\n<li>...</li>\n<li>...</li>\n',
	  // for the southern peninsula
	'<p><strong>the southern peninsula</strong>\n<ul class="directionsList">\n<li>Make your way to the Dumbarton Bridge eastbound</li>\n<li>...</li>\n<li>...</li>\n<li>...</li>\n',
	  // for inland (Manteca, Tracy, Stockton)
	'<p><strong>inland (Manteca, Tracy, Stockton)</strong>\n<ul class="directionsList">\n<li>Make your way to 580 westbound</li>\n<li>...</li>\n<li>...</li>\n<li>...</li>\n');

for (i = 1; i < directionsOptions.length; i++)
{
	// add the directions from the Crow Canyon exit to all departure areas
	directionsOptions[i]	= directionsOptions[i]+"<li>from Crow Canyon Road westbound, turn right onto Old Crow Canyon Rd, at the stop sign it turns into Omega Rd.</li>\n<li>from Omega Road northbound, make a left on Beta Court</li>\n<li>look for us at 23 Beta Court Suite C</li>\n</ul></p>";
}

function setDirectionsSelectionChange (theNewSelection)
{
	if (theNewSelection != -1)
	{
		theDirectionsComponent	= document.getElementById ("theDirectionsCell");
		
//		alert (directionsOptions[theNewSelection]);
		
		if (theDirectionsComponent != null && theNewSelection >= 0 && theNewSelection < directionsOptions.length)
			theDirectionsComponent.innerHTML	= directionsOptions[theNewSelection];
	}
}