// JavaScript Document
var xmlHttp;
var KidId;
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	 {
	 // Firefox, Opera 8.0+, Safari
	 xmlHttp=new XMLHttpRequest();
	 }
	catch (e)
	 {
	 try
	  {
	  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	 catch (e)
	  {
	  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	 }
	return xmlHttp;
}

function savequestion()
{ 
  
var name=document.getElementById('txt_name').value;
var email=document.getElementById('txt_email').value;
var phone=document.getElementById('txt_ph').value;
var fax=document.getElementById('txt_fax').value;
var country=document.getElementById('country').value;
var enquiry=document.getElementById('enquiry').value;
 
 xmlHttp=GetXmlHttpObject()
 if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return;
 }
var url="askquestion_ajax.php?name="+name+"&email="+email+"&phone="+phone+"&fax="+fax+"&country="+country+"&enquiry="+enquiry;
//alert(url);
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{
 	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 {
 		 data=xmlHttp.responseText;
         alert(data);
		 window.location='contactus.php';
 
     }
}

