Object.mix = function(obj,attr){ if(obj==null){obj={}} if(attr==null){attr={}} for(var i in attr){ obj.style.setProperty(i,attr[i],null); } }