/**
 * Display the news menu on the right sidebar
 *
 * Put the title item (or date) in the "rightNewsDateOrTitle" variable.
 * Put the teaser (brief description) in the "rightNewsTeaser" variable.
 * Put the URL in the "rightNewsURL" variable
 */
function displayNewsItems () {
        var j = 0;
	var rightNewsDateOrTitle = new Array();
	var rightNewsTeaser = new Array();
	var rightNewsURL = new Array();

	//rightNewsDateOrTitle[j] = "FlyDay Volunteers";
	//rightNewsTeaser[j] = "As always, we are looking for volunteers to help with this worthwhile event.&gt;&gt;";
	//rightNewsURL[j] = "fdvolunteers.htm";
    //j++;

	//rightNewsDateOrTitle[j] = "OFC Holiday Hours";
	//rightNewsTeaser[j] = "The OFC is closed on Christmas Day, Boxing Day, and New Year's Day.&gt;&gt;";
	//rightNewsURL[j] = "holiday.htm";
    //j++;

	rightNewsDateOrTitle[j] = "Membership Renewals";
	rightNewsTeaser[j] = "You can get the 2010 Membership Renewal Form HERE - it can be faxed back to 613-523-2187.&nbsp;&gt;&gt;";
	rightNewsURL[j] = "files/renewal2010.pdf\" target=\"_blank\"";
    j++;

	rightNewsDateOrTitle[j] = "Apply For Your New Licenses!";
	rightNewsTeaser[j] = "All your licences, permits and medicals will be held in one document, but you have to apply for the new Aviation Document Booklet.&nbsp;&gt;&gt;";
	rightNewsURL[j] = "http://www.tc.gc.ca/civilaviation/general/personnel/changes.htm\" target=\"_blank\"";
    j++;

	rightNewsDateOrTitle[j] = "Updated Financial Policies";
	rightNewsTeaser[j] = "The current revision is now available for viewing and download.&nbsp;&gt;&gt;";
	rightNewsURL[j] = "files/finpol.pdf\" target=\"_blank\"";
    j++;

	//rightNewsDateOrTitle[j] = "Bilingual Reservation System";
	//rightNewsTeaser[j] = "The Booking System now supports Canadian French&nbsp;&gt;&gt;";
	//rightNewsURL[j] = "bookingsystemupdate.htm";
    //j++;

	
	//rightNewsDateOrTitle[j] = "Private Ground School";
	//rightNewsTeaser[j] = "The Private Ground School Schedule has been posted on the Calendar of Events. &nbsp;&gt;&gt;";
	//rightNewsURL[j] = "calendar.htm";
    //j++;

	rightNewsDateOrTitle[j] = "Tax Forms";
	rightNewsTeaser[j] = "The Income Tax Forms for tax year 2009 have been posted (previous years forms are available in the Reference section).&nbsp;&gt;&gt;";
	rightNewsURL[j] = "files/OFC_TL11b_2009.pdf\" target=\"_blank\"";
    j++;

	for (i = 0; i < rightNewsDateOrTitle.length; i++) {
	    document.write('<div class=\"newsdates\">' + rightNewsDateOrTitle[i] + '</div>');
	    document.write('<a href=\"' + rightNewsURL[i] + '\">' + rightNewsTeaser[i] + '</a><br />');
	}
}

/**
 *  Display the quick tags on the left side of the home and news pages.
 *
 *  Put the title item in the "leftHomeTitle" variable
 *  Put the teaser in the "leftHomeTeaser" variable
 *  Put the URL in the "leftHomeURL" variable
 */
