function doSomething(x) {
   c="current";
	var y=document.getElementById('nav').className;
	if (y)	document.getElementById(y).className="nav";
	document.getElementById(x).className=c;
	document.getElementById('nav').className=x;
}

$(document).ready(function() {
  $('#an_calendar a').click(function(){
    $('#branch1').addClass("current");
    $('#branch2').removeClass("current");
    $(this).addClass("current");
    $('#an_agenda a').removeClass("current");
    return false;
  });
  $('#an_agenda a').click(function(){
    $('#branch2').addClass("current");
    $('#branch1').removeClass("current");
    $(this).addClass("current");
    $('#an_calendar a').removeClass("current");
    return false;
  });
});

function gotoSermon() {
  var x=document.getElementById("sermonLists")
  if(x.selectedIndex==0) y=1;
  if(x.selectedIndex==1) window.location="/resources/sermons/sermons-by-series/";
  if(x.selectedIndex==2) window.location="/resources/sermons/sermons-by-category/";
  if(x.selectedIndex==3) window.location="/resources/sermons/sermons-by-month/";
  if(x.selectedIndex==4) window.location="/resources/sermons/sermons-by-preacher/";
}