<!-- Begin
usedarray = new Array();

// Array size

function getarraysize(thearray)
{
	for (i = 0; i < thearray.length; i++)
	{
		if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
		{
			return i;
		}
	}

	return thearray.length;
}

// Array push

function arraypush(thearray, value)
{
	thearray[getarraysize(thearray)] = value;
}

// Array pop

function arraypop(thearray)
{
	thearraysize = getarraysize(thearray);
	retval = thearray[thearraysize - 1];
	delete thearray[thearraysize - 1];
	return retval;
}


function showHideTemplate(entryID, htmlObj, linkType)
{
	extTextDivID = ('extText' + (entryID));
	extLinkDivID = ('extLink' + (entryID));

	if (linkType == 'close')
	{
					clear_state();
				htmlObj.blur();
	}
	else
	{
		document.getElementById(extTextDivID).style.display = "block";
		document.getElementById(extLinkDivID).style.display = "none";
					clear_state();
			arraypush(usedarray, entryID);

		htmlObj.blur();
	}
}

// Clear state

function clear_state()
{
	if (usedarray[0])
	{
		while (usedarray[0])
		{
			eID = arraypop(usedarray);

			extTextDivID = ('extText' + (eID));
			extLinkDivID = ('extLink' + (eID));

			document.getElementById(extTextDivID).style.display = "none";
			document.getElementById(extLinkDivID).style.display = "block";
		}
	}
}
// End -->
