
var prevColor = '#e5e5e5';

function getElement(the_id) {
    
    if (typeof the_id != 'string') {
        return the_id;
    }

    if (typeof document.getElementById != 'undefined') {
        return document.getElementById(the_id);
    } else if (typeof document.all != 'undefined') {
        return document.all[the_id];
    } else if (typeof document.layers != 'undefined') {
        return document.layers[the_id];
    } else {
        return null;
    }
}

function imageSwitch (control, sImageURL) {
	control.src = sImageURL;	
}

function highlight (ctrl, bOn)
{
    if (bOn)
    {
        prevColor = ctrl.style.backgroundColor;
        ctrl.style.backgroundColor = '#eeeeee';
    }
    else
    {
        //ctrl.style.backgroundColor = '#e5e5e5';
        ctrl.style.backgroundColor = prevColor;
    }
}

