﻿function initHyperLink(elm)
{
	if (elm._init) // links excluded from common initialization
		return elm;

	if (window._hyperLinkFunctions == null)	{
		window._hyperLinkFunctions = 
		{
			getText: function()		{return this.innerHTML;},
			setText: function(val)	{this.innerHTML = val;}		
		};
	}
	
	// add interfaces
	elm = extendElement(elm);	
	elm = Object.extend(elm, window._hyperLinkFunctions);

	// intialize
	if (!elm.href)
		elm.href = "javascript:try {" + elm.id + "_OnClick();} catch (e) {displayErr('HyperLink_OnClick', e)}"; 
	elm._init = true;

	return elm;
}


