function getFunFactQAAnswer(id)
{
	
	xmlHttpGetFunFactQAAnswer=GetXmlHttpObject()
	if (xmlHttpGetFunFactQAAnswer==null){
		document.getElementById("FunFactAns").innerHTML="Browser does not support HTTP Request"
		return
	} 

	var url="./getFunFactAns.php?id=" + id;
	
	xmlHttpGetFunFactQAAnswer.onreadystatechange=handleGetFunFactQAAnswer
	xmlHttpGetFunFactQAAnswer.open("GET",url,true)
	xmlHttpGetFunFactQAAnswer.send(null)
}
function handleGetFunFactQAAnswer() {
	if (xmlHttpGetFunFactQAAnswer.readyState==4 || xmlHttpGetFunFactQAAnswer.readyState=="complete") { 
		var strArr = xmlHttpGetFunFactQAAnswer.responseText.split("||")

		document.getElementById("FunFactAns").innerHTML = strArr[0];
		document.getElementById("FunFactAnsImg").innerHTML = "<img src='"+strArr[1]+"'"+" alt='' width='124' border='0'>";
	}
}
function getFunFactQAResponse(id)
{		
	xmlHttpGetFunFactQAResponse=GetXmlHttpObject()
	if (xmlHttpGetFunFactQAResponse==null){
		document.getElementById("FunFactAns").innerHTML="Browser does not support HTTP Request"
		return
	} 

	var url="./getFunFactAns.php?id=" + id + "&mc_choice=" + getCheckedRadioValue("mc_choice");
//	alert("url: "+url);
	xmlHttpGetFunFactQAResponse.onreadystatechange=handleGetFunFactQAResponse;
	xmlHttpGetFunFactQAResponse.open("GET",url,true);
	xmlHttpGetFunFactQAResponse.send(null);
}
function handleGetFunFactQAResponse() {
	if (xmlHttpGetFunFactQAResponse.readyState==4 || xmlHttpGetFunFactQAResponse.readyState=="complete") { 
		var strArr = xmlHttpGetFunFactQAResponse.responseText.split("||")
		
		document.getElementById("FunFactAns").innerHTML = strArr[0];
		document.getElementById("FunFactAnsImg").innerHTML = "<img src='"+strArr[1]+"'"+" alt='' width='124' border='0'>";
	}
}
function getCheckedRadioValue(elementName) {	
	var radio = document.getElementsByName(elementName);	
	for (i=0; i<radio.length; i++) {
		if (radio[i].checked==true) {		
			return radio[i].value;
		}
	}
}