
function quickNav(ctrl, url)
{
	// this handles selections in the quick nav select box.
	// the form action that contains the quick nav select box
	// is used to determine the base url that is prepended
	// to the value selected in the nav box and passed in via 
	// the url argument. the control argument is the form
	// element (select) that is used to represent the quicknav
	// menu. It is automatically set back to its original state
	// when this function is called.
	
	// set the control back to its default state
	ctrl.options[0].selected = true;
	
	// if the url (value chosen from the select box is -1 do nothing
	if (url != "-1"){
		// if the url includes http://, assume it's an external link
		// and open the new site in another window.
		var y    = url.indexOf("http://");
		if (y >= 0) {
			window.open(url);
		} 
		else {
			// otherwise resolve the relative url and
			// open it in the existing window.
			var base = document.navForm.action;
			var x    = base.lastIndexOf("index.html");
     		if (x >= 0) base = base.substr(0,x);
	    
			url = base + url;
			// uncomment the following for debugging
			//window.alert (url);
			window.location = url;
		}
	}
}
