
<!--

var origImgSrc = "";
function imgRollover(imgName,newImg) {
  theImg = document.getElementById(imgName); 
  origImgSrc = theImg.src;
  theImg.src = newImg;  
}

function imgRollback(imgName) {
  theImg = document.getElementById(imgName); 
  theImg.src = origImgSrc;
}


function playMusicFile(musicFile,musicTitle) {

   var musicTitleSection = getObjectById("musicTitleSection");
   musicTitleSection.innerHTML = musicTitle;
//   alert("about to call selectMusicSection");
   selectMusicSection(4);
   
//   alert("called selectMusicSection");
   
//   alert("about to set the location href of the  playMusicFrame");
   var frameObject = getObjectById("playMusicFrame");
   //alert(frameObject);
   //alert(frameObject.src);

   var musicPageURL = "load_music.html?filepath=" + musicFile;

   //alert("musicPageURL is " + musicPageURL);

   frameObject.src = musicPageURL;
  

   // old way of doing it...frames['playMusicFrame'].location.href = fileName;
//   alert("just set the src of the playMusicFrame to " + frameObject.src);
}



var numberFAQ = 11;
function selectFAQquestion(whichQuestionNumber) {


//alert("function called, whichQuestionNumber = " + whichQuestionNumber);

for (var i=1; i<=numberFAQ; i++) {

 // alert("i = " + i);
 var newDisplayValue = (whichQuestionNumber == i) ? "block":"";
 var newImageValue = (whichQuestionNumber == i) ? "images/bullet_selected.png":"images/bullet_unselected.png";
 var layerId = "faqAnswer" + i;
 var imageId = "questionBullet" + i; 

// alert("layerId = " + layerId + " and imageId = " + imageId);


if (document.getElementById)
{
// this is the way the standards work
var style2 = document.getElementById(layerId).style;
//alert("display was " + style2.display);
style2.display = newDisplayValue;
//alert("display is now " + style2.display);

var image2 = document.getElementById(imageId);
image2.src = newImageValue;  

//alert("image source is now " + image2.src);


}
else if (document.all)
{
// this is the way old msie versions work
var style2 = document.all[layerId].style;
style2.display = newDisplayValue;
var image2 =  document.all[imageId];
image2.src = newImageValue;  


}

}
    
}



var numberMusicSections = 9;
function selectMusicSection(whichSectionNumber) {


//alert("function called, whichSectionNumber = " + whichSectionNumber);

for (var i=1; i<=numberMusicSections; i++) {

//alert("i = " + i);
 var newSectionClassName = (whichSectionNumber == i) ? "musicSectionVisible":"musicSection";
 var newHeadingClassName = (whichSectionNumber == i) ? "selected":"";
 var layerId = "musicSection" + i;
 var tdId = "musicHeading" + i; 

// alert("layerId = " + layerId + " and tdId = " + tdId);


var currLayer = getObjectById(layerId);
//alert("currLayer className is " + currLayer.className);
currLayer.className = newSectionClassName;
//alert("currLayer className has been set to " + currLayer.className);
//alert("about to find the td by id");

var td2 = getObjectById(tdId);
//alert("td2 classname is currently " + td2.className);
if (i == 4 && whichSectionNumber == 4) {
  //change the selected heading to "now playing" for the play-music layer
// alert("changing the td innerhtml to be now playing");
  td2.innerHTML = "sound clip playing";
}
if (i == 4 && whichSectionNumber != 4) {
  // We might be stopping playing a sound clip - blank out the music iframe
   
   var frameObject = getObjectById("playMusicFrame");
   frameObject.src = "blank.html";   

  // Change the "now playing" section to blank since it is no longer playing
  //
  td2.innerHTML = " &nbsp; ";
}
td2.className = newHeadingClassName;  
//alert("td2 classname is now " + td2.className);

} //end of for loop

    
} //end of function





function getObjectById(objectId) {

var theObject;

  if (document.getElementById)
  {
    // this is the way the standards work
    theObject = document.getElementById(objectId);
  }
  else if (document.all)
  {
    // this is the way old msie versions work
    theObject = document.all[objectId];
  }

  return theObject; 
} 




//-->


