var xmlHttp


function postanswer(test,qid)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Your browser does not support some of this site's functionality, please upgrade!")
 return
 }
 
var url="processanswerpost.php"
url=url+"?answer="+test
url=url+"&sid="+Math.random()
url=url+"&qid="+qid
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)

}


function scroller() 
{ 
window.scrollBy(0,10000);
}


function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 ////remove post box and remove bethefirst box and output question
 
	el = document.getElementById("answerfield");
	el.parentNode.removeChild(el); 
 
 
	document.getElementById("searchform").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;

}
