has anyone used this javascript validation

the validation works fine in most browsers except for safari on a mac
i have the javascript file that is needed in the same folder as the html file and also i have the javascript code in the html page where it is needed

only in safari and chrome on a mac the form validation is not working

please advice