// (c) 1996-2010 USA Deaf Sports Federation Inc.

//
// EmailMaker(string sTopLevel, string sDomain, string sName, string sSubject)
//
// Purpose: Obfuscates an email address to fool web harvesters.
// Date:    22 Dec 2004
// By:      John Knetzger
// Rev:     1.0
//

function EmailMaker(sTopLevel, sDomain, sName, sSubject) {
    var strAddr = sName + '@' + sDomain + '.' + sTopLevel;
    var strHTML = '<a' + ' href="mail' + 'to:' + strAddr + '?subject=' + sSubject + '">' + strAddr + '</' + 'a>';

    return strHTML;
}


//
// GetCopyRight()
//
// Purpose: Returns the boilerplate copyright information.
// Date:    23 Dec 2004
// By:      John Knetzger
// Rev:     1.1
//

function GetCopyRight() {
    return "&copy 1996-2010 USA Deaf Sports Federation Inc. All Rights Reserved.";
}


//
// BuildLeftNavBar()
//
// Purpose: Builds the navigation bar along the left side of the screen.
// Date:    07 Mar 2005
// By:      John Knetzger
// Rev:     1.0
//
// Param List:
//
// isRoot = 1 (    root folder)
// isRoot = 0 (not root folder)

function BuildLeftNavBar(isRoot) {

    var sRoot = "";
    if (isRoot == 0) {
        sRoot = "../";
    }

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'index.html">Home</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'about.html">About USADSF</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'athletes.html">Athletes</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'halloffame.html">Hall of Fame</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'events.html">Events</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'sports.html">Sports</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'members.html">Members</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

  //document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'Insurance/index.html">Insurance</a></td></tr>');
  //document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'sponsors.html">Sponsors</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'news.asp">News & Media</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'faq.html">FAQ</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'links.html">Links</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'contact.html">Contact Us</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');

    document.write('<tr><td width="141" height="21" valign="top" align="left">&nbsp;&nbsp;&nbsp;<a class="menulink" href="' + sRoot + 'sitemap.html">Site Map</a></td></tr>');
    document.write('<tr><td width="141" height="1"  valign="top" align="left"><img src="' + sRoot + 'graphics/white_menu_line.gif" alt="" width="141" height="1" hspace="0" vspace="0" border="0" align="left"></td></tr>');
}


//
// BuildTopNavBar()
//
// Purpose: Builds the navigation bar along the top side of the screen.
// Date:    19 Mar 2005
// By:      John Knetzger
// Rev:     1.0
//
// Param List:
//
// isRoot = 1 (    root folder)
// isRoot = 0 (not root folder)
//
// sType = indicator of which menu array to use ("About", "AOY", "HOF", "HOFNames", "Sports").
//
// inActivePage = indicator of which menu item is the active page (start at 0, ...).

function BuildTopNavBar(isRoot, sType, intActivePage) {

    var sRoot = "";
    if (isRoot == 0) {
        sRoot = "../";
    }


    var AboutList = new Array(
        "about.html",                  "Overview",
        "links/usadsf_org.pdf",        "Constitution-Bylaws",
        "about_executive.html",        "Executive Board",
        "about_committees.html",       "Committees",
        "about_awards.html",           "Awards");

    var AoYList = new Array(
        "athletes.html",               "Overview",
        "athletes_participation.html", "Participation Criteria",
        "athletes_spotlight.html",     "Athletes of the Year",
        "athletes_nomination.html",    "How to Nominate");

    var HoFList = new Array(
        "halloffame.html",             "Hall of Fame",
        "halloffame_athletes.asp",     "Inductees",
        "halloffame_nomination.html",  "How to Nominate");

    var HoFNamesList = new Array(
        "halloffame_athletes.asp",     "Athletes",
        "halloffame_coaches.asp",      "Coaches &amp; Officials",
        "halloffame_leaders.asp",      "Sport Leaders &amp; Writers");

    var SportList = new Array(
        "sports.html",                 "Affiliated Sports",
        "sports_criteria.html",        "Affiliation Criteria",
        "sports_panamdes.html",        "Pan American Deaf Games");

    var WWGD1999List = new Array(
        "index.html",                  "Main Page",
        "skiing.html",                 "Skiing",
        "snowboarding.html",           "Snowboarding",
        "icehockey.html",              "Ice Hockey",
        "committee.html",              "Committee");

    var Baseball2000List = new Array(
        "index.html",                  "Main Page",
        "announcement.html",           "Announcement",
        "results.html",                "Results",
        "roster.html",                 "Roster",
        "sponsors.html",               "Sponsors");

    var offset = intActivePage * 2;
    var myArray = new Array();

    if (sType == "About")
        myArray = AboutList;
    else
    if (sType == "AOY")
        myArray = AoYList;
    else
    if (sType == "HOF")
        myArray = HoFList;
    else
    if (sType == "HOFNames")
        myArray = HoFNamesList;
    else
    if (sType == "Sports")
        myArray = SportList;
    else
    if (sType == "WWGD1999")
        myArray = WWGD1999List;
    else
    if (sType == "Baseball2000")
        myArray = Baseball2000List;

    for (i = 0; i < myArray.length; i++) {
        document.write('[ ');

        if (i == offset) {
            document.write('<font color="#999999">' +
                           myArray[i+1] +
                           '</font>');
        }
        else {
            document.write('<a href=' + sRoot +
                           myArray[i] +
                           '><font color="#0000FF">' +
                           myArray[i+1] +
                           '</font></a>');
        }

        document.write(' ] ');

        i++; // skip html file in array for next loop.
    }
}
