//We have form validation and other stuff.. function validatefilename (form, strmessage ) { // see http://www.thesitewizard.com/archive/validation.shtml // for an explanation of this script and how to use it on your // own website // ** START ** if (form.the_file.value == "") { alert( strmessage ); form.the_file.focus(); return false ; } // ** END ** return true ; } // If the length of the element's string is 0 then display helper message function isEmpty(elem, helperMsg) { if(elem.value.length == 0){ alert(helperMsg); elem.focus(); // set the focus to this input return false; } return true; } function codeCheck(prefix, elementcount, helperMsg) { var i, j; var X = new Array(); for (i=0; i<=elementcount; i++) { j = document.getElementById(prefix+i); if (j != undefined) {X.push(j.value);} } if (arrHasDupes(X)) { alert(helperMsg); return false; } return true; } function arrHasDupes( A ) { // finds any duplicate array elements using the fewest possible comparison var i, j, n; n=A.length; // to ensure the fewest possible comparisons for (i=0; i