Code:
function setStyle(elem, styles) {
    var property;
    for (property in styles) {
        elem.style[property] = styles[property];
    }
}

setStyles(document.getElementById('db_getMessage'), {
    "background" : "#FCC url(/photos/warning.jpg) top left no-repeat",
    "border" : "2px solid #C99",
    "fontFamily" : "Arial, Verdana, \"Trebuchet MS\"",
    "fontSize" : "11pt",
    "color" : "#333",
    "display" : "block"
});
Why couldn't you just do this?
Code:
var elem = document.getElementById('db_getMessage');
elem.style.background = "#FCC url(/photos/warning.jpg) top left no-repeat";
elem.style.border = "2px solid #C99";
elem.style.fontFamily = "Arial, Verdana, \"Trebuchet MS\"";
elem.style.fontSize = "11pt";
elem.style.color = "#333";
elem.style.display = "block";
Don't you get the prototype overhead when sending objects to functions like this? I know the second one accomplishes the same thing but does it directly. The first one is more organized and ::LOOKS:: like better code, but what are the benefits to doing it that way? I would think it would charge more processing time.

Can someone give me an example where this would be more useful and efficient besides using it to set css properties as above?

Thanks