<!--
// Function to ensure one of the answers was selected when the user clicks 'Vote'
function pollProcessForm() {
	var loop  = document.Poll.PollAnswerID.length;
	// Set the proceed variable
	var proceed = 0;
	// set the poll QuestionID variable
	var questionID = document.Poll.PollQuestionID.value;
	//alert("questionID = " + questionID  + "\nloop = " + loop + "\nproceed = " + proceed);
	// Loop through the number of answers to ensure that one is checked.
	// JavaScript objects start the count at 0, so the loop is from 0
	// to the recordcount - 1
	for (var i=0; i<=loop-1; i++)
	{
		// If the answer is checked, set proceed to 1 and break out of the loop.
		if (document.Poll.PollAnswerID[i].checked)
		{
			proceed = 1;
			break;
		}
	}
	// If proceed = 0, display a message.  Otherwise process the form.
	if (proceed == 0) {
		alert("You must select an answer to place your vote.");
	} else {
		document.Poll.submit();
		window.open('poll/poll_results_display.cfm?PollQuestionID=' + questionID,'PollWin','width=360,height=300,status=0,location=0,scrollbar=0,resize=0');
	}
}
//-->
