<!--
namegood=0;
emailgood=0;
commentsgood=0;
addressgood=0;
//THE NAME//
function validateName()
{
	if(!document.details.name.value=="")
        {
        checkName()
        }
}
function checkName()
{ if (/([A-Z{1}a-z])+(\s{1})+([A-Z{1}a-z])/.test(document.details.name.value))
{namegood=1;
}
else
{alert("Your name must be in the format (John Smith)")
document.details.name.focus();
}
if(namegood==1 && emailgood==1 && commentsgood==1 && addressgood==1)
{
document.details.submitbutton.disabled=false;
}
}
//THE EMAIL//
function validateEmail()
{
	if(!document.details.email.value=="")
        {
        checkEmail()
        }
}
function checkEmail()
{ if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.(com|co.uk|org.uk|net|gov|uk.com|org|gov.uk))+$/.test(document.details.email.value))
{emailgood=1;
}
else
{alert("Your name must be in the format (you@youremail.com)")
document.details.email.focus();
}
if(namegood==1 && emailgood==1 && commentsgood==1 && addressgood==1)
{
document.details.submitbutton.disabled=false;
}
}
//THE COMMENTS//
function validateComments()
{
	if(!document.details.comments.value=="")
        {
        checkComments()
        }
}
function checkComments()
{  if (/[a-z]/.test(document.details.comments.value))
{commentsgood=1
}
else
{alert("Please enter your message")
document.details.comments.focus();
}
if(namegood==1 && emailgood==1 && commentsgood==1 && addressgood==1)
{
document.details.submitbutton.disabled=false;
}
}
//THE COMMENTS//
function validateAddress()
{
	if(!document.details.address.value=="")
        {
        checkAddress()
        }
}
function checkAddress()
{  if (/[a-z]/.test(document.details.address.value))
{addressgood=1
}
else
{alert("Please enter your address")
document.details.address.focus();
}
if(namegood==1 && emailgood==1 && commentsgood==1 && addressgood==1)
{
document.details.submitbutton.disabled=false;
}
}
//-->