function suckerfish(type, tag, parentId) {
	var sfEls = (parentId==null)?document.getElementsByTagName(tag):document.getElementById(parentId).getElementsByTagName(tag);
	type(sfEls);
}	

sfHover = function(sfEls) {
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onmousedown=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		// event added to keep menu items from disappearing
		sfEls[i].onmouseup=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
		}
	}
}


// based on script from shauninman.com

function formInitialValues() {
	d = document;
	if (d.getElementById) {
		theInput = d.getElementById("q");
		theInput.defaultValue = theInput.value;
		theInput.onfocus = clearInitialValues
		theInput.onblur = resetInitialValues
	}
}
function clearInitialValues() {
	if (this.value == this.defaultValue) {
		this.value = "";
		}
	}
function resetInitialValues() {
	if (this.value == "") {
		this.value = this.defaultValue;
		}
	this.blur();
	}

start = function() {
	startList("globalNav");
	startList("sideBar");
	tableruler();
//	document.Search_Form.q.focus();
}
function startList(id) {
//	if (document.all&&document.getElementById) {
		navLI = document.getElementById(id).getElementsByTagName("LI");
		for (i=0; i<navLI.length; i++) {
			node = navLI[i];
			node.onmouseover=function() {
				this.className+="over";
			}
			node.onmouseout=function() {
				this.className=this.className.replace("over", "");
			}	
}	}	//}

function tableruler() {
	if (document.getElementById && document.createTextNode) {
		var tables=document.getElementById('content').getElementsByTagName('table');
		for (var i=0;i<tables.length;i++) {
			if(tables[i].className.indexOf('fancy')!=-1) {
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++) {
					if (trs[j].className.length == 0) {
						if (j%2==1) {
								trs[j].className = 'alt';
								trs[j].onmouseover=function(){this.className='hilited';return false}
								trs[j].onmouseout=function(){this.className='alt';return false}
						} else {
							trs[j].onmouseover=function(){this.className='hilited';return false}
							trs[j].onmouseout=function(){this.className='';return false}
}	}	}	}	}	}	
formInitialValues();
suckerfish(sfHover, "div", "search-box");
}

window.onload=start;