
function bookConsult(name,email,phone,bestDay,bestTime,newsletter,patientforms)
{
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");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {



document.getElementById('bookId').innerHTML = xmlhttp.responseText;

var str = xmlhttp.responseText
var a = str.search(/Successfully/);
if(a >0) {
   document.getElementById('maindivId').style.display = 'none'; 
}


  }  else {
//document.getElementById('hotvideoDiv').innerHTML = "<div style='float:left; padding-left:200px;padding-top:140px;'><img src='images/indicator.gif' width='20' height='20'/></div>";
}
}
xmlhttp.open("GET","book-consultation.php?name="+name+"&email="+email+"&phone="+phone+"&bestDay="+bestDay+"&bestTime="+bestTime+"&newsletter="+newsletter+"&patientforms="+patientforms,true);
xmlhttp.send(null);
}

function trim(b){
	var i=0;
	while(b.charAt(i)==" "){
		i++;
	}
	
	b=b.substring(i,b.length);
	len=b.length-1;
	
	while(b.charAt(len)==" "){
		len--;
	}
	b=b.substring(0,len+1);
	return b;
}

function freeReport(name,email,subscriber){
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");
  }
else
  {
  alert("Your browser does not support XMLHTTP!");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {



document.getElementById('bookId').innerHTML = xmlhttp.responseText;

var str = xmlhttp.responseText
var a = str.search(/Successfully/);
if(a >0) {
   document.getElementById('maindivId').style.display = 'none'; 
}


  }  else {
//document.getElementById('hotvideoDiv').innerHTML = "<div style='float:left; padding-left:200px;padding-top:140px;'><img src='images/indicator.gif' width='20' height='20'/></div>";
}
}
xmlhttp.open("GET","free-report-signup.php?name="+name+"&email="+email+"&subscriber="+subscriber,true);
xmlhttp.send(null);
}
