function isemail( string ) { var pattern = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; return pattern.test( string ); } function checkbox_one_checked( form, fname ) { var el, grp, e=0; while( el = form.elements[e++] ) { if( el.type=='checkbox' && el.name && el.name==fname ) { grp = form[el.name]; for( var i=0; i 2200 ) { missingfields += "\n- Testimonial (Max. chars: 2200)"; } } else { missingfields += "\n- Testimonial (Missing field)"; } if( !checkbox_one_checked(form, 'f9[]') ) { missingfields += "\n- I Agree (No option checked)"; } if( missingfields != "" ) { alert( "The following fields are incorrect:\n" + missingfields ); return false; } else { var accepted = true; accepted = confirm( "Your files are going to be uploaded now. \nDepending on the size of these files and \nyour internet connection, this may take \nsome time. Please be patient. \n" ); if( accepted == true ) { form.submit.disabled = true; } return accepted; } }