sfHover = function() {
	if (document.getElementById("nav")) {
		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"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

sfHover2 = function() {
	if (document.getElementById("primarynav")) {
		var sfEls = document.getElementById("primarynav").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", sfHover2);

/**
 * Update the search input text box
 * @param focus
 */
function setSearchText(focus,txtSearchValue)
{
	var txtSearch = document.getElementById('txtSearch');
	var defaultValue = 'What are you looking for?';
	if (txtSearchValue) {
		defaultValue = txtSearchValue;
	} 
	if (focus) {
		if (txtSearch.value == defaultValue) {
			txtSearch.value = '';
		}
	} else {
		if (txtSearch.value == '') {
			txtSearch.value = defaultValue;
		}
	}
}
