/* Form Validator Author: Peter Tornstrand Homepage: http://www.tornstrand.com/scripts/javascript-form-validation/ Date: 2006-07-02 Version: 1.21 */ /* Set to false if you don't want the error messages */ var err = true; /* Set to true if you want modal javascript dialogues instead of DOM messages */ var modal = true; /* Browser detect, need's a little work */ var ie; if (navigator.appVersion.indexOf("MSIE")!=-1) { ie = true; } else { ie = false; } /** * Loops through the page forms and add's onSubmit events to forms * with the class name 'validate'. **/ var addOnSubmitEvent = function() { var frms = document.getElementsByTagName('form'); for (var i=0; i