function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function fDateTip(obj) {
   alert('Please choose your intendent moving date');
  }
  function fBoxTip() {
  alert('Please specify how many boxes you have');
  }
  function fCommentTip() {
  alert('Please enter any additional information regarding planing of your move');
  }



function validate(form) {
	if (document.quote.Lead.value=="") {
		createMessage($(form), "Please fill in `How you heard about us` field");
		document.quote.Lead.focus();
		return false;
	}

	if (document.quote.CustName.value=="") {
		createMessage($(form), "Please fill in `Your name` field");
		document.quote.CustName.focus();
		return false;
	}

	if (document.quote.moveDate.value=="") {
		createMessage($(form), "Please fill in `Moving Date` field");
		document.quote.moveDate.focus();
		return false;
	}

	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.quote.Email.value)){
		createMessage($(form), "Please provide a correct `Email`");
		document.quote.Email.focus();
		return false;
	}

	var lengthCheck = document.quote.HomePhone.value
	if (lengthCheck.length < 10) {
		createMessage($(form), "Please enter 10 digit telephone number");
		document.quote.HomePhone.focus();
		return false;
	}

	if (document.quote.City_From.value=="") {
		createMessage($(form), "Please fill in `Moving from city` field");
		document.quote.City_From.focus();
		return false;
	}

	if (document.quote.state_from.value=="") {
		createMessage($(form), "Please fill in `Moving from state` field");
		document.quote.state_from.focus();
		return false;
	}


	var lengthCheckZipFrom = document.quote.Zip_From.value
	if (lengthCheckZipFrom.length < 5) {
		createMessage($(form), "Please enter 5 digit zip");
		document.quote.Zip_From.focus();
		return false;
	}

	if (document.quote.City_to.value=="") {
		createMessage($(form), "Please fill in `Moving to city` field");
		document.quote.City_to.focus();
		return false;
	}

	if (document.quote.state_to.value=="") {
		createMessage($(form), "Please fill in `Moving to state` field");
		document.quote.state_to.focus();
		return false;
	}

return true;

}
