function Task_Variant_1(config)
{
	Task_Variant_1.superclass.constructor.call(this);
	
	this._baseElement = Rup.create("span");
	
	this._baseElement.innerHTML = '<input type="radio" name="' + config.groupName + '">';
	
	this._input = this._baseElement.firstChild;
	
	var oText = Rup.create("span");
	oText.innerHTML = config.text;
	
	this._baseElement.appendChild(oText);
}

Rup.extend(Task_Variant_1, Task_Variant_Abstract);

Task_Variant_1.prototype.setValue = function(value)
{
	if( value )
	{
		this._input.checked = true;
	}
	else
	{
		this._input.checked = false;
	}
}

Task_Variant_1.prototype.getValue = function()
{
	if (this._disabled)
		return this._savedValue;
	else
		return this._input.checked;
}

Task_Variant_1.prototype.setDisabled = function()
{
	this._savedValue = this._input.checked;
	this._disabled = true;
	var img = Rup.create('img');
	img.title = '';
	img.className = 'radioimg';
	if (this._savedValue)
	{
		img.src = '../../Icons/test/OneSelect.png';
		img.alt = '(x)';
	}
	else
	{
		img.src = '../../Icons/test/OneEmpty.png';
		img.alt = '( )';
	}
	this._input.parentNode.replaceChild(img, this._input);
	this._input = img;
}

Task_Variant_1.prototype.setHandler = function(handler, scope, num)
{
	this._input.onclick = function(){ handler.call(scope, num); return true;};
}

Task_Variant_1.prototype.setText = function(newText)
{
	this._baseElement.lastChild.innerHTML = newText;
}

Task_Variant_1.prototype.getText = function()
{
	return this._baseElement.lastChild.innerHTML;
}

Task_Variant_1.prototype.addTextClassName = function (newclassname)
{
	Rup.css.add(this._baseElement.lastChild, newclassname);
}