function displayLeftHomeItems () {
	var j = 0;
	var leftHomeTitle = new Array();
	var leftHomeTeaser = new Array();
	var leftHomeURL = new Array();

	leftHomeTitle[j] = "How to Start";
	leftHomeTeaser[j] = "Start your license in 4 easy steps.";
	leftHomeURL[j] = "gettingstarted.htm";
        j++;

	//leftHomeTitle[j] = "Introductory Flight";
	//leftHomeTeaser[j] = "Get started with an OFC Introductory Flight.";
	//leftHomeURL[j] = "introflight.htm";
    //    j++;

	leftHomeTitle[j] = "Flying for a Career";
	leftHomeTeaser[j] = "The OFC and Algonquin College's <em>Aviation Management - General Arts and Science</em> 2-year Diploma program.";
	leftHomeURL[j] = "http://www.algonquincollege.com/aviation";
        j++;

	//leftHomeTitle[j] = "What&acute;s Happening?";
	//leftHomeTeaser[j] = "Check out the <em>Calendar of Events</em>.";
	//leftHomeURL[j] = "calendar.htm";
    //    j++;

	document.write('<br />');

	for (i = 0; i < leftHomeTitle.length; i++) {
	    document.write('<a href=\"' + leftHomeURL[i] + '\"><strong>' + leftHomeTitle[i] + '</strong><br />');
	    document.write(leftHomeTeaser[i] + '</a>');
	    document.write('<hr shadow=\"none\" />');
	    //<hr shadow=\"none\" color=\"c6cede\" />
	}
}

/**
 * Display the main menu (across the top)
 *
 * Put the title item in the "topMenuItem" variable.
 * Put the URL in the "topMenuURL" variable
 */

function displayMainMenu() {
    var a = 0;
    var topMenuItem = new Array();
    var topMenuURL = new Array();

    topMenuItem[a]="About";
    topMenuURL[a] = "about.htm";
    a++;

    //topMenuItem[a]="Calendar";
    //topMenuURL[a] = "calendar.htm";
    //a++;

   //topMenuItem[a]="Intro Flight";
   //topMenuURL[a] = "introflight.htm";
   //a++;

    topMenuItem[a]="Learn to Fly";
    topMenuURL[a] = "learntofly.htm";
    a++;

    //topMenuItem[a]="Floats";
   // topMenuURL[a] = "floatsnews.htm";
   // a++;

    topMenuItem[a]="References";
    topMenuURL[a] = "reference.htm";
    a++;

    topMenuItem[a]="Weather";
    topMenuURL[a] = "weather.htm";
    a++;

    topMenuItem[a]="Links";
    topMenuURL[a] = "links.htm";
    a++;

    //topMenuItem[a]="Blog";
    //topMenuURL[a] = "http://news.ottawaflyingclub.ca/blog";
    //a++;

    topMenuItem[a]="Booking System";
    topMenuURL[a] = "http://www.flight-sheets.com/servlet/flightbooking";
    //topMenuURL[a] = "http://www.flight-sheets.com/servlet/flightbooking\" target=\"_blank\"";
    //topMenuURL[a] = "http://www.ofcbookings.kgbinternet.com/servlet/flightbooking";
    a++;

    document.write('&nbsp; <a href=\"' + topMenuURL[0] + '\">' + topMenuItem[0] + '</a>&nbsp;');

    for (i = 1; i < topMenuItem.length; i++) {
        document.write('|&nbsp; <a href=\"' + topMenuURL[i] + '\">' + topMenuItem[i] + '</a>&nbsp;');
    }
}

/**
 * About menu
 *
 * Put the title item in the aboutMenuItem variable.
 * Put the URL in the aboutMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the aboutMenuLevel variable
 *
 */
