// JavaScript Document
function sameHeight (myArray) {
	if (myArray.length != 0) {
		if (document.getElementById) {
			var maxHeight = 0;
			for (var i = 0; i < myArray.length; i++) {
				// Let's determine the maximum height out of all columns specified
				var col = document.getElementById(myArray[i]);
				if (col.offsetHeight > maxHeight) maxHeight = col.offsetHeight;
			}
			for (var i = 0; i < myArray.length; i++) {
				var col = document.getElementById(myArray[i]);
				col.style.height = maxHeight + 'px';
				// Now, if the browser's in standards-compliant mode, the height property
				// sets the height excluding padding, so we figure the padding out by subtracting the
				// old maxHeight from the new offsetHeight, and compensate!  So it works in Safari AND in IE 5.x
				if (col.offsetHeight > maxHeight) {
					col.style.height = (maxHeight - (col.offsetHeight - maxHeight)) + 'px';
				}
			}
		}
	}
}

/* Note: for IE, "className" is used instead of "class" */
function stripeTables () {
	if (document.getElementsByTagName) {
		var tables = document.getElementsByTagName("table");
		for (var i = 0; i < tables.length; i++) {
			var tableRows = tables[i].getElementsByTagName("tr");
			// See if there is a table cell in teh first row - need to account for header col
			var headers = tableRows[0].getElementsByTagName("td");
			if (headers.length == 0) {
				var headRow = true;
			} else {
				var headRow = false;
			}
			for (var j = 0; j < tableRows.length; j++ ) {
				var row = tableRows[j];
				if (j % 2) {
					if (!headRow) {
						row.className = "even";
					} 
				} else {
					if (j > 0 && headRow) {
						// alert (row.getAttribute('class'));
						row.className = "even";
					}
				}
			}
		}
	}	
}

function markHereMultiple (navElementType, navElementClass) {
	// find the nav elements
	var lists = document.getElementsByTagName(navElementType);
	
	for (var i = 0; i < lists.length; i++) {
		if (lists[i].className == navElementClass) {
			var navElement = lists[i];
			// Find the anchors in the  navElement
			var anchors = navElement.getElementsByTagName("a");
			for (var j = 0; j < anchors.length; j++) {
				// Test to see what the href is
				if (anchors[j].href == document.URL) {
					// Make the class here if it href == name of page
					anchors[j].className = "here";
				}
			}
		}
	}
}	
function test () {
	
}
