	function submitVoteForm()
	{
		var questionId = document.voteform.questionId.value;
		
		var len = document.voteform.voteradio.length;		
		var chkd = 0;
		var answerId = '';
		
		for(i=0;i<len;i++)
		{
			if(document.voteform.elements.voteradio[i].checked){
				answerId = document.voteform.elements.voteradio[i].value;
				chkd=1;
			}
		}
		if(chkd==0){
			//alert("Please select an option");
			$("#msg").html("Please select an option");
			return false;
		}else{		
			var str = "task=poll&QID="+questionId+"&AID="+answerId;
			var ajaxPath = document.getElementById('ajaxpath').value;

			$.ajax({
				  type: "POST",
				  url: ajaxPath,
				  data: str,
				  success: function(response){
					  //alert(response);
					  $("#msg").html(response);
					  
			  var pageURL = document.getElementById('votepageurl').value+"?qid="+questionId+"#poll";			  
			  window.location=pageURL;

					for(i=0;i<len;i++)
					{
						document.voteform.elements.voteradio[i].checked=false;			
					}
				  }
			});

			return true;
		}
	}
