var a1;
var a2;
var a3;
var a4;

function getAnswers(q, v) {
	if(q == "a1") {
		a1 = v;
		document.getElementById(q).innerHTML = "&nbsp;&nbsp;Vastauksesi: <strong>"+a1+"</strong>";
	}
	if(q == "a2") {
		a2 = v;
		document.getElementById(q).innerHTML = "&nbsp;&nbsp;Vastauksesi: <strong>"+a2+"</strong>";
	}
	if(q == "a3") {
		a3 = v;
		document.getElementById(q).innerHTML = "&nbsp;&nbsp;Vastauksesi: <strong>"+a3+"</strong>";
	}
	if(q == "a4") {
		a4 = v;
	}
}

var xmlHttp
function sendFeedback() {

	document.getElementById("applicationBody").innerHTML = "<img src=\"images/site/indicator.gif\" />&nbsp;Vastauksesi l&auml;hetet&auml;&auml;n..";

xmlHttp = GetXmlHttpObject()

	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
	 	return
	} 

var url="scripts/sendFeedback.php";

url=url+"?a1="+a1+"&a2="+a2+"&a3="+a3+"&a4="+a4;
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged() { 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
 document.getElementById("applicationBody").
 innerHTML=xmlHttp.responseText;
 setTimeout("closeDrop('feedback')", 3000);
 } 
}
function GetXmlHttpObject() {
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
