/*
	TH._Styles object implementation
*/
function ThStyle( element )
{
	this._element = element;
}
ThStyle.prototype.read = function ( property )
{
	if (this._element.style[property])
	{
		return this._element.style[property];
	}
	else if (this._element.currentStyle)
	{
		return this._element.currentStyle[property];
	}
	else if (document.defaultView && document.defaultView.getComputedStyle) 
	{
		var style = document.defaultView.getComputedStyle(this._element, null);
		return style.getPropertyValue(property);
	} 
	else
	{
		return null;
	} 
}
ThStyle.prototype.write = function( property, pvalue )
{
	if (this._element.style[property] != null )
	{
		this._element.style[property] = pvalue;
	}
	else if (this._element.currentStyle != null)
	{
		this._element.currentStyle[property] = pvalue;
	}
	else if (document.defaultVIew && document.defaultView.getComputedStyle)
	{
				alert(pvalue);
		var style = document.defaultView.getComputedStyle(this._element, null);
		style.setPropertyValue(property,pvalue);
	}
}		