//the next 3 lines are browser detection for user-agent DOMS
ns4 = (document.layers) ? true:false //required for Functions to work
ie4 = (document.all) ? true:false //required for Functions to work
ng5 = (document.getElementById) ? true:false //required for Functions to work

function hideSec(divid) 
{
  if (ng5) document.getElementById(divid).style.visibility = "hidden";
  else if (ns4) document.layers[divid].visibility = "hide";
  else if (ie4) document.all[divid].style.visibility = "hidden";
}

function hideAll(divid) 
{
  div_elements = document.getElementsByTagName("div");
  for (i=0; i<div_elements.length; i++)
  {
    if (div_elements[i].id.indexOf(divid)==0)
    {
      div_elements[i].style.visibility="hidden";
    }
  }
}

function showSec(divid) 
{

  hideSec(divid);
  if (ng5) document.getElementById(divid).style.visibility = "visible";
  else if (ns4) document.layers[divid].visibility = "show";
  else if (ie4) document.all[divid].style.visibility = "visible";
}


function hideAllAndShowSec(hideDivId, showDivId)
{
    hideAll(hideDivId);
    showSec(showDivId);
}
