function ColorChange()
{
	var thisObject = this;
	this.sTColor = '#000000';
	this.sAColor = '#646450';
	this.bTColor  = true
	this.makeColorChangeVisible = function()
	{
		if (document.getElementById("ColorChange").style.display == "block")
		{
			document.getElementById("ColorChange").style.display = "none";
		}
		else
		{
			document.getElementById("ColorChange").style.display = "block";
		}
	}
	
	this.noTColor = function()
	{
		thisObject.bTColor = false;
	}
	
    this.makeWhite = function(color)
    {
		var sRed   = color.substr(0, 2);
		var sGreen = color.substr(2, 2);
		var sBlue  = color.substr(4, 2);
		
		if (sRed != 'FF' && sGreen != 'FF' && sBlue != 'FF')
		{			
			if ((sRed != sGreen && sRed != sBlue && sGreen != sBlue) || sRed.substr(0, 1) < 9)
			{
				return true;
			}
		}
		
		return false;
    }
	
	this.mC = function(color)
	{
		document.getElementById("ColorChangeArea").style.backgroundColor = '#' + color;
		
		if (thisObject.bTColor == true)
		{
			if (thisObject.makeWhite(color) == true)
			{
				thisObject.sTColor = '#ffffff';
				thisObject.sAColor = '#ffffff';
			}
			else
			{
				thisObject.sTColor = '#000000';
				thisObject.sAColor = '#646450';
			}
			
			document.getElementById("ColorChangeArea").style.color = thisObject.sTColor;
			
			for (var i = 0; i < document.getElementById("ColorChangeArea").getElementsByTagName("a").length; i++)
			{
				document.getElementById("ColorChangeArea").getElementsByTagName("a")[i].style.color = thisObject.sAColor;
			}
		}
	}
	
	this.ArticleMouseOver = function(element)
	{
		element.style.backgroundColor = '#efefed';
		element.style.border = '3px solid #646450';
		element.style.color = '#000000';
		element.getElementsByTagName("a")[1].style.color = '#646450';
		
		if (document.all)
		{
			element.style.padding= '2px';
		}
		else
		{
			element.style.margin='0';
		}
	}
	
	this.ArticleMouseOut = function(element)
	{
		element.style.backgroundColor = '';
		element.style.border = '0';
		element.style.color = '';
		element.getElementsByTagName("a")[1].style.color = thisObject.sAColor;
		
		if (document.all)
		{
			element.style.padding='5px';
		}
		else
		{
			element.style.margin='3px';
		}
	}
}