


var EksendiaTagHints = function()
{
	this.allTags = true;
	this.txtBox = '';
	this.spanLen = 0;
	this.applyColor = function(txtBox, MainID, howManySpans, colorPink, colorWhite)
	{
		var tag = '';
		var i, c;
		var id = '';
		var txt = '';
		var arrTxt = null;
		var pink, white;

		this.txtBox = txtBox;
		if (colorPink == null)
			pink = 'pink';
		else
			pink = colorPink;
		if (colorWhite == null)
			white = 'white';
		else
			white = colorWhite;
		if (inStr(txtBox.value, ",") != -1)
			arrTxt = txtBox.value.split(',');
		else
			arrTxt = new Array(trim(txtBox.value));
		for (i = 0; i < howManySpans; i++)
		{
			id = MainID + "_" + i;
			tag = trim(document.getElementById(id).innerHTML);
			txt = trim(arrTxt[arrTxt.length - 1]);
			if (inStr(LCase(tag), LCase(txt)) == 0)
			{
				if (txt != "")
				{
					if (LCase(txt) != LCase(tag))
					{
						document.getElementById(id).style.backgroundColor = pink;
					}	
					else
					{
						document.getElementById(id).style.backgroundColor = white;
					}
				}
				else
				{
					document.getElementById(id).style.backgroundColor = white;
				}
			}
			else
			{
				document.getElementById(id).style.backgroundColor = white;
			}
		}
	}


	this.applyTxt = function(obj)
	{
		var arrTxt, i;
		this.txtBox.focus();
		var txt = this.txtBox.value;
		if (txt == undefined)
			return;
		if (inStr(txt, ",") != -1)
			arrTxt = txt.split(',');
		else
			arrTxt = new Array(txt);
		arrTxt[arrTxt.length - 1] = obj.innerHTML;
		this.txtBox.value = "";
		for (i = 0; i < arrTxt.length; i++)
		{
			if (this.allTags)
			{
				this.txtBox.value += trim(arrTxt[i]) + ", ";
			}
			else
			{
				this.txtBox.value = trim(obj.innerHTML);
			}
		}
		if (!animato.isVB)
			this.txtBox.focus();
	}
}



