//contains functions that enable AJAX actions within the site

//AJAX function to indicate the change in state.
function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("scriptOutput").innerHTML=xmlHttp.responseText;
}
}

//Set up the XML Http Object.
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

// this function utilizes the prototype/scriptaculous framework in order to hide a section.
// it will work with the arrow_right and arrow_down graphics, as well as toggling the section itself.
function showHide(section){
  var imgHide=section+"ImgHide"
  var imgShow=section+"ImgShow"
  var sectionNm=section
  
  new Effect.toggle($(imgHide),'appear',{duration:0});
  new Effect.toggle($(imgShow),'blind',{duration:0});
  new Effect.toggle($(sectionNm),'blind');
}