/*** Info Script ***/
/*** chk form ***/
function handleHttpResponse_2(div) {
if (http.readyState == 4) { 
	  if(http.status==200) { 
		  var results=http.responseText; 
	  document.getElementById(div).innerHTML = results; 
	  } 
	  } 
} 

/*** Grab details to pass and send to php script ***/
function chkoption(field,div) {
var f = document.getElementById(field).value;
	http.open('GET', 'chkoption.php?field=' + escape(f), true);
	http.onreadystatechange = function(){ handleHttpResponse_2(div) };
	http.send(null); 
} 

/*** Grab details to pass and send to php script ***/
function chkInfo(field,validate,div,type) {
var f = document.getElementById(field).value;
var v = document.getElementById(validate).value;
	http.open('GET', 'chk.php?field=' + escape(f) + '&&validate=' + escape(v) + '&&type=' + escape(type), true);
	http.onreadystatechange = function(){ handleHttpResponse_2(div) };
	http.send(null); 
} 


/*** Response ***/
function handleHttpResponse() {    
if (http.readyState == 4) { 
	  if(http.status==200) { 
		  var results=http.responseText; 
	  document.getElementById('interest_answer').innerHTML = results; 
	  } 
	  } 
} 

/*** Grab details to pass and send to php script ***/
function registerInfo() {
	var first = document.getElementById('first_name').value;
	var last = document.getElementById('last_name').value;
	var email = document.getElementById('email').value;
	http.open('GET', 'scripts/register.php?first=' + escape(first) + '&&last=' + escape(last) + '&&email=' + escape(email), true);
	http.onreadystatechange = handleHttpResponse();
	http.send(null); 
} 

/*** Grab http Object ***/
function getHTTPObject() { 
  var xmlhttp; 

  if(window.XMLHttpRequest){ 
	xmlhttp = new XMLHttpRequest(); 
  } 
  else if (window.ActiveXObject){ 
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
	if (!xmlhttp){ 
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
	} 
	
} 
  return xmlhttp;  
} 
var http = getHTTPObject(); // We create the HTTP Object 