﻿
//this function is used to highlight the main nav item for the section the user is in
function highlightMainNavItem(sItemID)
{
    document.getElementById(sItemID).setAttribute("class", "current");
    document.getElementById(sItemID).setAttribute("className", "current");
}

//these functions are used to clear the text in a text box on focus
function trim(stringToTrim) {
    return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function clearText(textBox, defaultValue, currentValue) 
{
    if (trim(currentValue) == defaultValue)
    {
        textBox.value = '';
    }
}
function replaceText(textBox, defaultValue, currentValue) 
{
    if (trim(currentValue) == '')
    {
        textBox.value = defaultValue;
    } else {
        textBox.value = trim(textBox.value);
    }
}
