function submitForm()
{

try {
     // Try to create object for Firefox, Safari, IE7, etc.
     var http = new XMLHttpRequest();
   }
   catch (e) {
     try {
       // Try to create object for later versions of IE.
       var http = new ActiveXObject('MSXML2.XMLHTTP');
     }
     catch (e) {
       try {
         // Try to create object for early versions of IE.
         var http = new ActiveXObject('Microsoft.XMLHTTP');
       }
       catch (e) {
         // Could not create an XMLHttpRequest object.
       } 	
	 }
   }

for (var i=0; i < document.taxcalculator.status.length; i++)
 {
 if (document.taxcalculator.status[i].checked)
	{
	var status = document.taxcalculator.status[i].value;
	}
 }
var income = document.taxcalculator.income.value;
var year = document.taxcalculator.year.value;

var url = "http://www.twincommas.com/tax-calculation.php";
var params = "status=" + status + "&income=" + income + "&year=" + year;
http.open("POST", url, true);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange = function() {//Call a function when the state changes.
	if(http.readyState == 4 && http.status == 200) {
		var display = document.getElementById("display_tax");
		display.innerHTML = http.responseText;
	}
}
http.send(params);
}

