DOM style object - borders?

im using this javascript function


function getStyle(el, styleProp) {
    var y;
    if (el.currentStyle) {
        y = el.currentStyle[styleProp];
    } else if (window.getComputedStyle) {
        var style = window.getComputedStyle(el, null);
        y = style[styleProp];
    }
    return y;
}

to get properties of any object that has styling applied in external stylesheets…and it works fine.

for instance, getStyles(source, “marginTop”); works perfectly…i can access any CSS property like this

BUT: why the hell doesnt getStyles(source, “borderTop”); or any other border-related properties return? any element i have that has borders defined on it, if i run my javascript function on it to check its borders, it returns nothing (undefined in IE)?

is this a bug? do borders not exist? whats going on?