<!--

  /////////////////////////////////////////////////////////////
  //	Dynamic table generation
  /////////////////////////////////////////////////////////////
  function createTable() {

    /////////////////////////////////////////////////////////
    //	Piped string template: tableTitle|row1|row2 ...
    /////////////////////////////////////////////////////////
    sPipedTableInfo = "Question 1:^Bargain City|Question 2:^Banging erasers after school|Question 3:^Rangers|Question 4:^Seventh grade|Question 5:^Football|Question 6:^Tea with her parents|Question 7:^KZAZ|Question 8:^Hound Dog|Question 9:^Marty|Question 10:^Ferris Wheel";

    /////////////////////////////////////////////////////////
    //	Split piped string into table components
    /////////////////////////////////////////////////////////
    arTableComponents = sPipedTableInfo.split("|");

    /////////////////////////////////////////////////////////
    //	Create table header, footer
    /////////////////////////////////////////////////////////
    sTable = "";
    sTableHeader = "<table class = 'tableStyle' cellpadding = '2' cellspacing = '1'>";
    sTableFooter = "</table>";
    sTable = sTableHeader;

    /////////////////////////////////////////////////////////
    //	Create table content
    /////////////////////////////////////////////////////////
    iLoopCount = arTableComponents.length;
    for(i = 0; i < iLoopCount; i++) {

      arTempRow = arTableComponents[i].split("^");
      iArLen = arTempRow.length;
      sTable = sTable + "<tr>";
      for(j = 0; j < iArLen; j++) {

        if(j == 0) {

          sTable = sTable + "<td class = 'labelStyle'>" + arTempRow[j] + "</td>";

        } else {

          sTable = sTable + "<td class = 'contentStyle'>" + arTempRow[j] + "</td>";

        }

      }sTable = sTable + "</tr>";

    }

    sTable = sTable + sTableFooter;
    dynTableID.innerHTML = sTable;

  }

  //This calculates the score out of a total number of questions and send to next appropriate page

  function compute(form) {
    tot=(a + b + c + d + e + f + g + h + i + j)

      if (tot == 0)
      {alert("You got " + tot  + " out of 10 \n Try watching the movie first. THEN take the test.") 
      location="grease.htm"}

      if (tot == 1 || tot == 2)
      {alert("You got " + tot + " out of 10 \n Try again...")
      location="grease.htm"}

      if (tot == 3 || tot == 4)
      {alert("You got " + tot + " out of 10 \n Better than bad, but still below average...")
      location="grease.htm"}

      if (tot == 5)
      {alert("You got " + tot + " out of 10 \n 50 Percent. \n Right in the meaty part of the curve.")
      location="grease.htm"}

      if (tot == 6 || tot == 7)
      {alert("You got " + tot + " out of 10 \n You're above average.")
      location="grease.htm"}

      if (tot == 8 || tot == 9)
      {alert("You got " + tot + " out of 10 \n Not bad, Sparky!")
      location="grease.htm"}

      if (tot == 10)
      {alert("You got " + tot + " out of 10 \n 100 Percent!! \n You really know your stuff! Great job!")
      location="grease.htm"}
  }


  var imageList = new Array;
  var captionList = new Array;
  var currentSlide = 0;

  imageList[0] = new Image;
  imageList[0].src = "Picture_1.JPG";
  captionList[0] = "Danny Zuko and Sandy Sandy Olsson have a summer romance.";
  imageList[1] = new Image;
  imageList[1].src = "Picture_2.JPG";
  captionList[1] = "Kenickie, Doody, Sonny and Putzie question Danny about his summer.";
  imageList[2] = new Image;
  imageList[2].src = "Picture_3.JPG";
  captionList[2] = "Sandy sings about some 'Summer Loving.'";
  imageList[3] = new Image;
  imageList[3].src = "Picture_4.JPG";
  captionList[3] = "Danny gets told off by Sandy.";
  imageList[4] = new Image;
  imageList[4].src = "Picture_5.JPG";
  captionList[4] = "Sandy is offered a drink of wine.";
  imageList[5] = new Image;
  imageList[5].src = "Picture_6.JPG";
  captionList[5] = "Sandy is 'Hopelessly Devoted' to Danny.";
  imageList[6] = new Image;
  imageList[6].src = "Picture_7.JPG";
  captionList[6] = "The T-Birds imagine building a suped-up rod called Greased Lightnin.'";
  imageList[7] = new Image;
  imageList[7].src = "Picture_8.JPG";
  captionList[7] = "Sandy tries to make Danny jealous.";
  imageList[8] = new Image;
  imageList[8].src = "Picture_9.JPG";
  captionList[8] = "The gang hangs out at the Frosty Palace.";
  imageList[9] = new Image;
  imageList[9].src = "Picture_10.JPG";
  captionList[9] = "Frenchy gets some helpful advice, in song (of course) from her guardian angel.";
  imageList[10] = new Image;
  imageList[10].src = "Picture_11.JPG";
  captionList[10] = "Marty checks out Vince Fontaine checking himself out.";
  imageList[11] = new Image;
  imageList[11].src = "Picture_12.JPG";
  captionList[11] = "Numerous couples hope to win the dance contest...";
  imageList[12] = new Image;
  imageList[12].src = "Picture_13.JPG";
  captionList[12] = "...however, Danny and Cha Cha DeGregorio are the champs.";
  imageList[13] = new Image;
  imageList[13].src = "Picture_14.JPG";
  captionList[13] = "Danny is stranded at the drive-in. Perhaps feeling like a fool?";
  imageList[14] = new Image;
  imageList[14].src = "Picture_15.JPG";
  captionList[14] = "Sandy offers her help to Rizzo.";
  imageList[15] = new Image;
  imageList[15].src = "Picture_16.JPG";
  captionList[15] = "The race at Thunder Road.";
  imageList[16] = new Image;
  imageList[16].src = "Picture_17.JPG";
  captionList[16] = "Sandy looks on as Danny emerges victorious...";
  imageList[17] = new Image;
  imageList[17].src = "Picture_18.JPG";
  captionList[17] = "Danny is mesmerized by the 'new and improved' Sandy.";
  imageList[18] = new Image;
  imageList[18].src = "Picture_19.JPG";
  captionList[18] = "The gang gets together for one last song.";
  imageList[19] = new Image;
  imageList[19].src = "Picture_20.JPG";
  captionList[19] = "Danny and Sandy fly off in Greased Lightning.";
  function nextSlide() {
    if (currentSlide + 1 < imageList.length) {
       currentSlide += 1;
       document.slideShow.src = imageList[currentSlide].src;
       document.captionForm.caption.value = captionList[currentSlide];
    }
  }
  function previousSlide() {
    if (currentSlide - 1 >= 0) {
       currentSlide -= 1;
       document.slideShow.src = imageList[currentSlide].src;
       document.captionForm.caption.value = captionList[currentSlide];
    }
  }

//-->