function displayAboutMenu() {
    var j = 0;
    var aboutMenuItem = new Array();
    var aboutMenuURL = new Array();
    var aboutMenuLevel = new Array();

    aboutMenuItem[j] = "Club Operations";
    aboutMenuURL[j] = "about.htm#operations";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Sightseeing Tours";
    aboutMenuURL[j] = "about.htm#tours";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Rentals";
    aboutMenuURL[j] = "about.htm#rentals";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Ground Schools";
    aboutMenuURL[j] = "about.htm#classroom";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Recurrency Training";
    aboutMenuURL[j] = "about.htm#recurrency";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Aviation Seminars";
    aboutMenuURL[j] = "about.htm#seminars";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Finding the Club";
    aboutMenuURL[j] = "about.htm#finding";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Joining the Club";
    aboutMenuURL[j] = "about.htm#joining";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Club Facilities";
    aboutMenuURL[j] = "about.htm#facilities";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Hours of Operations";
    aboutMenuURL[j] = "about.htm#hours";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Pilot Supplies";
    aboutMenuURL[j] = "about.htm#supplies";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Flight Planning";
    aboutMenuURL[j] = "about.htm#planning";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Services, Fuel &amp; Oil";
    aboutMenuURL[j] = "about.htm#fuel";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Staff";
    aboutMenuURL[j] = "staff.htm";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Flight Instructors";
    aboutMenuURL[j] = "staff.htm#instruct";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Flight Dispatch";
    aboutMenuURL[j] = "staff.htm#dispatch";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Administration";
    aboutMenuURL[j] = "staff.htm#office";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Board of Directors";
    aboutMenuURL[j] = "staff.htm#board";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Policies";
    aboutMenuURL[j] = "about.htm";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "Financial";
    aboutMenuURL[j] = "files/finpol.pdf\" target=\"_blank\"";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "Operational";
    aboutMenuURL[j] = "files/oppol.pdf\" target=\"_blank\"";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "OFC Constitution";
    aboutMenuURL[j] = "files/constitution.pdf\" target=\"_blank\"";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "By-Laws";
    aboutMenuURL[j] = "files/bylaws.pdf\" target=\"_blank\"";
    aboutMenuLevel[j] = "2";
    j++;

    aboutMenuItem[j] = "History of the OFC";
    aboutMenuURL[j] = "history.htm";
    aboutMenuLevel[j] = "1";
    j++;

    aboutMenuItem[j] = "OFC eUpdate";
    aboutMenuURL[j] = "eupdate.htm";
    aboutMenuLevel[j] = "1";
    j++;

    for (i = 0; i < aboutMenuItem.length; i++) {
        document.write('<span class=\"submenu' + aboutMenuLevel[i] + '\">');
        document.write('<a href=\"' + aboutMenuURL[i] + '\">' + aboutMenuItem[i] + '</a><br /></span>');
    }
}

/**
 * Learn to Fly menu
 *
 * Put the title item in the learnMenuItem variable.
 * Put the URL in the learnMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the learnMenuLevel variable
 *
 */
