// Function for getting object style

function getStyle (element, property)
{
    if (element. style[property])
	{
        return element. style[property];
    }
	else if (element. currentStyle)
	{
        return element. currentStyle[property];
    }
    else if (typeof document. defaultView. getComputedStyle != undefined)
	{
        property = property. replace(/([A-Z])/g, "-$1");
        property = property. toLowerCase();
        return document. defaultView. getComputedStyle (element, "") &&  document. defaultView. getComputedStyle (element, ""). getPropertyValue (property);
    } else {
        return null;
    }
}
