// Form Validator
function validateForm()
{
var x=document.forms["coupon"]["name"].value
if (x==null || x=="")
  {
  alert("Your name must be filled out in order to receive this coupon");
  return false;
  }
var x=document.forms["coupon"]["phone"].value
if (x==null || x=="")
  {
  alert("Your phone number must be filled out in order to receive this coupon");
  return false;
  }
var x=document.forms["coupon"]["email"].value
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
  {
  alert("Your email address must be valid in order to receive this coupon");
  return false;
  }
}

// Calendar Date Picker
$(function() {
		$( "#datepicker" ).datepicker();
	});

// Google Analytics

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18185608-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
