function setStyle(elem, styles) {
    var property;
    for (property in styles) {[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?
var elem = document.getElementById('db_getMessage'); = "#FCC url(/photos/warning.jpg) top left no-repeat"; = "2px solid #C99"; = "Arial, Verdana, \"Trebuchet MS\""; = "11pt"; = "#333"; = "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?