// JavaScript Document
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jerome Caron |  */
eyesurgery = new Array(
new Array(
new Array("Please Select the time frame of your surgery", 39482304),
new Array("Was your surgery conducted within the past year?", "lasik-py.htm"),
new Array("Was your surgery conducted more than one year?", "lasik-over.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),		  
new Array("Was your surgery conducted within the past year?", "rk-py.htm"),
new Array("Was your surgery conducted more than one year?", "rk-over.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),
new Array("Was your surgery conducted within the past year?", "prk-py.htm"),
new Array("Was your surgery conducted more than one year?", "prk-over.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),		  
new Array("Was your surgery conducted within the past year?", "ltk-py.htm"),
new Array("Was your surgery conducted more than one year?", "ltk-over.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),
new Array("Conducted anytime", "piol.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),
new Array("Conducted anytime", "staar.htm")
),
new Array(
new Array("Please Select the time frame of your surgery", 39482304),
new Array("Conducted anytime", "artisan.htm")
)
);
function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) {
var i, j;
var prompt;
// empty existing items
for (i = selectCtrl.options.length; i >= 0; i--) {
selectCtrl.options[i] = null;
}
prompt = (itemArray != null) ? goodPrompt : badPrompt;
if (prompt == null) {
j = 0;
}
else {
selectCtrl.options[0] = new Option(prompt);
j = 1;
}
if (itemArray != null) {
// add new items
for (i = 0; i < itemArray.length; i++) {
selectCtrl.options[j] = new Option(itemArray[i][0]);
if (itemArray[i][1] != null) {
selectCtrl.options[j].value = itemArray[i][1];
}
j++;
}
// select first item (prompt) for sub list
selectCtrl.options[0].selected = true;
   }
}
   <!--
    // Create a function that will change the form action value on the fly.
    function FormAction(page){
                      //The line below will define the page the forms submits to.
                      document.WhatToDoForm.action = page;
                      // Te line below will actually submit the form.
                      document.WhatToDoForm.submit();
    }
     // -->