document.write(""); function check(e){ if(document.images){ re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/; re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (!e.match(re) && e.match(re_two)) { return (-1); } } } function checkMess(){ f = document.askF; curr = f.message.value.length; f.chars.value = 2000 - curr; if(f.message.value.length >= 2000){ f.message.value = f.message.value.substring(0, 2000 -1); } } function checkF(f){ if(f.cat.selectedIndex < 1){ alert("Please select a Category"); f.cat.style.background = "yellow"; f.cat.focus(); return false; } if(f.fname.value.length < 1){ alert("Please enter your First Name"); f.fname.style.background = "yellow"; f.fname.focus(); return false; } if(f.lname.value.length < 1){ alert("Please enter your Last Name"); f.lname.style.background = "yellow"; f.lname.focus(); return false; } if(!check(f.email.value)){ alert("Invalid e-mail address detected"); f.email.style.background = "yellow"; f.email.focus(); return false; } if(f.message.value.length < 1){ alert("Please enter a Message"); f.message.style.background = "yellow"; f.message.focus(); return false; } if(f.capcode.value.length < 1){ alert("Please enter the Security Code"); f.capcode.style.background = "yellow"; f.capcode.focus(); return false; } }