function Task_Link( nodeXML, panel, iNumber )
{
	Task_Link.superclass.constructor.call(this);

	this._prevLink = undefined;
	this._nextLink = undefined;

	this._number = iNumber;
	
	this._classNames = {
        unanswered: "unanswered",
        answered: "answered",
        current: "current",
        error: "error"
    };
	
	this.panel = panel;
	
	this._setBaseElement(Rup.create('div'));
	
	this._params = {};
	
	this._params.id = nodeXML.getAttribute('id');
	this._params.type = nodeXML.getAttribute('type');
	this._params.title = nodeXML.getAttribute('title');
	
	this._answer = Rup.create('span');
	this._baseElement.appendChild(this._answer);
	
	this._link = Rup.create('a');
	this._link.innerHTML = this._params.title;
	
	this._link.href = '#';
	
	this._baseElement.appendChild(this._link);
	
	this._answered = false;
	
	this.setUnanswered();
	this.removeHandler();
	
	this.right = undefined;
}

Rup.extend(Task_Link, Element_Abstract);

Task_Link.prototype.setClass = function( classInd )
{
	this._link.className = this._classNames[ classInd ];
}

Task_Link.prototype.getClass = function()
{
	return this._link.className;
}

Task_Link.prototype.setUnanswered = function()
{
	this.setClass('unanswered');
}

Task_Link.prototype.setCurrent = function()
{
	this._prevClass = this.getClass();
	this.setClass('current');
}

Task_Link.prototype.setAnswered = function( right )
{
	this._answered = true;
	if( right != undefined )
	{
		this._answer.innerHTML = right;
		this._answer.className = StylesOfMastery.getStyleName(right);
		this.right = right;
	}
	
	this.setClass('answered');
	this._prevClass = this.getClass();
}

Task_Link.prototype.setError = function()
{
	this._answered = true;
	this.setClass('error');
}

Task_Link.prototype.setPrevClass = function()
{
	this._link.className = this._prevClass;
}

Task_Link.prototype.addHandler = function()
{
	var instance = this;
	this._link.onclick = function() { instance.showTask(); return false; }
}

Task_Link.prototype.removeHandler = function()
{
	this._link.onclick = function(){ return false; }
}

Task_Link.prototype.showTask = function()
{
	this.panel.showTask( this._number );
}