function getObjectByID( id, o )
{
	var c, el, els, f, m, n;
	if (!o) o = document;
	if (o.getElementById) el = o.getElementById(id); else 
		if (o.layers) c = o.layers; else
			if (o.all) el = o.all[id];
	if (el) return el;
	if (o.id==id || o.name==id) return o;
	if (o.childNodes) c = o.childNodes;
	if (c)
		for (n=0; n<c.length; n++)
		{
			el = getObjectByID(id,c[n]);
			if (el) return el;
		}; //for
	f = o.forms;
	if ( f )
		for (n=0; n<f.length; n++)
		{
			els = f[n].elements;
			for (m=0; m<els.length; m++)
			{
				el = getObjectByID(id,els[n]);
				if (el) return el;
			}; //for
		}; //for
	return null;
}; //func

function addEvent( obj, evType, fn )
{ 
	if ( obj.addEventListener )
	{
		obj.addEventListener(evType, fn, false);
		return true; 
	} else
	if ( obj.attachEvent )
	{
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	} else
	{ 
		return false; 
	}; //if
}; //func

function addBookmark( title, url )
{
	if ( document.all )
	{
		window.external.AddFavorite( url, title );
	} else
	if ( window.sidebar && window.sidebar.addPanel )
	{
		window.sidebar.addPanel( title, url, "" );
	} else
	if ( window.opera && window.print )
	{
		return true;
	}; //if
}; //func

function addInnerHTML( id, content )
{
	obj = getObjectByID( id );
	if ( obj && ( obj.innerHTML != "undefined" ) )
	{
		obj.innerHTML = obj.innerHTML + content;
	}; //if
}; //func
