cross-browser way of getting element's style property
function getStyle (element, property) {
  if (window.getComputedStyle) {
    return getStyleProperty(element, property).original;
  } else if (element.currentStyle) {
    return element.currentStyle[property];
  }
  return null;
}