var maxLength = 10;

Menu2Options= new Array;

var Menu2OriginalLength = Menu2Options.length;





Menu1Options= new Array;



Menu1Options[0] = "Select Country";

Menu1Options[1] = "U A E";

Menu1Options[2] = "Thailand";





function changeListOfPages()

/*This function changes the list of pages-to-go in Menu2, depending on the subject selected in Menu1*/

{

Menu2Options.length = 0;

Menu1SelectedItem = document.DoubleDropDownMenu.Menu1.selectedIndex;

        if (Menu1SelectedItem == null) return;



        if (Menu1SelectedItem == 0)

         /*Personal Development*/

        {

        Menu2Options= new Array;

        Menu2Options[0] = new Option("Select a resort");


        Pages = new Array;

        Pages[0] = "";

        }

        if (Menu1SelectedItem == 1)

       /*HTML Tutorial Topics*/

        {

        Menu2Options= new Array;

        Menu2Options[0] = new Option("Select a resort");

        Menu2Options[1] = new Option(" Dubai ");



        /*HTML Tutorial Files*/

        Pages = new Array;

        Pages[0] = "";

Pages[1] = "dguide.htm";







        }

        if (Menu1SelectedItem == 2)

        /*Java Script Tutorial*/

        {

        Menu2Options= new Array;

        Menu2Options[0] = new Option("Select a resort");

        Menu2Options[1] = new Option("Bangkok");

        Menu2Options[2] = new Option("Chiang Mai");
        Menu2Options[3] = new Option("Chiang Rai");
        Menu2Options[4] = new Option("Pattaya");

        /*Java Script Files*/

        Pages = new Array;

        Pages[0] = "";

        Pages[1] = "bang.htm";

        Pages[2] = "chia.htm";
        Pages[3] = "chiar.htm";
        Pages[4] = "pattaya.htm";
        }

/*Depending on what has been selected, this is the function that loads the pages-to-go into Menu2*/

tot = Menu2Options.length;

  for (i = Menu2OriginalLength; i > 0; i--)

        { document.DoubleDropDownMenu.Menu2.options[i] = null; }

/* The above nulls off all the options to allow the subjects to be changed without leaving data in the array from previous, longer lists of files. */

        for (i = 0; i < tot; i++)

        { document.DoubleDropDownMenu.Menu2.options[i] = Menu2Options[i]; }

        document.DoubleDropDownMenu.Menu2.options[0].selected = true;

/* The above fills the options with the descriptions of the files and makes the first description the selected one. */

Menu2OriginalLength = Menu2Options.length;

/* This makes the value of Menu2OriginalLength correct, if the subjects have been changed. */

}



function gotoPage()

/*This function loads the selected page to go into the browser.*/

        {



        i = document.DoubleDropDownMenu.Menu2.selectedIndex;

        window.location.href = Pages[i];

        }






