function submit_request() { 
 var sname = document.getElementById('sname').value;
 var sphone = document.getElementById('sphone').value;
 var semail = document.getElementById('semail').value;
 var sbody = document.getElementById('sbody').value;
 if ( (sname == '') || (semail == '') ) { 
   alert('Required Value Missing. Name & Email are required.');
   return;
 }
 var stremail = semail;
 var emailchar = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
 if (!(emailchar.test(stremail))) {
   alert('Invalid E-Mail Address. Please check the E-Mail Address and try again.');
   return;
}

 req_res = (window.XMLHttpRequest ? new XMLHttpRequest(): ((window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : null) );
 if (req_res) { 
	req_res.onreadystatechange = state_change;
    req_res.open("POST",'emailsend.php',true);
	req_res.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	req_res.send('sname='+sname+'&sphone='+sphone+'&semail='+semail+'&sbody='+sbody);
//	req_res.send('sname='+sname+'&sphone='+sphone+'&semail='+semail+'&sbody='+sbody+'&sfound='+sfound+'&slocation='+slocation);	 
 }

} // end function

function state_change() {
 if ( req_res.readyState == 4 ) {
    if (req_res.status == 200) {
	  if(req_res.responseText == 'done') { 
	     location.href = './RequestSent.html';
	  }	
	  else if (req_res.responseText == 'error') {
	      document.getElementById('indicator').innerHTML = '';
		  alert('Sorry but not possible to send the email this time. Please try later.'); 
	   }
	}
 }	
}


//	