To include JavaScript form validation in your Smart Capture form, place the functions in the <body> element within a <script> element. You must place the functions here because you do not have access to the <head> element. However, the functionality should be the same for form validation.
If you would like to use the Google AJAX API library, see the form validation support information on this page:
http://docs.dojocampus.org/dijit/index
The library itself is available here:
http://code.google.com/apis/ajaxlibs/documentation/index.html