function submitpoll(theform){
var foundtrue = false;
var choice = 0;

for (i = 0; i < document.forms[theform].answer_choice.length; i++)
{
	if (document.forms[theform].answer_choice[i].checked)
	{
		foundtrue = true;	
		choice = document.forms[theform].answer_choice[i].value;
	}
}

if (foundtrue)
{
		var Urlz = 'poll_votestore.cfm?poll_id=' + document.forms[theform].poll_id.value + '&answer_choice=' + choice;
        var iMyWidth;
        var iMyHeight;
        //gets top and left positions based on user's resolution so hint window is centered.
        iMyWidth = (window.screen.width/2) - (100 + 10);
	 //half the screen width minus half the new window width (plus 5 pixel borders).
        iMyHeight = (window.screen.height/2) - (200 + 50); 
	//half the screen height minus half the new window height (plus title and status bars).
        var win2 = window.open(Urlz, "Results","toolbar=no,alwaysRaised=1, dependent,directories=no,menubar=no,location=no,status=yes,width=192,height=400,left="+ iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" +iMyHeight + ",scrollbars=yes");
}
else {
	alert('Please choose a poll choice');
}

return false;
}

