// DOM Style Controls - by Paul @ Yellow Pencil .com
function scriptInit() {
if (!document.getElementById) {
	return;
	}
}
function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
	elm.addEventListener(evType, fn, useCapture);
	return true;
	} else if (elm.attachEvent) {
	var r = elm.attachEvent('on' + evType, fn);
	return r;
	} else {
	elm['on' + evType] = fn;
	}
}
function checkActive() {
 var b = document.getElementById ("menu");
 var c = null;
 
 /* check that nav id has elements */
 if (b != null) 
 {
  c = b.getElementsByTagName("a");
	 if (window.location.href.substr(location.href.length - 1, 1) == '/') {
	  var loc = window.location.href + 'index.html'; 
	 }
	 else {
	  var loc = window.location.href;
	 }
	 for(var i=0; i < c.length; i++) {
	  
	  if (c[i].href == loc) {
	   c[i].setAttribute("class", "sectionnav_selected");
	   c[i].setAttribute("className", "sectionnav_selected");
	  }
	 }
 } 
}addEvent(window, 'load', checkActive, false);