<link href="style.css" type="text/css" rel="stylesheet">
</head>
<script LANGUAGE="JavaScript">
<!--
function validateform(){
if (document.Form.name.value == ''){
alert('Please enter a name.');
document.Form.name.focus();
return false;
}
if (document.Form.email.value == '' || document.Form.email.value == null){
alert("Please enter an email address.");
document.Form.email.focus();
return false;
}
if (!emailcheck(document.Form.email.value)){
alert("Invalid email address.");
document.Form.email.focus();
document.Form.email.select();
return false;
}
if (document.Form.message.value == ''){
alert('Please enter a message.');
document.Form.message.focus();
return false;
}
return true;
}
function emailcheck(str){
accept = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
for (h=0; h < str.length ;h++){
if (accept.indexOf(str.charAt(h))<0){
return (false);
}
}
if (document.images){
pat = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
pat_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
if (!str.match(pat) && str.match(pat_two)){
return (-1);
}
}
}
//-->
</script>