function displayLearnToFlyMenu() {
    var j = 0;
    var learnMenuItem = new Array();
    var learnMenuURL = new Array();
    var learnMenuLevel = new Array();

    learnMenuItem[j] = "Getting Started";
    learnMenuURL[j] = "gettingstarted.htm";
    learnMenuLevel[j] = "1";
    j++;

    //learnMenuItem[j] = "OFC First Solo Flights";
    //learnMenuURL[j] = "http://news.ottawaflyingclub.ca/blog/Flighttraining/MyFirstSolo";
    //learnMenuLevel[j] = "2";
    //j++;

    learnMenuItem[j] = "Licenses and Ratings";
    learnMenuURL[j] = "learntofly.htm";
    learnMenuLevel[j] = "1";
    j++;

    learnMenuItem[j] = "Recreational Permit";
    learnMenuURL[j] = "rpp.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Private Licence";
    learnMenuURL[j] = "private.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Night Rating";
    learnMenuURL[j] = "night.htm";
    learnMenuLevel[j] = "2";
    j++;

    //learnMenuItem[j] = "VFR OTT";
    //learnMenuURL[j] = "vfrott.htm";
    //learnMenuLevel[j] = "2";
    //j++;

    learnMenuItem[j] = "Commercial License";
    learnMenuURL[j] = "commercial.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Multi-Engine";
    learnMenuURL[j] = "multi.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Instrument";
    learnMenuURL[j] = "sing_ifr.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Multi-Instrument";
    learnMenuURL[j] = "multiifr.htm";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Instructor";
    learnMenuURL[j] = "class4.htm";
    learnMenuLevel[j] = "2";
    j++;

    //learnMenuItem[j] = "Floats";
    //learnMenuURL[j] = "seaplane.htm";
    //learnMenuLevel[j] = "2";
    //j++;

    learnMenuItem[j] = "Ground Schools";
    learnMenuURL[j] = "groundschool.htm";
    learnMenuLevel[j] = "1";
    j++;

    learnMenuItem[j] = "Private";
    learnMenuURL[j] = "files/privsyll.pdf\" target=\"_blank\"";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Commercial";
    learnMenuURL[j] = "files/commsyll.pdf\" target=\"_blank\"";
    learnMenuLevel[j] = "2";
    j++;

    //learnMenuItem[j] = "Instrument";
    //learnMenuURL[j] = "groundschool.htm#ifr";
    //learnMenuLevel[j] = "2";
    //j++;

    learnMenuItem[j] = "Rates";
    learnMenuURL[j] = "rates.htm";
    learnMenuLevel[j] = "1";
    j++;

    learnMenuItem[j] = "Flight Instruction";
    learnMenuURL[j] = "rates.htm#instruction";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Rentals";
    learnMenuURL[j] = "rates.htm#rentals";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Ground Schools";
    learnMenuURL[j] = "rates.htm#groundschool";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Membership";
    learnMenuURL[j] = "rates.htm#membership";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Ground Briefings";
    learnMenuURL[j] = "rates.htm#briefings";
    learnMenuLevel[j] = "2";
    j++;

    learnMenuItem[j] = "Simulator";
    learnMenuURL[j] = "rates.htm#simulator";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Miscellaneous Fees";
    learnMenuURL[j] = "rates.htm#misc";
    learnMenuLevel[j] = "2";
    j++;
    learnMenuItem[j] = "Medicals";
    learnMenuURL[j] = "came.htm";
    learnMenuLevel[j] = "1";
    j++;
    for (i = 0; i < learnMenuItem.length; i++) {
        document.write('<span class=\"submenu' + learnMenuLevel[i] + '\">');
        document.write('<a href=\"' + learnMenuURL[i] + '\">' + learnMenuItem[i] + '</a><br /></span>');
    }
}

/**
 * Professional Pilot Programme menu
 *
 * Put the title item in the pppMenuItem variable.
 * Put the URL in the pppMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the pppMenuLevel variable
 *
 */
function displayPppMenu() {
    var j = 0;
    var pppMenuItem = new Array();
    var pppMenuURL = new Array();
    var pppMenuLevel = new Array();

    pppMenuItem[j] = "Programme of Study";
    pppMenuURL[j] = "pppprogram.htm";
    pppMenuLevel[j] = "1";
    j++;

    pppMenuItem[j] = "Admission";
    pppMenuURL[j] = "pppadmit.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Foreign Students";
    pppMenuURL[j] = "pppforeign.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Advance Standing";
    pppMenuURL[j] = "pppadvance.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Study Terms";
    pppMenuURL[j] = "pppstudy.htm";
    pppMenuLevel[j] = "1";
    j++;

    pppMenuItem[j] = "First Term";
    pppMenuURL[j] = "pppstudy.htm#first";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Second Term";
    pppMenuURL[j] = "pppstudy.htm#second";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Third Term";
    pppMenuURL[j] = "pppstudy.htm#third";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Graduation";
    pppMenuURL[j] = "pppstudy.htm#grad";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Fees";
    pppMenuURL[j] = "pppfees.htm";
    pppMenuLevel[j] = "1";
    j++;

    pppMenuItem[j] = "Basic Course Fees";
    pppMenuURL[j] = "pppfees.htm#basic";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Private Pilot Licence";
    pppMenuURL[j] = "pppfees.htm#private";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Night Endorsement";
    pppMenuURL[j] = "pppfees.htm#night";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Multi-Engine";
    pppMenuURL[j] = "pppfees.htm#multi";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Multi-Instrument";
    pppMenuURL[j] = "pppfees.htm#multiifr";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Commercial Licence";
    pppMenuURL[j] = "pppfees.htm#commercial";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Appendices";
    pppMenuURL[j] = "pppannexa.htm";
    pppMenuLevel[j] = "1";
    j++;

    pppMenuItem[j] = "A - Foreign Students";
    pppMenuURL[j] = "pppannexa.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "B - Financial Assistance";
    pppMenuURL[j] = "pppannexb.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "C - Demand for Pilots";
    pppMenuURL[j] = "pppannexc.htm";
    pppMenuLevel[j] = "2";
    j++;

    pppMenuItem[j] = "Download PDF Version";
    pppMenuURL[j] = "files/ppp2003v2.pdf\" target=\"_blank\"";
    pppMenuLevel[j] = "1";
    j++;

    for (i = 0; i < pppMenuItem.length; i++) {
        document.write('<span class=\"submenu' + pppMenuLevel[i] + '\">');
        document.write('<a href=\"' + pppMenuURL[i] + '\">' + pppMenuItem[i] + '</a><br /></span>');
    }
}

