var eml_val = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
function checkit(thisForm) {
if (thisForm.forename.value=="") {
alert("Please supply your forename.");
thisForm.forename.focus();
thisForm.forename.select();
return false;
}

if (thisForm.surname.value=="") {
alert("Please supply your surname.");
thisForm.surname.focus();
thisForm.surname.select();
return false;
}

if (thisForm.details.value=="") {
alert("Please supply a few details.");
thisForm.details.focus();
thisForm.details.select();
return false;
}

if (eml_val.test(thisForm.email.value) &! thisForm.email.value=="") {
thisForm.submit();
return true; }
else {
alert("Please supply a valid e-mail address.");
thisForm.email.focus();
thisForm.email.select();
return false;
}
}

function checkfb(thisForm) {
if (thisForm.forename.value=="") {
alert("Please supply your forename.");
thisForm.forename.focus();
thisForm.forename.select();
return false;
}

if (thisForm.surname.value=="") {
alert("Please supply your surname.");
thisForm.surname.focus();
thisForm.surname.select();
return false;
}

if (thisForm.workdate.value=="") {
alert("Please supply the date work was completed.");
thisForm.workdate.focus();
thisForm.workdate.select();
return false;
}

if (thisForm.details.value=="") {
alert("Please supply a few details.");
thisForm.details.focus();
thisForm.details.select();
return false;
}

if (eml_val.test(thisForm.email.value) &! thisForm.email.value=="") {
thisForm.submit();
return true; }
else {
alert("Please supply a valid e-mail address.");
thisForm.email.focus();
thisForm.email.select();
return false;
}
}

function checkjob(thisForm) {
if (thisForm.forename.value=="") {
alert("Please supply your forename.");
thisForm.forename.focus();
thisForm.forename.select();
return false;
}

if (thisForm.surname.value=="") {
alert("Please supply your surname.");
thisForm.surname.focus();
thisForm.surname.select();
return false;
}

if (thisForm.profession.value=="") {
alert("Please supply your profession.");
thisForm.profession.focus();
thisForm.profession.select();
return false;
}

if (thisForm.experience.value=="") {
alert("Please state your experience in years.");
thisForm.experience.focus();
thisForm.experience.select();
return false;
}

if (thisForm.details.value=="") {
alert("Please supply a few details.");
thisForm.details.focus();
thisForm.details.select();
return false;
}
}

function onField(txtfield) {
if (txtfield.value==txtfield.id)
txtfield.value = "";
txtfield.className='stdinputbox stdinputover'
}

function offField(txtfield) {
if (txtfield.value=="")
txtfield.value=txtfield.id;
if (txtfield.type=='text') {
txtfield.className='stdinputbox'
} else {
txtfield.className='stdinputboxc'
}
}

function onFieldNL(txtfield) {
if (txtfield.value==txtfield.id)
txtfield.value = "";
txtfield.className='stdinputbox stdinputover'
}

function offFieldNL(txtfield) {
if (txtfield.value=="")
txtfield.value=txtfield.id;
txtfield.className='stdinputbox'
}

function addToFavorites() {
var title="John Tolton Plastering";
var urlAddress="http://www.johntoltonplastering.co.uk";
if (window.sidebar) { 
window.sidebar.addPanel(title, self.location.href,""); 
} else if( document.all ) {
window.external.AddFavorite(self.location.href, title);
} else if( window.opera && window.print ) {
return true;
}
}
