function submitcheck() {

var theMessage = "Please complete the following: \n-----------------------------------\n";
var noErrors = theMessage


if (document.addlisting.postcode.value=="") {
theMessage = theMessage + "\n --> Please fill in your postcode";
}

if (document.addlisting.submitter.value=="") {
theMessage = theMessage + "\n --> Please fill in your Name";
}

if (document.addlisting.businessname.value=="") {
theMessage = theMessage + "\n --> Please fill in your business name";
}

if (document.addlisting.building.value=="") {
theMessage = theMessage + "\n --> Please fill in your building no/name";
}

if (document.addlisting.line1.value=="") {
theMessage = theMessage + "\n --> Please fill in the first line of your address";
}

if (document.addlisting.town.value=="") {
theMessage = theMessage + "\n --> Please fill in your town";
}

if (document.addlisting.county.value=="") {
theMessage = theMessage + "\n --> Please fill in your county";
}

if (document.addlisting.phone.value=="") {
theMessage = theMessage + "\n --> Please fill in your phone number";
}

if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.addlisting.email.value)){
theMessage = theMessage + "\n --> Please enter a valid e-mail address";
}

if (document.addlisting.category.value == 0 ) {
theMessage = theMessage + "\n --> Please select a category from the list";
}


// If no errors, submit the form
if (theMessage == noErrors) {
return true;

} else {

// If errors were found, show alert message
alert(theMessage);
return false;
}
}

