// JavaScript Document
function BlendedObject(objName)
{
	this.opacityLevel = 0;
	this.timeIn = null;
	this.timeOut = null;
	this.obj = document.getElementById(objName);
	this.objName = objName;
	this.width = 0;
	this.height = 0;
	
	this.getWidth = function()
	{
		return this.obj.offsetWidth;
	}
	
	this.getHeight = function()
	{
		return this.obj.offsetHeight;		
	}
	
	this.SetOpacityToZero = function()
	{
		var self = this;
		self.opacityLevel = 0;
		self.obj.style.KhtmlOpacity = 0;
		self.obj.style.MozOpacity = 0;
		self.obj.style.filter = "alpha(opacity=0)";
	} // end method
	
	this.BlendingIn = function()
	{
		var self = this;
		clearTimeout(self.timeOut);
		clearTimeout(self.timeIn);
		self.obj.style.visibility = "visible";
		self.timeIn = setInterval(function(){
			
		if(self.opacityLevel < 100)
		{
			self.opacityLevel = (self.opacityLevel) + 5;
		} // end if
		else
		{   
		    self.opacityLevel = 100;
			clearTimeout(self.timeIn);
		} // end else
		
		self.obj.style.KhtmlOpacity = (self.opacityLevel)/100;
		self.obj.style.MozOpacity = (self.opacityLevel)/100;
		self.obj.style.filter = "alpha(opacity=" + self.opacityLevel + ")";
		
		},1);
		
	} // end method
	
	
	
	this.BlendingOut = function()
	{
		var self = this;
		clearTimeout(self.timeIn);
		clearTimeout(self.timeOut);
		self.timeOut = setInterval(function(){
			
		if(self.opacityLevel > 0)
		{
			self.opacityLevel = (self.opacityLevel) - 5;
		} // end if
		else
		{
			
			clearTimeout(self.timeOut);
			self.opacityLevel = 0;
		    self.obj.style.visibility = "hidden";
		}
		self.obj.style.KhtmlOpacity = (self.opacityLevel)/100;
		self.obj.style.MozOpacity = (self.opacityLevel)/100;
		self.obj.style.filter = "alpha(opacity=" + self.opacityLevel + ")";
		
		},1);
	} // end method
	
	
	
} //end class
