// JavaScript Document

/* getElementByClass */

var allHTMLTags = new Array();

function getElementByClass(theClass) {

//Create Array of All HTML Tags
var allHTMLTags=document.getElementsByTagName("*");

//Loop through all tags using a for loop
for (x=0; x<allHTMLTags.length; x++) {

//Get all tags with the specified class name.
if (allHTMLTags[x].className=="nav") {

//Place any code you want to apply to all pages with the class specified. In this example is to “display:none;” them Making them all disappear on the page.

var navClass=allHTMLTags[x];

//}
//}
//}

sfHover = function() {
	var sfEls = navClass.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);

//EventOn - changes colors in div class="event"
function eventOn() {
	dv=document.getElementsByTagName('div');
	for(c=0;c<dv.length;c++) {
		if(dv[c].className=='content') {
			dv[c].onmouseover=function() {
				this.className+=(this.className.length>0? " ": "") + "contentOn";
			}
			dv[c].onmouseout=function() {
				this.className=this.className.replace(new RegExp("( ?|^)contentOn\\b"), "");
			}
		}
	}
}
onload=eventOn;

}
}
}
