// Display a document in a popup window, used for "more info" pages.
function DisplayMoreInfo(docPopup) {
	foo = window.open(docPopup, 'MoreInfoWindow', 'scrollbars,resizable,width=390,height=380');
	foo.focus()
}

// Trim leading and trailing spaces from a string
function Trim(strIn) {
	var i
	var firstNonBlank = 0
	var lastNonBlank = -1
	for (i = 0; i < strIn.length; i++) {
		if (strIn.charAt(i) != ' ') {
			firstNonBlank = i
			break
		}
	}
	for (i = strIn.length - 1; i > -1; i--) {
		if (strIn.charAt(i) != ' ') {
			lastNonBlank = i
			break
		}
	}
	return strIn.substring(firstNonBlank, lastNonBlank + 1)
}

// Find a form field. Dotnet sticks extra stuff into the form field names, 
// eg txtName becomes ctl0_:ctl1:txtName, this routine will return a reference
// to the field by calling GetField("txtName").
function GetField(strName) {
	for (var i=0; i < document.forms[0].elements.length; i++) {
		if (document.forms[0].elements[i].name.indexOf(strName) > 0) {
			return document.forms[0].elements[i]
		}
	}
	return ""
}

