sfHover = function() {
	var sfEls = document.getElementById("mainmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

sfArrow = function() {
	var sfEls = document.getElementById("mainmenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		if (sfEls[i].getElementsByTagName("UL").length > 0) {
			var arrow = null;
			if (document.createElement&&document.documentElement) {
				arrow = document.createElement('span');
				arrow.appendChild(document.createTextNode('\u00BB'));
				arrow.className = 'subind';
			}
			sfEls[i].firstChild.appendChild(arrow);
		}
	}
}
if (window.attachEvent) {
	window.attachEvent("onload", sfHover);
	window.attachEvent("onload", sfArrow);
}
else if (window.addEventListener) {
	window.addEventListener("load", sfArrow, false);
}