/**
 * Reference menu
 *
 * Put the title item in the referenceMenuItem variable.
 * Put the URL in the referenceMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the referenceMenuLevel variable
 *
 */
function displayReferenceMenu() {
    var j = 0;
    var referenceMenuItem = new Array();
    var referenceMenuURL = new Array();
    var referenceMenuLevel = new Array();

    referenceMenuItem[j] = "Private License";
    referenceMenuURL[j] = "privref.htm";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Commercial License";
    referenceMenuURL[j] = "commref.htm";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Instrument Rating";
    referenceMenuURL[j] = "ifrref.htm";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Cross Country Info";
    referenceMenuURL[j] = "xcountryref.htm";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "American Refs";
    referenceMenuURL[j] = "xcountryref.htm#usa";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Garmin 430";
    referenceMenuURL[j] = "xcountryref.htm#garmin";
    referenceMenuLevel[j] = "2";
    j++;


    referenceMenuItem[j] = "Endorsements/Ratings";
    referenceMenuURL[j] = "ratingref.htm";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Night Rating";
    referenceMenuURL[j] = "ratingref.htm#night";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Multi-Engine";
    referenceMenuURL[j] = "ratingref.htm#multi";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Instructor";
    referenceMenuURL[j] = "ratingref.htm#instruct";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Floats";
    referenceMenuURL[j] = "ratingref.htm#floats";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Other";
    referenceMenuURL[j] = "ratingref.htm#other";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "Canadian Aviation Regs";
    referenceMenuURL[j] = "http://www.tc.gc.ca/civilaviation/regserv/affairs/cars/menu.htm\" target=\"_blank\"";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Rate Schedules";
    referenceMenuURL[j] = "rates.htm";
    referenceMenuLevel[j] = "1";
    j++;

     referenceMenuItem[j] = "Weight &amp; Balance";
    referenceMenuURL[j] = "JavaScript:confirmOpenFile('Weight and Balance Calculator\\n\\nAny information presented here should be checked against the aircraft documents prior to flight planning - there is no guarantee that the information presented here is the most current available or that the calculations are accurate.\\n\\n(Calculator courtesy of Chris Beal)','ofcwb.xls');";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "Income Tax Info";
    referenceMenuURL[j] = "files/OFC_TL11b_2009.pdf\" target=\"_blank\"";
    referenceMenuLevel[j] = "1";
    j++;

    referenceMenuItem[j] = "2009 Tax Info";
    referenceMenuURL[j] = "files/OFC_TL11b_2009.pdf\" target=\"_blank\"";
    referenceMenuLevel[j] = "2";
    j++;

    referenceMenuItem[j] = "2008 Tax Info";
    referenceMenuURL[j] = "files/OFC_TL11b_2008.pdf\" target=\"_blank\"";
    referenceMenuLevel[j] = "2";
    j++;
	
   for (i = 0; i < referenceMenuItem.length; i++) {
        document.write('<span class=\"submenu' + referenceMenuLevel[i] + '\">');
        document.write('<a href=\"' + referenceMenuURL[i] + '\">' + referenceMenuItem[i] + '</a><br /></span>');
    }
}

