Вы можете получить строку из element.style.cssText и разделить ее на
function styleObject(element){
var obj= {},
str= element.style.cssText.match(/([^:]+\: *[^;]+); */g),
tem, i= 0, ax, L= str.length;
while(i<L){
tem= str[i++].split(/: */);
obj[tem[0]]= tem[1];
}
return obj;
}
// ПРИМЕР-
styleObject (elementreference);
/* value: (Object)
{
display: 'block;',
margin-left: '1ex;',
margin-right: 'auto;',
position: 'relative;',
width: '1193px;',
z-index: '100;',
visibility: 'visible;'
}
Но почему бы просто не использовать строку cssText в качестве значения?