function validate_details()
{
//PICK UP CUSTOMER DETAILS
var firstname = window.document.forms.dataform.firstname.value;
var lastname = window.document.forms.dataform.lastname.value;
var address1 = window.document.forms.dataform.address1.value;
var town = window.document.forms.dataform.town.value;
var telephone = window.document.forms.dataform.telephone.value;
var email = window.document.forms.dataform.email.value;
var postcode = window.document.forms.dataform.postcode.value;

//DO VALIDATIONS
if(firstname=="")
  { window.alert("ORDER ERROR\n\nYou have not entered your first name.....");  }
else if(lastname=="")
  { window.alert("ORDER ERROR\n\nYou have not entered your last name.....");  }
else if(town=="")
  { window.alert("ORDER ERROR\n\nYou have not entered your city/town.....");  }
else if(email.indexOf("@") == -1)
  { window.alert("ORDER ERROR\n\nYou have not entered a valid e-mail address.....");  }
else if(email.indexOf(".") == -1)
  { window.alert("ORDER ERROR\n\nYou have not entered a valid e-mail address.....");  }
else if(telephone.length < 6)
  { window.alert("ORDER ERROR\n\nYou have not entered a valid telephone number.....");  }
else if(address1 == "")
  { window.alert("ORDER ERROR\n\nYou have not entered your postal address correctly.....");  }
else if(postcode == "")
  { window.alert("ORDER ERROR\n\nYou have not entered your postcode.....");  }  
else
  {
  window.document.dataform.submit();
  }

}

function validate_details2()
{
//PICK UP CUSTOMER DETAILS
var firstname = window.document.forms.dataform.firstname.value;
var lastname = window.document.forms.dataform.lastname.value;
var email = window.document.forms.dataform.email.value;

//DO VALIDATIONS
if(firstname=="")
  { window.alert("ORDER ERROR\n\nYou have not entered your first name.....");  }
else if(lastname=="")
  { window.alert("ORDER ERROR\n\nYou have not entered your last name.....");  }
else if(email.indexOf("@") == -1)
  { window.alert("ORDER ERROR\n\nYou have not entered a valid e-mail address.....");  }
else if(email.indexOf(".") == -1)
  { window.alert("ORDER ERROR\n\nYou have not entered a valid e-mail address.....");  }  
else
  {
  window.document.dataform.submit();
  }

}

