var currentArrow = "arrowSubject";// Set the initial arrow to show

function rollon(itemName) {
	if (itemName.tagName == "TR") {
		itemName.style.backgroundColor = "#FFEFA5";
	} else if (itemName.tagName == "TH") {
		if ((window.event.toElement != null) && (window.event.fromElement != null)) {
			if ((window.event.fromElement.id != currentArrow) && (window.event.toElement.id != currentArrow)) {
				itemName.style.cursor = "hand";
				itemName.style.borderTopColor = "BUTTONHIGHLIGHT"
				itemName.style.borderLeftColor = "BUTTONHIGHLIGHT"
			}
		} else {
			itemName.style.cursor = "hand";
			itemName.style.borderTopColor = "BUTTONHIGHLIGHT"
			itemName.style.borderLeftColor = "BUTTONHIGHLIGHT"
		}
	}
	window.event.cancelBubble = true;// Stop the event from bubbling up the hierarchy
}

// The rolloff() function handles the changing of colors and cursors
// when the mouse leaves a header or record.  "itemName" is a 
// reference to the ID of the column clicked.
// If the tag is a TR then change the background color of the row to the
// background color of the window.
function rolloff(itemName) {
	if (itemName.tagName == "TR") {
		itemName.style.backgroundColor = "#DBDBD9";
	} else if (itemName.tagName == "TH") {
		if ((window.event.toElement != null) && (window.event.fromElement != null)) {
			if ((window.event.toElement.id != currentArrow) && (window.event.fromElement.id != currentArrow)) {
				itemName.style.cursor = "auto";
				itemName.style.borderTopColor = "BUTTONFACE"
				itemName.style.borderLeftColor = "BUTTONFACE"
			}
		} else {
			itemName.style.cursor = "auto";
			itemName.style.borderTopColor = "BUTTONFACE"
			itemName.style.borderLeftColor = "BUTTONFACE"
		}
	}
	window.event.cancelBubble = true;// Stop the event from bubbling up the hierarchy
}
