// -----------------------------------------------------------------------------
// File: jimkelly.be.js
//
// Description: JScript functions.
// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
// onBodyLoad()
//		Handles the ONLOAD event of the BODY section.
// -----------------------------------------------------------------------------
function onBodyLoad() {
	// Set default status bar text
	defaultStatus = "JimKelly.Be";

	return true;
}

// -----------------------------------------------------------------------------
// onGuysAndThingsLoad()
//		Handles the ONLOAD event of the BODY section for Guys and Things.
//
// Parameters
//		strElement: The element to which to forward focus
// -----------------------------------------------------------------------------
function onGuysAndThingsLoad(strElement) {
	// Forward focus to element
	// W3C DOM-compliant browser
	if (document.getElementById)
		if (document.getElementById(strElement))
			document.getElementById(strElement).focus();
	// Internet Explorer 4
	else if (document.all)
		if (document.all[strElement])
			document.all[strElement].focus();
	// Netscape 4
	else if (document.layers)
		if (document.layers[strElement])
			document.layers[strElement].focus();

	return true;
}

// -----------------------------------------------------------------------------
// onKeyDown()
//		Handles the ONKEYDOWN event of the BODY section.
//
// Parameters
//		strElement: The element to which to forward focus
// -----------------------------------------------------------------------------
function onKeyDown(strElement) {
	// Enable <Enter> key submissions
	if (strElement && (event.keyCode) == 13)
		// W3C DOM-compliant browser
		if (document.getElementById)
			document.getElementById(strElement).focus();
		// Internet Explorer 4
		else if (document.all)
			document.all[strElement].focus();
		// Netscape 4
		else if (document.layers)
			document.layers[strElement].focus();

	return true;
}

// -----------------------------------------------------------------------------
// onMouseOver()
//		Handles the ONMOUSEOUT and ONMOUSEOVER events of hyperlinks.
//
// Parameters
//		strID: The ID of the hyperlink
//		strColor: The new color of the hyperlink (can be null)
//		strText: The text to display in the status bar (can be null)
//		strBorder: The type of border to display around an image (can be null)
// -----------------------------------------------------------------------------
function onMouseOver(strID, strColor, strText, strBorder) {
	// Set status bar text
	if (strText)
		status = strText;
		
	// Set text color
	if (strColor)
		document.getElementById(strID).style.color = strColor;

	// Set image border
	if (strBorder)
		document.getElementById(strID).style.borderStyle = strBorder;

	return true;
}

// -----------------------------------------------------------------------------
// onTwentyNineSearchLoad()
//		Handles the ONLOAD event of the BODY section for 29Search.
//
// Parameters
//		strElement: The element to which to forward focus
// -----------------------------------------------------------------------------
function onTwentyNineSearchLoad(strElement) {
	// Forward focus to element
	// W3C DOM-compliant browser
	if (document.getElementById)
		if (document.getElementById(strElement))
			document.getElementById(strElement).focus();
	// Internet Explorer 4
	else if (document.all)
		if (document.all[strElement])
			document.all[strElement].focus();
	// Netscape 4
	else if (document.layers)
		if (document.layers[strElement])
			document.layers[strElement].focus();

	return true;
}