function highlightLink(element) {
    element.style.color = "red";
    //element.style.fontStyle = "italic";    
    //element.style.textDecoration = "none";
    
}

function unHighlightLink(element) {
    element.style.color = "blue";
    //element.style.fontStyle = "normal";    
    //element.style.textDecoration = "underline";
    
}      

function highlightButton(element) {
    element.style.color="blue";    
    //    element.style..fontSize="125%";
}

function unHighlightButton(element) {
    element.style.color="black";
    //    element.style.fontSize="100%";
    
}

function removeMessage(element) {
    var child = element.firstChild;
    if(child != null)
        element.removeChild(child)
}

// status, 0 = black, 1 = green, 2 = red, 3 = yellow
function changeMessage(element,message,status) {
    var textNode = document.createTextNode(message);
    removeMessage(element);
    if(status == 1)
        element.style.color = "green";
    else if (status == 2)
        element.style.color = "red"; 
    else if (status == 0)
        element.style.color = "black";
    else if(status == 3)
        element.style.color = "yellow";
    element.appendChild(textNode);
}

function getSingleCheckbox(elementName) {
    var none;
    var elements = document.getElementsByName(elementName)
    for(var x = 0; x < elements.length; x++) {
        var check = elements[x];
        none = elements[x];
        if (check.type == "checkbox") {
            none = elements[x];            
            break;        
        }
    }
    return none;
}

function highlightMenu(elementName) {
    document.getElementById(elementName).style.background = '#ffec9d';
}

function highlightSubMenu(elementName) {    
    document.getElementById(elementName).className = "current";
    document.getElementById(elementName).style.textDecorationUnderline = "true";
}