

function colorMainNav () {
	var id="menu_home"
	var d = document;
	el = d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];

	var x = el.getElementsByTagName("SPAN");
	var b = document.location.href;
	var b_dir = b.substring (0, b.lastIndexOf ("/") + 1 )
	for (i=0;i<x.length;i++) {
		var a = x.item(i).firstChild.toString();
		if (a.substring (0, a.lastIndexOf ("/") + 1 ) == b_dir) {
			x.item(i).className += " nav_item_selected";
		}
	}
}

function colorSubNav () {
	var id="topnav"
	var d = document;
	el = d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];

	var x = el.getElementsByTagName("SPAN");
	var b = document.location.href;
	for (i=0;i<x.length;i++) {
		var a = x.item(i).firstChild.toString();
		//alert (a)
		if (a == b) {
			x.item(i).className += " topnav_item_selected"
		}
	}
}

function init() {
	colorMainNav();
	colorSubNav();
}
window.onload = init;
