/* author: ykchee@yahoo.com */
/* Generated by AceHTML Freeware http://freeware.acehtml.com */
/* Creation date: 4/4/2004 */
// CREDITS:
// Dirty Form-Check
// by Urs Dudli and Peter Gehrig 
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 2/29/2000

// IMPORTANT: 
// If you add this script to a script-library or script-archive 
// you have to add a link to http://www.24fun.ch on the webpage 
// where this script will be running.


var submitcount=0;
var valid = "0123456789";

function checkFields(field) {                       // field validation -
var emailPat = /^(\".*\"|[A-Za-z]\w*)@(\[\d{1,3}(\.\d{1,3}){3}]|[A-Za-z]\w*(\.[A-Za-z]\w*)+)$/;
var matchArray = field.match(emailPat);


if (document.feedbackform.email.value=="") {
alert("Please enter your email address.")
document.feedbackform.email.focus();
return false
}
if (matchArray == null) {
alert("Your email address seems incorrect.  Please try again (check the '@' and '.'s in the email address)");
document.feedbackform.email.focus();
return false;
}
// make sure the IP address domain is valid
var IPArray = matchArray[2].match(/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/);
if (IPArray != null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!")
document.feedbackform.email.focus();
return false;
      }
   }
}
}
//-->