function recordvote() {
var radio_choice1 = false;
var rdvalue;
var pollid=document.frmpoll.pollid.value;
var sid=document.frmpoll.sid.value;

for (counter = 0; counter < document.frmpoll.optionid.length; counter++){
	if (document.frmpoll.optionid[counter].checked){
	rdvalue=document.frmpoll.optionid[counter].value;
	radio_choice1 = true; 
	}
}
if (!radio_choice1){
	alert("Please select you option.")
	return (false);
}else{	
	popuppoll(pollid,rdvalue,sid)
}

	
	/*var url = "poll2db.php";
	var frm = document.frmpoll;
	var pollid=document.frmpoll.pollid.value;
	var params = "Action=sp&pollid="+frm.pollid.value+"&optionid="+rdvalue;
	callAHAH(url, 'post', params, displayContent);*/
}

function displayContent(req){
	str=req.responseText;
	str=str.split('|');
	str2=str[0];
	var displayname=str2.split(',');//alert(displayname);
	var disp=document.getElementById('displayform');
	disp.style.display = "none";
	var submitdiv=document.getElementById('submitdiv');
	submitdiv.style.display = "none";
	var mainCont = document.getElementById('polloption');
	mainCont.innerHTML = '';
	for(j=0;j<displayname.length;j++) {
	  mainCont.innerHTML = mainCont.innerHTML+displayname[j]+"<br>";
	}
}