// 60mmt common JavaScript Document

// allow li to have "on hover" drop down in navigation
sfHover = function() {
	var sfEls = document.getElementById("nav").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"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


// remove dotted outline on active links in ie8 (pos others too)
//if (document.documentElement.attachEvent)    
//document.documentElement.attachEvent('onmousedown',function(){         
//event.srcElement.hideFocus=true   
//});

//function keeps max length from being exceeded in text areas
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

