/*
Initialisation and menu tab selection functions.
Author: Neil Peirce, January 2006
*/


function init(){
	// Highlight the currently selected menu tab
	if(highLightedTab != ""){
		var e=document.getElementsByTagName("li");
		for(var i=0;i<e.length;i++){
			if(e[i].id == highLightedTab){
				e[i].style.background = "url(images/tab_light.jpg) center right no-repeat"; 
			}
		}
	}
	// For Internet Explorer to enable the dropdown menus
	if(document.all){
		 menuHover();
	}
	
	// Break out of a frame if the page has been loaded into one
	if (top.location != location) {
    	top.location.href = document.location.href ;
  	}
}

menuHover = 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"), "");
		}
	}
}
