javascript in JSP

Iam getting "object expected error" when running this JSP file in Tomcat, at the point where i called validateRMDealerContacts(). In the code given below i called validateRMDealerContacts() in th if statement. Can anyone pls help me.