Functions Using Javascript To Validate