function isNumber(val)
	if isNumeric(val.value) then
		isNumber = true
	else
		msgbox "This value must be numeric."
		val.focus()
		isNumber = false
	end if
end function

function isVerify(val)
	if Len(val.value)>0 then
		IsVerify = true
	else
		msgbox "Passwords do not match - please reenter"
		val.focus()
		isVerify = false
	end if
end function

function isLength(val)
	if len(val.value)>0 then
		isLength = true
	else
		msgbox "This value can't be empty."
		val.select
		isLength = false
	end if
end function

function isEmail(val)
	if isLength(val) then
	e = val.value
	if instr(e,"@")>0 and instr(e,".")>0 and len(e)>5 then
	isEmail = true
	else
	msgbox "Please enter a proper email address."
	val.select
	'val.focus()
	isEmail = false
	end if
	end if
end function

function isZip(val)
	isZip = false
	tVal = trim(val.value)
	if len(tVal)=5 then
		if isNumeric(tVal) then
			isZip = true
		end if
	elseif len(tVal)=10 then
		l5 = left(tVal,5)
		r4 = right(tVal,4)
		m1 = mid(tVal,6,1)
		if isNumeric(l5) and isNumeric(r4) and m1="-" then
			isZip = true
		end if
	end if
	if not isZip then
		msgbox "Please enter a valid Zip code."
		val.select
	end if		
end function

function isv1(val)
	isv1 = false
	tVal = trim(val.value)
	if len(tVal)=3 then
		if isNumeric(tVal) then
			isv1 = true
		end if
	'elseif len(tVal)=10 then
		'l5 = left(tVal,5)
		'r4 = right(tVal,4)
		'm1 = mid(tVal,6,1)
		'if isNumeric(l5) and isNumeric(r4) and m1="-" then
			'isZip = true
		'end if
	end if
	if not isv1 then
		msgbox "Please enter a valid 3 digit area code."
		'val.focus()
		val.select
	end if		
end function

function isv2(val)
	isv2 = false
	tVal = trim(val.value)
	if len(tVal)=3 then
		if isNumeric(tVal) then
			isv2 = true
		end if
	'elseif len(tVal)=10 then
		'l5 = left(tVal,5)
		'r4 = right(tVal,4)
		'm1 = mid(tVal,6,1)
		'if isNumeric(l5) and isNumeric(r4) and m1="-" then
			'isZip = true
		'end if
	end if
	if not isv2 then
		msgbox "Please enter a 3 digit number."
		'val.focus()
		val.select
	end if		
end function

function isv3(val)
	isv3 = false
	tVal = trim(val.value)
	if len(tVal)=4 then
		if isNumeric(tVal) then
			isv3 = true
		end if
	'elseif len(tVal)=10 then
		'l5 = left(tVal,5)
		'r4 = right(tVal,4)
		'm1 = mid(tVal,6,1)
		'if isNumeric(l5) and isNumeric(r4) and m1="-" then
			'isZip = true
		'end if
	end if
	if not isv3 then
		msgbox "Please enter a 4 digit number."
		'val.focus()
		val.select
	end if		
end function