function validEmail(f) { var email; var name; name=f.firstName.value; email=f.email.value; // if (name=="") { alert("Please tell us your first name."); return false; } invalidChars = " /:,;" for (i=0; i -1) { alert("Sorry, please enter a valid email address."); return false } } atPos = email.indexOf("@",1) // there must be one "@" symbol if (atPos == -1) { alert("Sorry, please enter a valid email address."); return false } if (email.indexOf("@",atPos+1) != -1) { // and only one "@" symbol alert("Sorry, please enter a valid email address."); return false } periodPos = email.indexOf(".",atPos) if (periodPos == -1) { // and at least one "." after the "@" alert("Sorry, please enter a valid email address."); return false } if (periodPos+3 > email.length) {// must be at least 2 characters alert("Sorry, please enter a valid email address."); return false } return true } function openNewWin(url) { //alert("going to.."+url); cvWindow=window.open(url,'FourthRing','toolbar=no,location=no,scrollbars=no,resizable=no,width=455,height=338,screenX=10,screenY=20'); cvWindow.focus(); } // function to restrict any non-numeric key pressing function nn_Key() { if ((event.keyCode<48) || (event.keyCode>57)) event.keyCode = 0; } // function to restrict numeric function pp_Key(evt) { evt = (evt) ? evt : event; if (evt.keyCode==32) { return true; } var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0)); if (charCode > 31 && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122)) { event.keyCode=0; } } function navFrameWin(s) { var nwin = window.open('','SRCH_WIN','height=500,width=500,scrollbars,resizable,status,toolbar'); nwin.document.writeln(''); nwin.document.writeln(''); nwin.document.writeln(''); nwin.document.writeln(''); nwin.document.writeln(''); nwin.document.writeln(''); nwin.document.close(); nwin.focus(); } function ValidateCityState(){ if(document.CITYSTATE.city.value == "" || document.CITYSTATE.state.value == "") { alert("City and State are required."); return false; } else { return true; } }