function init() {
   document.body.style.height = document.documentElement.scrollHeight+'px';
}

function getAbsY(elm) {
	if (elm.y) return elm.y;
	pos = 0;

	while (elm != null) {
		pos += elm["offsetTop"];
		elm = elm.offsetParent;
	}

	return pos;
}

function submitForm(formObj) {
	// TODO: Probably have a check for netscape or IE here
	formObj.submit();
} // submitForm



// Remove leading and trailing whitespace from a string
function trimWhitespace(string) {
	var newString  = '';
	var substring  = '';
	beginningFound = false;
	
	// copy characters over to a new string
	// retain whitespace characters if they are between other characters
	for (var i = 0; i < string.length; i++) {
		
		// copy non-whitespace characters
		if (string.charAt(i) != ' ' && string.charCodeAt(i) != 9) {
			
			// if the temporary string contains some whitespace characters, copy them first
			if (substring != '') {
				newString += substring;
				substring = '';
			}
			newString += string.charAt(i);
			if (beginningFound == false) beginningFound = true;
		}
		
		// hold whitespace characters in a temporary string if they follow a non-whitespace character
		else if (beginningFound == true) substring += string.charAt(i);
	}
	return newString;
}

function gotoLink(sel)
{			
	window.location = sel.options[sel.selectedIndex].value;		
}