  function Check_Final_Quiz()
  {
    var theForm = document.getElementById('answerform');
    var previousStyle = '';
    var overAllChecked = true;
    var radioName = null;
    var element = null;
    var Checked = false;
    var i = 1;
    var quizIdLength = 7;
  
    for(k=0; k < theForm.elements.length; k++)
    {
      element = theForm.elements[k];
  
      if (element.type == 'radio')
      {
        radioName = element.name;
  
        if(radioName.substring(0, quizIdLength) == 'answer_')
        {
          if (element.checked == true)
          {
            Checked = true;
          }
  
          if(i == 4)
          {
            quizID = radioName.substring(quizIdLength, radioName.length);
            questionText = document.getElementById('Question_' + quizID + '_Text');
  
            if(Checked == false)
            {
              overAllChecked = false;
              questionText.style.backgroundColor = 'Red';
            }
            else
            {
              questionText.style.backgroundColor = previousStyle;
            }
  
            i = 0;
            Checked = false;
          }
  
          i++;
        }
      }
    }
  
    if(overAllChecked)
    {
      return true;
    }
    else
    {
      overAllChecked = true;
      Checked = false;
      alert('You have not answered some of the questions, the ones that are highlighted in red need to be answered');
      return false;
    }
  }
  
  function ChangeNavigationPageID(PageID)
  {
    Page = document.getElementById("NavigationPageID");
    Page.value = PageID;
    document.Navigation_Form.submit();
    return false;
  }
  
  function showhide(layer_ref)
  {
    if (document.getElementById && !document.all)  //firefox
      div = document.getElementById(layer_ref).style;
  
    if (document.all) //IS IE 4 or 5 (or 6 beta)
      div = eval('document.all.' + layer_ref + '.style');
  
    if (document.layers) //IS NETSCAPE 4 or below
      div = document.layers[layer_ref];
  
    if(div.display == 'none')
      div.display = 'block';
    else
      div.display = 'none';
  
    return false;
  }
  
  function IsEssayBlankOrWDYH5(ob_essay, tlzpagetype) {
    if(ob_essay.value == '') {
      alert('You have not given an answer for this section');
      return false;
    } else {
      return true;
    }  
    //else if(tlzpagetype == 'WDYH5')
    //{
      //return confirm('Note: You have reached the end of the video clip sections, if you continue past this point you will not be able to change your answers for the What Did You See pages, you can still return and look at the pages.');
    //}
  }