/**
 * Weather menu
 *
 * Put the title item in the weatherMenuItem variable.
 * Put the URL in the weatherMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the weatherMenuLevel variable
 *
 */
function displayWeatherMenu() {
    var j = 0;
    var weatherMenuItem = new Array();
    var weatherMenuURL = new Array();
    var weatherMenuLevel = new Array();

    weatherMenuItem[j] = "Nav Canada";
    //weatherMenuURL[j] = "http://www.flightplanning.navcanada.ca/cgi-bin/CreePage.pl?Langue=anglais&NoSession=NS_Inconnu&Page=forecast-observation&TypeDoc=html\" target=\"_blank\"";
    weatherMenuURL[j] = "http://www.flightplanning.navcanada.ca/cgi-bin/CreePage.pl?Langue=anglais&NoSession=NS_Inconnu&Page=forecast-observation&TypeDoc=html";
    weatherMenuLevel[j] = "1";
    j++;

    weatherMenuItem[j] = "Weather Manuals";
    //weatherMenuURL[j] = "http://www.navcanada.ca/NavCanada.asp?Language=en&Content=ContentDefinitionFiles\Publications\LAK\default.xml\" target=\"_blank\"";
    weatherMenuURL[j] = "http://www.navcanada.ca/NavCanada.asp?Language=en&Content=ContentDefinitionFiles\Publications\LAK\default.xml\" target=\"_blank\"";
    weatherMenuLevel[j] = "2";
    j++;

    weatherMenuItem[j] = "Env Canada (Public)";
    //weatherMenuURL[j] = "http://weatheroffice.ec.gc.ca/city/pages/on-118_metric_e.html\" target=\"_blank\"";
    weatherMenuURL[j] = "http://weatheroffice.ec.gc.ca/city/pages/on-118_metric_e.html";
    weatherMenuLevel[j] = "1";
    j++;

    weatherMenuItem[j] = "Standards Info";
   // weatherMenuURL[j] = "http://www.msc-smc.ec.gc.ca/msb/manuals/manair/html/PDFMenu_e.cfm\" target=\"_blank\"";
    weatherMenuURL[j] = "http://www.msc-smc.ec.gc.ca/msb/manuals/manair/html/PDFMenu_e.cfm";
    weatherMenuLevel[j] = "2";
    j++;

    weatherMenuItem[j] = "N.A. Satellite";
    //weatherMenuURL[j] = "http://www.intellicast.com/Local/USNationalWide.asp?loc=usa&seg=LocalWeather&prodgrp=SatelliteImagery&product=UnitedStates&prodnav=none&pid=none\" target=\"_blank\"";
    weatherMenuURL[j] = "http://www.intellicast.com/Local/USNationalWide.asp?loc=usa&seg=LocalWeather&prodgrp=SatelliteImagery&product=UnitedStates&prodnav=none&pid=none";
    weatherMenuLevel[j] = "1";
    j++;

    weatherMenuItem[j] = "NOAA (US)";
    //weatherMenuURL[j] = "http://aviationweather.gov\" target=\"_blank\"";
    weatherMenuURL[j] = "http://aviationweather.gov";
    weatherMenuLevel[j] = "1";
    j++;

    weatherMenuItem[j] = "ADDS (US)";
    //weatherMenuURL[j] = "http://adds.aviationweather.gov\" target=\"_blank\"";
    weatherMenuURL[j] = "http://adds.aviationweather.gov";
    weatherMenuLevel[j] = "2";
    j++;

    for (i = 0; i < weatherMenuItem.length; i++) {
        document.write('<span class=\"submenu' + weatherMenuLevel[i] + '\">');
        document.write('<a href=\"' + weatherMenuURL[i] + '\">' + weatherMenuItem[i] + '</a><br /></span>');
    }
}

