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;
}

function showBranch(branch,button,n) {
   var objBranch = document.getElementById(branch).style;
   var objButton = document.getElementById(button);
   n++;
     for (x=1;n>x;x++) {
		  var z = "link"+x;
		  document.getElementById(z).className="back";
	  }
	  objButton.className="current";
      for (x=1;n>x;x++) {
		  var z = "branch"+x;
      	  document.getElementById(z).style.display="none";
	  }
	  objBranch.display="block";
}

function gotoSermon() {
  var x=document.getElementById("sermonLists")
  if(x.selectedIndex==0) y=1;
  if(x.selectedIndex==1) window.location="/resources/sermons/sermon-series/";
  if(x.selectedIndex==2) window.location="/resources/sermons/sermon-category/";
  if(x.selectedIndex==3) window.location="/resources/sermons/sermon-month/";
  if(x.selectedIndex==4) window.location="/resources/sermons/sermon-preacher/";
}

function gotoArticle() {
  var x=document.getElementById("sermonLists")
  if(x.selectedIndex==0) y=1;
  if(x.selectedIndex==1) window.location="/resources/articles/article-series/";
  if(x.selectedIndex==2) window.location="/resources/articles/article-category/";
  if(x.selectedIndex==3) window.location="/resources/articles/article-month/";
  if(x.selectedIndex==4) window.location="/resources/articles/article-author/";
}