function getComputed (obj){
try{
return getComputedStyle(obj, null)
} catch(e){
return obj.currentStyle;
}
};
или
function getComputed (obj){
if ( obj.ownerDocument && obj.ownerDocument.defaultView ) {
return obj.ownerDocument.defaultView.getComputedStyle( obj, null );
} else if ( obj.currentStyle ) {
return obj.currentStyle;
}
return null;
}