<!--hide this script from non-javascript-enabled browsers

/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		}
		else
		return true;
	}

function formCheckAddress(formobj){
  var chkf=formobj.formaddr.value;
  if(!chkf) {alert("Please enter an address!");return false;}
  var chkf=formobj.formphone.value;
  if(!chkf) {alert("Please enter a telephone number!");return false;}
  return true;
}

function formCheckAddressLines(formobj){
  var chkf=formobj.formnf.value;
  if(!chkf) {alert("Please enter your first name!");return false;}
  var chkf=formobj.formnl.value;
  if(!chkf) {alert("Please enter your last name!");return false;}
  var chkf=formobj.forma1.value;
  if(!chkf) {alert("Please enter address line 1!");return false;}
  var chkf=formobj.formtn.value;
  if(!chkf) {alert("Please enter your town/city!");return false;}
  var chkf=formobj.formpc.value;
  if(!chkf) {alert("Please enter your postcode!");return false;}
  var chkf=formobj.formtel.value;
  if(!chkf) {alert("Please enter a telephone number!");return false;}
  return true;
}

function formCheckContactUs(formobj){
  var chkf=formobj.code.value;
  if(!chkf) {alert("Please enter the Validation code!");return false;}
  if(chkf.length!=5) {alert("Please check the Validation code!");return false;}
  var chkf=formobj.qname.value;
  if(!chkf) {alert("Please enter your name!");return false;}
  var chke=formobj.qemail.value;
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (!filter.test(chke)) {alert("Please enter a valid email address!");return false;}
  var chkf=formobj.qmsg.value;
  if(!chkf) {alert("Please enter a message!");return false;}
  var chkf=formobj.code.value;
  if(!chkf) {alert("Please enter the Validation code!");return false;}
  if(chkf.length!=5) {alert("Please check the Validation code!");return false;}
  return true;
}

function formCheckLoginForgot(formobj){
  var chkf=formobj.code.value;
  if(!chkf) {alert("Please enter the Validation code!");return false;}
  if(chkf.length!=5) {alert("Please check the Validation code!");return false;}
  var chke=formobj.custemail.value;
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (!filter.test(chke)) {alert("Please enter a valid email address!");return false;}
  return true;
}

function formCheckNewCust(formobj){
  var chkf=formobj.code.value;
  if(!chkf) {alert("Please enter the Validation code!");return false;}
  if(chkf.length!=5) {alert("Please check the Validation code!");return false;}
  var chkf=formobj.chgnamefirst.value;
  if(!chkf) {alert("Please enter your first name!");return false;}
  var chkl=formobj.chgnamelast.value;
  if(!chkl) {alert("Please enter your last name!");return false;}
  var chke=formobj.chgemail.value;
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (!filter.test(chke)) {alert("Please enter a valid email address!");return false;}
  return true;
}

function formCheckConfirmAcc(formobj){
  var chkf=formobj.chgacc.value;
  if(!chkf) {alert("Please enter your Account Number!");return false;}
  var chkl=formobj.chgcode.value;
  if(!chkl) {alert("Please enter your Confirmation Code!");return false;}
  var chkp=formobj.chgpw.value;
  var chkpp=formobj.chgpw2.value;
  if(chkp!=chkpp) {alert("Passwords do not match!");return false;}
  if(chkp.length<4) {alert("Please use at least 4 characters for your password!");return false;}
  return true;
}

function formCheckDetails(formobj){
  var chkf=formobj.chgnamefirst.value;
  if(!chkf) {alert("Please enter your first name!");return false;}
  var chkl=formobj.chgnamelast.value;
  if(!chkl) {alert("Please enter your last name!");return false;}
  var chke=formobj.chgemail.value;
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
  if (!filter.test(chke)) {alert("Please enter a valid email address!");return false;}
  var chkt=formobj.chgphone.value;
  if(!chkt) {alert("Please enter your telephone number!");return false;}
  var chkp=formobj.chgpw.value;
  var chkpp=formobj.chgpw2.value;
  if(chkp!=chkpp) {alert("Passwords do not match!");return false;}
  if(chkp.length<4 && chkp!='') {alert("Please use at least 4 characters for your password!");return false;}
  return true;
}

// stop hiding -->