function navBar( tableCellRef, hoverFlag, navStyle ) {
  if ( hoverFlag ) {
    switch ( navStyle ) {
    case 1:
      tableCellRef.style.backgroundColor = '#5A6B94';
      break;
    default:
      if ( document.getElementsByTagName ) {
	tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#c00';
      }
    }
  } else {
    switch ( navStyle ) {
    case 1:
      tableCellRef.style.backgroundColor = '#384C72';
      break;
    default:
      if ( document.getElementsByTagName ) {
	tableCellRef.getElementsByTagName( 'a' )[0].style.color = '#000';
      }
    }
  }
}

function navBarClick( tableCellRef, navStyle, url ) {
  navBar( tableCellRef, 0, navStyle );
  goTo( url );
}

function goTo( url ) {
  window.location.href = url;
}

function validateSearch() {
  if (document.searchform.search.value=='Search for...' || document.searchform.search.value=='') {
    alert('Wait, you need to enter what you\'re looking for in the "Search for..." box.'); return false;
  } else {
    document.searchform.submit();}
}
