//-- D.Rothe-www.exsiteweb.com
//-- 19/04/2002
//-------------------------
//-- Begin field validation

function Reset() {
document.forms[0].elements[0].focus();
}
function submitForms() {
if ( (isName() ) && (isEmail()) &&  (isComment()))
if (confirm(""+document.forms[0].Name.value+"\nyou are ready to e-mail the form?\n\nClick on OK to submit.\nClick on CANCEL to abort."))
{
}
else
{
alert("\n"+document.forms[0].Name.value+" you have chosen to cancel the submission.");
return false;      
}
else
return false;
}
function isName() {
var str = document.forms[0].Name.value;
if (str == "") {
alert("\nThe NAME field is blank.\n\nPlease enter your name.")
document.forms[0].Name.focus();
return false;
}
for (var i = 0; i < str.length; i++) 
{
var ch = str.substring(i, i + 1);
if (((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && ch != ' ') 
{
alert("\nThe NAME field only accepts letters & spaces.\n\nPlease re-enter your name.");
document.forms[0].Name.select();
document.forms[0].Name.focus();
return false;
   }
}
return true;
}
function isEmail()
{
if (document.forms[0].Email.value == "") {
alert("\nThe E-MAIL field is blank.\n\nPlease enter your e-mail address.")
document.forms[0].Email.focus();
return false; 
}
if (document.forms[0].Email.value.indexOf ('@',0) == -1 || 
document.forms[0].Email.value.indexOf ('.',0) == -1)
{
alert("\nIncorrect E-mail format.\n\nPossible cause @ or . missing.\n\nPlease re-enter your e-mail address.")
document.forms[0].Email.select();
document.forms[0].Email.focus();
return false;
}
else
{
return true;
}
}

function isComment() {
if (document.forms[0].Comment.value == "") {
if (confirm("\n"+document.forms[0].Name.value+"\nDo you want to Submit without leaving a comment.\n\nClick on CANCEL to include a comment.\nor\nClick on OK to Submit without a comment.")) 
return true
else
{
document.forms[0].Comment.focus();
return false;      
}
}
else
return true   
}


// End -->
