function submitFindOutMore() {

	//get input fields
	var form = document.getElementById("find-out-form");
	var name = form.name.value;
	var contact = form.contact.value;
	if(name == '' || contact == '')
	{
		alert('Please enter your name and contact details');
		return;
	}

	//create xmlhttp
	var xmlhttp;
	if (window.XMLHttpRequest)
	{
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	//function to call on return
	xmlhttp.onreadystatechange=function()
	{ 
		if(xmlhttp.readyState==4)
		{
			// Get data from the server's response
			//document.getElementById("enquiryTextArea").value = 'Thank you. Your Enquiry has been sent.';
			form.name.value = '';
			form.contact.value = 'Thanks! We will be in touch shortly.';
		}
	}
   
	xmlhttp.open("GET",("http://www.bladebooking.com/website/wp-content/themes/bladebooking/scripts/email.php?type=findout&name="+name+"&contact="+contact),true);
	//send to php
	xmlhttp.send(null);
	
	return false;
}





function submitNewsletter() {

	//get input fields
	var form = document.getElementById("newsletter-form");
	var contact = form.email.value;
	if(contact == '')
	{
		alert('Please enter your email address');
		return;
	}

	//create xmlhttp
	var xmlhttp;
	if (window.XMLHttpRequest)
	{
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	//function to call on return
	xmlhttp.onreadystatechange=function()
	{ 
		if(xmlhttp.readyState==4)
		{
			// Get data from the server's response
			//document.getElementById("enquiryTextArea").value = 'Thank you. Your Enquiry has been sent.';
			form.email.value = 'Thanks! You will be sent our newsletter.';
		}
	}
   
	xmlhttp.open("GET",("http://www.bladebooking.com/website/wp-content/themes/bladebooking/scripts/email.php?type=newsletter&email="+contact),true);
	//send to php
	xmlhttp.send(null);
	
	return false;
}
