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;
		}
	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;
			}
		}
	return null;
}
