/* Redundant, already included in lib.js
var ua = navigator.userAgent.toLowerCase();
		isIE = ((ua.indexOf("msie") != -1) && (ua.indexOf("opera") == -1) && (ua.indexOf("webtv") == -1)); 
function getByID( id, doc )
{
    if ( doc == null ) doc = 'document';

    if (eval(doc).getElementById) {
	// Newer browsers
	return eval(doc).getElementById(id);
    } else if (eval(doc).all) {
	// IE4
	return eval(doc).all[id];
    } else if (eval(doc).layers) {
	// NS4
	return eval(doc).layers[id];
    } else {
	alert( 'We couldn\'t recognize your browser.  Please use a different one or upgrade to the newest version.' );
	window.close();
    }
	return "";
}
*/

function mouseover( id )
{
	getByID( id ).style.display="";
}
function mouseover2( obj )
{
	
	var objs = obj.getElementsByTagName("table");
	for (var j=0; j < objs.length; j++) {
		if (objs[j].className='menu') {
			mouseover(objs[j].id);
		}
	}
}

function mouseout2( obj )
{
	
	var objs = obj.getElementsByTagName("table");
	for (var j=0; j < objs.length; j++) {
		if (objs[j].className='menu') {
			mouseout(objs[j].id);
		}
	}
}


function mouseout( id )
{	
	getByID( id ).style.display="none";
}

function definemenu( )
{
	var tds=getByID("menu").getElementsByTagName("td");
	for(var i=0;i< tds.length;i++) {
		var a_td=tds[i];
		if (a_td.className=="menuover") {
			var menus=a_td.getElementsByTagName("table");

			for(var j=0;j< menus.length;j++) {
				var a_menu=menus[j];

				if (a_menu.className=="menu") {
					a_menu.onmouseover=function () {mouseover(this.id)};
					a_menu.onmouseout=function () {mouseout(this.id)};
					var cells=a_menu.getElementsByTagName("td");

					for(var k=0;k< cells.length;k++) {
						var a_cell = cells[k];
						a_cell.onmouseover=function() {this.style.backgroundColor="#C8CFD9"; this.style.color="#3F4B5E"; this.style.fontWeight="normal";}
						a_cell.onmouseout=function() {this.style.backgroundColor=""; this.style.color=""; this.style.fontWeight="";}
					}
					//if(!isIE) { /* This conditional isn't necessary */
						
					//	a_td.onmouseover=eval("function () {mouseover('" + a_menu.id + "')}");
					
					//	a_td.onmouseout=eval("function () {mouseout('" + a_menu.id + "')}");
					//} else {
						a_td.onmouseover = function() {mouseover2(this)};				
						a_td.onmouseout = function() {mouseout2(this)};				
							
											
					//}
					a_td.style.postion='relative';
					
				}
				
			}
		}
	}
}

