<!--
function validateString(myfield, s) {
	if (notNull(myfield.value) && notBlank(myfield.value)) 
		return true
	else {
		myfield.focus()
		alert("Please enter " + s + "!")
		return false
	}
}

function notNull(str) {
	if (str.length == 0)
		return false
	else 
		return true
}

function notBlank(str) {
	for (var i = 0; i < str.length; i++) {
		if (str.charAt(i) != " ")
			return true
	}
	return false
}

function isDigits(str) {
	for (var i = 0; i < str.length; i++) {
		mychar = str.charAt(i)
		if (mychar < "0" || mychar > "9")
			return false
	}
	return true
}

function isNumber(str) {
	numdecs = 0
	for (var i = 0; i < str.length; i++) {
		mychar = str.charAt(i)
		if ((mychar >= "0" && mychar <= "9") || mychar 
			== ".") {
			if (mychar == ".")
				numdecs++
		}
		else 
			return false
	}
	if (numdecs > 1)
		return false	
	return true
}

function trimstr( str )
{
	var newstr = "";
	for (var i = 0; i < str.length; i++) {
		if (str.charAt(i) != " ")
			newstr = newstr + str.charAt(i);
	}
	return newstr;
}

function ValidEmail(email) {
	invalidChars = " /:,;"
	
	if (email == "") {
		return false
	}
	
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar, 0) > -1) {
			return false
		}
	}
	
	atPos = email.indexOf("@", 1)
	if (atPos == -1) {
		return false
	}
	
	if (email.indexOf("@", atPos + 1) > -1) {
		return false
	}
	
	periodPos = email.indexOf(".", atPos)
	if (periodPos == -1) {
		return false
	}
	
	if (periodPos + 3 > email.length) {
		return false
	}
	
	return true
}

//-->