changeTheClass, with bonus IE workaround
I’ll let this one speak for itself:
function changeTheClass(theElement, theClass)
{
if(document.getElementById(theElement))
{
document.getElementById(theElement).setAttribute('class',theClass);
document.getElementById(theElement).setAttribute("className",theClass); //IE workaround
}
}