1 var currentStyle = function(element){ 2 return element.currentStyle || document.defaultView.getComputedStyle(element, null); 3 }