//----------------This file is used bu the right.php for validating and displaying the contents in the required fromat
function validate1()
{
    var radio_choice1 = false;
	var rdvalue;
	var pollid=document.poll1.polloption.value;
	for (counter = 0; counter < document.poll1.polloption.length; counter++){
		if (document.poll1.polloption[counter].checked){
			rdvalue=document.poll1.polloption[counter].value;
			radio_choice1 = true; 
		}// End of if
	}//End of for loop
	if (!radio_choice1){
		alert("Please select one option.")
		return false;
	}// End of if
	var url = "poll2db.php";
	var params = "&pollid="+document.poll1.pollid.value+"&polloption="+rdvalue; //alert(params);
	callAHAHpoll(url, 'post', params,displayContent1);
}
function displayContent1() { 
	str =req.responseText; //alert(str);
	var str2;
	str2="";
	str1=str.split('|');
	str2=str2+"<div class='PT10 PB20'>";
	str2=str2+"<span class='r_11'><b>"+str1[0]+"</span></b><br>";      
	var mainCont = document.getElementById('polloptiondiv1');
	mainCont.innerHTML = '';
	for(i=1;i<str1.length;i=i+2){
	  str2 =str2+"<b><span class='r_11'>"+str1[i]+"("+str1[i+1]+"%)</span><br></b>";
	}//End of For loop
	mainCont.innerHTML = str2;
}
