/* ----------------------------------------------------------------------------
	Style
---------------------------------------------------------------------------- */
var DeepStyle;

Deepend.Style = function() {
	/*
	setOpacity
	@eElement: The element to assign opacity.
	@iAmount: Amount of opacity (eg Setting amount to 0.5 is 50% opacity)
	*/
	this.setOpacity = function(eElement, iAmount) {
		this.eElement = eElement;
		if (oBrowser.IE)
			this.eElement.style.filter = "alpha(opacity=" + iAmount * 100 + ")";
		else
			this.eElement.style.opacity = iAmount;
	};
	
	/*
	setPNG
	@eElement: The element to assign png Bkg.
	@sImageSource: Path to png.
	@sSizingMethod: Repeat/No-Repeat (FF) or Scale/Image (IE).
		- Leave blank if repeat
	*/
	this.setPNG = function(eElement, sImageSource, sSizingMethod) {
		this.eElement = eElement;
		this.sImageSource = sImageSource;
		this.sSizingMethod = (sSizingMethod) ? sSizingMethod : "";
		if (oBrowser.IE) {
			this.sSizingMethod = (this.sSizingMethod == "no-repeat") ? "image" : "scale";
			this.eElement.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', src='" + this.sImageSource + "', sizingMethod='" + this.sSizingMethod + "')";
		} else
			this.eElement.style.background = "url(" + this.sImageSource + ") " + this.sSizingMethod;
	};
	
	/*
	getStyle
	@eElement: The element to get style from.
	@sStyle: Style Property to return.
	
	TODO
	still some quirks with combatibility like padding (padding-left compared to paddingLeft).
	Supposidly neither of these methods work for safari.
	*/
	this.getStyle = function(eElement, sStyle) {
		this.eElement = eElement;
		// array[0] is for FF, array[1] is for IE
		this.sStyle = sStyle.split(":");
		if (oBrowser.IE)
			return this.eElement.currentStyle[this.sStyle[0]];
		else
			return document.defaultView.getComputedStyle(this.eElement, null).getPropertyValue(this.sStyle[1]);
	};
};