﻿
		
		
		sfHover = function() {
	if (!document.getElementsByTagName) return false;
  //do something
	var sfEls = document.getElementById("navmain").getElementsByTagName("li");
	// if you only have one main menu - delete the line below
	if (document.getElementById("navsection"))
	{ var sfEls1 = document.getElementById("navsection").getElementsByTagName("ul"); } 
	// 

	//
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" over";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
	// if you only have one main menu - delete the "for" loop below //
	 if (document.getElementById("navsection"))
	{ for (var i=0; i<sfEls1.length; i++) {
		sfEls1[i].onmouseover=function() {
			this.className+=" oversection";
		}
		sfEls1[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" oversection\\b"), "");
		}
	 }
	}
	//
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
		
		
		//* BEGIN CHECKFIELDS: PREVENTS SPAM IN WEBMAIL FORMS *//
		function checkfields(){ 

		/* Getting values and making it all lower case so it cannotnget past the checking system */
		var box1=document.required.realname.value.toLowerCase();
		var box2=document.required.email.value.toLowerCase();
		var box3=document.required.message.value.toLowerCase();

		// Spam that a user might enter
		var spam1="href=";
		var spam2="http:";
		var spam3="<";
		var spam4=">";

		/* Determining if the boxes are empty or if they contain spam */

		// .indexOf() checks all of the text in a box for any matches
		if (box1.indexOf(spam1) > -1 || box1.indexOf(spam2) > -1 || box1.indexOf(spam3) > -1 || box1.indexOf(spam4) > -1 ){alert('To discourage abuse by spammers, the following characters and combinations are not allowed: "<", ">", "http:" and "href=". Please re-type your NAME and submit again. ');return false;}
		if (box2.indexOf(spam1) > -1 || box2.indexOf(spam2) > -1 || box2.indexOf(spam3) > -1 || box2.indexOf(spam4) > -1 ){alert('To discourage abuse by spammers, the following characters and combinations are not allowed: "<", ">", "http:" and "href=". Please re-type your EMAIL and submit again. ');return false;}
		if (box3.indexOf(spam1) > -1 || box3.indexOf(spam2) > -1 || box3.indexOf(spam3) > -1 || box3.indexOf(spam4) > -1 ){alert('To discourage abuse by spammers, the following characters and combinations are not allowed: "<", ">", "http:" and "href=". Please re-type your MESSAGE and submit again. ');return false;}
		}
		//* END CHECKFIELDS: PREVENTS SPAM IN WEBMAIL FORMS *//
