/* begin nav */
function initnav(obj) {
	if (document.getElementById && document.getElementById(obj)) {
		navRoot = document.getElementById(obj);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			// make sure drop downs don't extend past 990
			if (node.offsetLeft > 775) {
				var adjust = 775-node.offsetLeft;
				for (var j=0; j<node.childNodes.length; j++) {
					if (node.childNodes[j].nodeName.toUpperCase() == 'UL') {
						node.childNodes[j].style.left = adjust+'px';
					}
				}
			}
			node.onmouseover = function() {
				if (this.className.indexOf('lo') != -1) {
					if (this.className.indexOf('solid') != -1) {
						this.className = 'hi solid';
					} else {
						this.className = 'hi';
					}
				}
			}
			node.onmouseout = function() {
				if (this.className.indexOf('hi') != -1) {
					if (this.className.indexOf('solid') != -1) {
						this.className = 'lo solid';
					} else {
						this.className = 'lo'
					}
				}
			}
		}
	}
}
/* end nav */

/* begin CJ JS For Search Box 1/22/07*/
function swapSearch(type) {
	if (type != null) {
		// Set form action
		document.searchBox.page.value = getSearchAction(type);

		// Clear CSS styles
		document.getElementById('searchBox-ESPN').className="none";
		document.getElementById('searchBox-Photos').className="none";
		document.getElementById('searchBox-Video').className="none";

		// Highlight what user clicked
		setTimeout(function(){document.getElementById('searchBox-'+type).className="realm";},100);
	}
}
function getSearchAction(type) {
	action="espn";
	if (type == "Photos") {
		action = "images"
	}
	else if (type == "Video") {
		action = "multimedia";
	}
	return action;
}
/* end CJ JS For Search Box 1/22/07*/

function gotosite(loc) {
	if(loc != null && loc != '') {
		location.href = loc;
		//window.location = loc;
	}
}