function islength(val)
	if len(val.value)>0 then
		islength=true
	else
		val.select
		islength=false
	end if
end function

function isnumber(val)
	if isnumeric(val.value) then
		isnumber=true
	else
		val.select
		isnumber=false
	end if 
end function

function isvaliddate(val)
	if isdate(trim(val.value)) then
		isvaliddate=true
	else
		msgbox("Please enter a valid date")
		val.select
		isvaliddate=false
	end if
end function

function isemail(val)
	e=val.value
	if instr(e,"@") and instr(e,".")>0 and len(e)>5 then
		isemail=true
	else
		msgbox("Please enter a valid e-mail address")
		val.select
		isemail=false
	end if 
end function

function issame(val1,val2)
	if (val1.value = val2.value) then
		issame=true
	else
		msgbox("The new password and confirm password entered by you does not match")
		val1.select
		val2.select
		issame=false
	end if
end function

function isnotbig(val)
	if len(val.value)<50 then
		isnotbig=true
	else
		val.select
		isnotbig=false
	end if
end function
