
var curpath =	location.pathname;
var a = curpath.lastIndexOf("/");
curpath = curpath.substr(a + 1);

var menu =	new Object();

menu.home =	new Object();
menu.home.on =	new Image();
menu.home.on.src = "graphics/home1.jpg";
menu.home.off =	new Image();
menu.home.off.src = "graphics/home0.jpg";
menu.home.path = "index.shtml";

menu.about =	new Object();
menu.about.on =	new Image();
menu.about.on.src = "graphics/about1.jpg";
menu.about.off = new Image();
menu.about.off.src = "graphics/about0.jpg";
menu.about.path = "about.shtml";

menu.bwatch =	new Object();
menu.bwatch.on =	new Image();
menu.bwatch.on.src = "graphics/blockwatch1.jpg";
menu.bwatch.off =	new Image();
menu.bwatch.off.src = "graphics/blockwatch0.jpg";
menu.bwatch.path = "blockwatch.shtml";

menu.police =	new Object();
menu.police.on =	new Image();
menu.police.on.src = "graphics/police1.jpg";
menu.police.off =	new Image();
menu.police.off.src = "graphics/police0.jpg";
menu.police.path = "police.shtml";

menu.news =	new Object();
menu.news.on =	new Image();
menu.news.on.src = "graphics/news1.jpg";
menu.news.off =	new Image();
menu.news.off.src = "graphics/news0.jpg";
menu.news.path = "news.shtml";

menu.contact =	new Object();
menu.contact.on =	new Image();
menu.contact.on.src = "graphics/contact1.jpg";
menu.contact.off =	new Image();
menu.contact.off.src = "graphics/contact0.jpg";
menu.contact.path = "contact.shtml";

if (curpath == "") {
	curpath = menu.home.path;
}

if (curpath == "policewatch.shtml" || curpath == "policecancelwatch.shtml" || curpath == "thankscancel.shtml") {
	curpath = menu.police.path;
}

function rollOn(cur) {
	if (document.images) {
		if (menu[cur].path !== curpath) {
			document[cur].src = menu[cur].on.src;
		}
	}
}

function rollOff(cur) {
	if (document.images) {
		if (menu[cur].path !== curpath) {
			document[cur].src = menu[cur].off.src;
		}
	}
}

function menuItem(cur) {
	var imgsrc;
	if (menu[cur].path == curpath) {
		imgsrc = menu[cur].on.src;
	}
	else {
		imgsrc = menu[cur].off.src;
	}
	document.write('<a href = "' + menu[cur].path + '" onMouseOver = "rollOn(\'' + cur + '\')" onMouseOut = "rollOff(\'' + cur + '\')"><img src="' + imgsrc + '" width="150" height="55" border="0" name="' + cur + '"></a>');
}
