// JavaScript Document
function IsCurrentPage(Row) {
	if (location.href.indexOf('/'+Row.id+'.')>=0 || location.href.indexOf('/'+Row.id2+'.')>=0 || location.href.indexOf('/'+Row.id3+'.')>=0) {
		return true;
	} else {
		return false;
	}
}

function MenuOverRow(Row) {
	if (document.all && !Row.contains(event.fromElement)) {
		if (IsCurrentPage(Row)) {
			Row.className=Row.parentElement.parentElement.id + 'CurItemMouseOver';
		} else {
			Row.className=Row.parentElement.parentElement.id + 'ItemMouseOver';
		}
	}
}

function MenuOutRow(Row) {
	if (document.all && !Row.contains(event.toElement)) {
		if (IsCurrentPage(Row)) {
			Row.className=Row.parentElement.parentElement.id + 'CurItem';
		} else {
			Row.className=Row.parentElement.parentElement.id + 'Item';
		}
	}
}

function InitMenu(Table) {
	var CurRowIndex=0;

	while (CurRowIndex<=Table.rows.length-1) {
		var Row=Table.rows[CurRowIndex];
		if (Table.rows[CurRowIndex].id=='') {
			//Do nothing
		} else if (IsCurrentPage(Row)) {
			Table.rows[CurRowIndex].className=Table.id + 'CurItem';
		} else {
			Table.rows[CurRowIndex].className=Table.id + 'Item';
		}
		CurRowIndex=CurRowIndex+1;
	}
}


