function MM_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 = MM_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 = MM_getObjectByID(id, els[m]);
 				if (el)
 					return el;
 			}
 		}
 	}
 		
 	return null;
}

function changeStyle(id, style)
{
	var o;
	
	o = MM_getObjectByID(id);
	
	if (o)
	{
		o.className = style;
	}
}


function createNavButton(btn_id, btn_text, btn_tooltip, btn_url, is_active)
{
	if (is_active)
	{
		document.writeln('<span id="' + btn_id + '" class="nav_left_btn_over">- ' + btn_text + ' -</span>');
	}
	else
	{
		document.writeln('<a style="color: #000000; text-decoration: none;" onMouseover="this.style.textDecoration=\'underline\'; this.style.cursor=\'hand\';" onMouseout="this.style.textDecoration=\'none\'; this.style.cursor=\'auto\';" href="' + btn_url + '" title="' + btn_tooltip + '"><span id="' + btn_id + '" class="nav_left_btn" onMouseover="changeStyle(this.id, \'nav_left_btn_over\')" onMouseout="changeStyle(this.id,\'nav_left_btn\')" onMousedown="changeStyle(this.id,\'nav_left_btn_pressed\')" onMouseup="changeStyle(this.id,\'nav_left_btn_over\')">' + btn_text + '</span></a>');
	}
}