/**
 * Other Links menu
 *
 * Put the title item in the linksMenuItem variable.
 * Put the URL in the linksMenuURL variable
 * Put the level - 1 or 2 (1 is main, 2 is sub) in the linksMenuLevel variable
 *
 */
function displayLinksMenu() {
    var j = 0;
    var linksMenuItem = new Array();
    var linksMenuURL = new Array();
    var linksMenuLevel = new Array();

    linksMenuItem[j] = "Ottawa Links";
    linksMenuURL[j] = "#ottawa";
    linksMenuLevel[j] = "1";
    j++;

    linksMenuItem[j] = "Canada Links";
    linksMenuURL[j] = "#canada";
    linksMenuLevel[j] = "1";
    j++;

    linksMenuItem[j] = "Commercial";
    linksMenuURL[j] = "#commercial";
    linksMenuLevel[j] = "1";
    j++;

    linksMenuItem[j] = "Flight Schools / FBOs";
    linksMenuURL[j] = "#schools";
    linksMenuLevel[j] = "1";
    j++;

    linksMenuItem[j] = "US Links";
    linksMenuURL[j] = "#usa";
    linksMenuLevel[j] = "1";
    j++;

    linksMenuItem[j] = "General / Other";
    linksMenuURL[j] = "#other";
    linksMenuLevel[j] = "1";
    j++;

    for (i = 0; i < linksMenuItem.length; i++) {
        document.write('<span class=\"submenu' + linksMenuLevel[i] + '\">');
        document.write('<a href=\"' + linksMenuURL[i] + '\">' + linksMenuItem[i] + '</a><br /></span>');
    }
}

/**
 *
 *  Displays the instructor's class, certifications, etc.
 *
 *  Note:  same functionality as displayInstructorInfo, used in
 *         1.2 and later versions of the system
 *
 * @param memberID - Instructor's member ID
 *
 */
function getInstructorInfo(memberID)
{
    //  Make sure we don't open this window twice, or put the info into it twice...

    var rootURL = "http://www.ofcbookings.kgbinternet.com/servlet/";

    if(infoWindow && !infoWindow.closed) infoWindow.close();

    var winWidth=350;
    var winHeight=350;
    var iMyWidth;
    var iMyHeight;

    //gets top and left positions based on user's resolution so prompt window is centered.

    iMyWidth = (window.screen.width/2) - ((winWidth / 2) + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
    iMyHeight = (window.screen.height/2) - ((winHeight / 2) + 50); //half the screen height minus half the new window height (plus title and status bars).

    //  Open a new window and build the HTML dynamically...

    var infoWindow = window.open(rootURL + "displayOFCInstructor?memberid=" + memberID,"InstructorInfo","status=no,height=" + winHeight + ",width=" + winWidth + ",resizable=yes,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no");
    infoWindow.focus();
}

/**
 *  Displays "'what' copyright (c) 2004, 'copyrightOwner'", showing current year
 */

function displayCopyright(what, copyrightOwner) {
    date = new Date();
    var year = date.getFullYear();

    document.write(what + ' copyright &copy;&nbsp;' + year + ', <em>' + copyrightOwner + '</em>');
}

//////////////////////////////
//
//	confirmCancelInstructorByAdmin() puts up the delete instructor booking "are you sure" confirmation
//	  Also includes member name and ID (not required if a member is cancelling his own booking)
//
//////////////////////////////

function confirmOpenFile(prompt, filename)
{
  //var prompt = "Please confirm that you want to CANCEL THIS BOOKING:";

  //if (alert(prompt)) {
    //window.location.href = servletURL + "?useraction=28&memberid=" + memberID + "&instructor=" + instructorID + "&slot=" + slot + "&latecancel=" + lateCancel + "&" + dateParams;
    alert(prompt);
    window.location.href = "http://www.ofc.ca/files/ofcwb.xls";
  //}
  //else {
  //  void(0);
  //}
}
