// Handle tab requests to expand and collapse the sub navigation areas
function showSubNav(forTab)
{
   // get a handle to the activated elements and return the non-activated elements to 
   // their default state
   if (forTab == "education")
	  {
	  $tabIMG = document.getElementById("eduarrow");
	  $tabDIV = "sectionSubMenuEdu";
      document.getElementById("aboutarrow").src = "/images/arrow_headnav_off.png";
      document.getElementById("planarrow").src = "/images/arrow_headnav_off.png";
	  if (document.getElementById("sectionSubMenuAbout").style.height == "26px") 
	     {
         var divLinks = document.getElementById("sectionSubMenuAbout").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
	     oba_wipe_div("sectionSubMenuAbout",24,0,1,'up');
		 }
      if (document.getElementById("sectionSubMenuPlan").style.height == "26px")
	     {
         var divLinks = document.getElementById("sectionSubMenuPlan").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
		 oba_wipe_div("sectionSubMenuPlan",24,0,1,'up');
		 }
	  }
	  
   if (forTab == "aboutus")
	  {
	  $tabIMG = document.getElementById("aboutarrow");
	  $tabDIV = "sectionSubMenuAbout";
      document.getElementById("eduarrow").src = "/images/arrow_headnav_off.png";
      document.getElementById("planarrow").src = "/images/arrow_headnav_off.png";
      if (document.getElementById("sectionSubMenuEdu").style.height == "26px")
	     {
         var divLinks = document.getElementById("sectionSubMenuEdu").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
		 oba_wipe_div("sectionSubMenuEdu",24,0,1,'up');
		 }
      if (document.getElementById("sectionSubMenuPlan").style.height == "26px")
	     {
         var divLinks = document.getElementById("sectionSubMenuPlan").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
		 oba_wipe_div("sectionSubMenuPlan",24,0,1,'up');
		 }
      }
	  
   if (forTab == "planning")
	  {
	  $tabIMG = document.getElementById("planarrow");
	  $tabDIV = "sectionSubMenuPlan";
      document.getElementById("eduarrow").src = "/images/arrow_headnav_off.png";
      document.getElementById("aboutarrow").src = "/images/arrow_headnav_off.png";
	  if (document.getElementById("sectionSubMenuAbout").style.height == "26px")
	     {
         var divLinks = document.getElementById("sectionSubMenuAbout").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
		 oba_wipe_div("sectionSubMenuAbout",24,0,1,'up');
		 }
      if (document.getElementById("sectionSubMenuEdu").style.height == "26px")
	     {
         var divLinks = document.getElementById("sectionSubMenuEdu").getElementsByTagName('a');
	     for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
		 oba_wipe_div("sectionSubMenuEdu",24,0,1,'up');
		 }
      }
	  
   // Now set the state of the selected element	  
   $tabState = $tabIMG.src;
   var divLinks = document.getElementById($tabDIV).getElementsByTagName('a');
   if ($tabState.indexOf('off') > -1)
      {
	  for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "block";}
	  oba_wipe_div($tabDIV,0,24,1,'down');
	  $tabIMG.src = "/images/arrow_headnav_on.png";
	  }
   else
      {
	  for (i=0; i < divLinks.length; i++ ) {divLinks[i].style.display = "none";}
      oba_wipe_div($tabDIV,24,0,1,'up');
	  $tabIMG.src = "/images/arrow_headnav_off.png";
	  }
}
