

function ElementWithLink( o, e, url, name, opt )
{
	if ( document.getElementById )
	{
		a	= o.id.substring( 1 );
		p	= "";
		r	= "";
		g	= e.target;

		if ( g )
		{
			t = g.id;
			f = g.parentNode;

			if ( f )
			{
				p = f.id;
				h = f.parentNode;

				if ( h ) r = h.id;
			}
		}
		else
		{
			h = e.srcElement;
			f = h.parentNode;

			if ( f ) p = f.id;

			t = h.id;
		}

		if ( t == a || p == a || r == a )
			return true;

		if ( url )
			window.open( url, name, opt );
		else
		{
			if ( document.getElementById( a ).getAttribute( 'target' ) == '_blank' )
				window.open( document.getElementById( a ).href );
			else if ( document.getElementById( a ).getAttribute( 'onclick' ) != '' && typeof (openWin = document.getElementById( a ).onclick) == "function" )
				openWin();
			else
				top.location.href = document.getElementById( a ).href;
		}
	}// end: if
}// end: function
