


/*
Block multiple form submission script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact for use
*/

//Enter error message to display if submit button has been pressed multiple times below.
//Delete below line if you don't want a message displayed:

var formerrormsg="You\'ve attempted to submit the form multiple times.\n Please reload page if you need to resubmit form."

function checksubmit(submitbtn){
submitbtn.form.submit()
checksubmit=blocksubmit
return false
}

function blocksubmit(){
if (typeof formerrormsg!="undefined")
alert(formerrormsg)
return false
}

function AllowNoDups(seconds)
{
   var cookie_ls = document.cookie;
   if (cookie_ls.indexOf(document.location) > -1) 
   {
      alert("You've already submitted your donation. Thank you for your interest!");
      return false;
   }
   else
   	{
   		if (seconds)
		{
			var date = new Date();
			date.setTime(date.getTime()+(seconds*1000));
			var expires = "; expires="+date.toGMTString();
		}
		document.cookie = window.location.href + " from " + document.referrer + "; path=/"+expires;
		return true;
	}
}

