
/**
 * File "effects.js"
 * Fancy Javascript effects
 */

/**
 * Function "lightUp"
 * Highlight main links in the header
 */

function lightUp (which) {

    if (document.getElementById)

        switch (which) {

            case 1:
                document.getElementById ("mainLink1").className = "link1Active";
                break;

            case 2:
                document.getElementById ("mainLink2").className = "link2Active";
                break;

        }

}

/**
 * Function "turnOff"
 * Remove highlight from main links in the header
 */

function turnOff (which) {

    if (document.getElementById)

        switch (which) {

            case 1:
                document.getElementById ("mainLink1").className = "";
                break;

            case 2:
                document.getElementById ("mainLink2").className = "";
                break;

        }

}

/**
 * Function "setSearch"
 * Clean the search field for the user
 */

function setSearch () {

    if (document.getElementById) {
        document.getElementById ("s").value = "";
        document.getElementById ("s").className = "";
    }

}

/**
 * Function "unsetSearch"
 * Put the search prompt back in the search field
 */

function unsetSearch () {

    if (document.getElementById) {
        document.getElementById ("s").value = "";
        document.getElementById ("s").className = "inactiveSearch";
        document.getElementById ("s").value = document.getElementById ("searchPrompt").innerHTML;
    }

}

// EOF

