/**
 * @author Pawel Lytko
 */

function Service_reset()
{
	this._background_color_text = "";
	this._color_label = "";
	
	this.set_background_color = function(p_background_color)
	{
		try
		{
			this._background_color_text = typeof p_background_color == "string" ? p_background_color : "";
		}
		catch (object_exception)
		{
			this._background_color_text = "";
		}
	}
	
	this.run_reset = function(p_index)
	{
		var i = 0;
		try
		{
			if (typeof p_index == "number" && parseInt(p_index) >= 0 && typeof this._background_color_text == "string")
			{
				while (document.forms[parseInt(p_index)].elements.length > i)
				{
					if (document.forms[parseInt(p_index)].elements[i].type == "text" || document.forms[parseInt(p_index)].elements[i].type == "textarea")
					{
						document.forms[parseInt(p_index)].elements[i].style.backgroundColor = this._background_color_text;
					}
					i++;
				}
			}
		}
		catch (object_exception)
		{
		}
	}
}
