// JAVASCRIPT - - FIRST FIELD FOCUS / CHECK FORM FIELDS / NO RIGHT-CLICK

// "First Field Focus" script.

window.onload=function(){document.Mailform.FullName.focus()}

// "Check Required Form Fields" script. Set form and input names to match your form.

function CheckMailform(){
if(document.Mailform.FullName.value.length==0){alert('Please enter your name.');
document.Mailform.FullName.focus();return false}
if(document.Mailform.Email.value.length==0){alert('Please enter your email address.');
document.Mailform.Email.focus();return false}
if(isEmail(document.Mailform.Email.value)==false){alert('Please enter a valid email address.');
document.Mailform.Email.focus();return false}
if(document.Mailform.Comments.value.length==0){alert('Please enter a brief comment.');
document.Mailform.Comments.focus();return false}
// Captcha fields
if(document.Mailform.security_code.value.length==0){alert('Please enter the Security Code.');
document.Mailform.security_code.focus();return false}}
// Ends Captcha
function isEmail(str){
var supported=0;
if(window.RegExp){
var tempStr="a";
var tempReg=new RegExp(tempStr);
if(tempReg.test(tempStr)) supported=1}
if(!supported)
return (str.indexOf(".")>2)&&(str.indexOf("@")>0);
var r1=new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
var r2=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
return(!r1.test(str)&&r2.test(str))}



