// use javascript for icons functions as they are javascript based
// also change the title of the link if js is enabled
window.onload = function() {
	if (document.getElementById) {
		
////////rollover effect on some images
		var images = document.getElementsByTagName("img");
		for (var y=0; y<images.length; y++){
			if(images[y].className == 'rollover'){
				images[y].onmouseover = function(){
					if(this.src.match('.gif')){ this.src = this.src.replace(/.gif/, "_o.gif"); }
					else if(this.src.match('.jpg')){ this.src = this.src.replace(/.jpg/, "_o.jpg");}
				}
				images[y].onmouseout = function(){ 
					if(this.src.match('.gif')){ this.src = this.src.replace(/_o.gif/, ".gif"); }
					else if(this.src.match('.jpg')){ this.src = this.src.replace(/_o.jpg/, ".jpg");}
				}
			}
		}

////////popup navigation menus
		if(window.attachEvent){// window.attachevent is IE only
			var sfEls = document.getElementById("nav").getElementsByTagName("LI");
				for (var x=0; x<sfEls.length; x++) {
					sfEls[x].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfEls[x].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
		}
	}
//search highlighting
highlight();
}
