function validate(reg)
{
	// Main function to validate the entire form in the client side.
	var flag
	flag=checkcontent(reg.Name, 2)
	if(!flag)
		return false
	flag = checkmail(reg.email)
	if(!flag)
		return false
	return true
}
