var xmlHttp;
function ShowNextQuestion(str,radioObj,question,totalquestion,totpoint)
{ 
var totalpoint = 0;
var pointsrecieved = 0;
if(!radioObj)
		alert('Hata Oluştu.');
var radioLength = radioObj.length;
for(var i = 0; i < radioLength; i++) {
	if(radioObj[i].checked) {
		pointsrecieved = radioObj[i].value;
		//alert(pointsrecieved);
	}
}
	
	
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
if (question == 2)
{
	document.getElementById("log_res_first").style.display = 'none';
}
if (totalquestion < question)
{
	document.getElementById("log_res").innerHTML='<span style="margin: 60px 0 0 240px; color: #666; font-size: 11px;"><img src="img/spinner.gif"> Yükleniyor..</span>';  
}
else
{	
	document.getElementById("log_res").innerHTML='<span style="margin: 60px 0 0 240px;  color: #666; font-size: 11px;"> Bir sonraki soru yükleniyor..</span>';  	
}

totalpoint = parseInt(parseInt(totpoint) + parseInt(pointsrecieved));

var url="Test.Play.Cont.asp";
url=url+"?TestId="+str;
url=url+"&QuestionId="+question;
url=url+"&Point="+pointsrecieved;
url=url+"&TotalPoint="+ totalpoint;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("log_res").innerHTML=xmlHttp.responseText;
}
}

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;
}