function checkInput(frm) { 
	var submitOK = false; 
	for (i=0; i<frm.opt.length; i++) { 
		if (frm.opt[i].checked) { 
			submitOK = true; 
			break; 
		} 
	} 
	if (submitOK) { 
		window.open('','poll','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=450,height=300'); 
		frm.target = 'poll'; 
	} 
	else return false; 
} 

function dispPoll(page) {
	document.write('<table width=100% border=0 cellpadding=10 cellspacing=0 class=graybg>');
	document.write('	<tr><td class=regtxt><b>How often do you visit your Dentist?</b><br>');
	document.write('		<table border=0 cellpadding=0 cellspacing=0 align=center>');
	if (page=='IN') 
		document.write('<form METHOD=GET ACTION="../Poll/processPoll.asp" onSubmit="return checkInput(this)"');
	else 
		document.write('<form METHOD=GET ACTION="Poll/processPoll.asp" onSubmit="return checkInput(this)"');
	document.write('<tr><td valign=top><input type=radio name=opt ID=45 VALUE=45></td>');
	document.write('<td class=regtxt>Once a year.</td></tr>');
	document.write('<tr><td valign=top><input type=radio name=opt ID=49 VALUE=49></td>');
	document.write('<td class=regtxt>Only when my tooth aches.</td></tr>');
	document.write('<tr><td valign=top><input type=radio name=opt ID=50 VALUE=50></td>');
	document.write('<td class=regtxt>Never</td></tr>');
	document.write('<tr><td valign=top><input type=radio name=opt ID=51 VALUE=51></td>');
	document.write('<td class=regtxt>Once a month only</td></tr>');
	document.write('<tr><td colspan=2 height=8><INPUT TYPE=HIDDEN NAME=pollid VALUE=12></td></tr>');
	document.write('<tr><td colspan=2 align=center nowrap><input type=submit value=Vote id=submit1 name=submit1> ');
	if (page=='IN') 
		document.write('<input type=button value="View Results" onClick="window.open(\'../Poll/viewPoll.asp?pollid=12\',\'poll\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=300\');"></td></tr>');
	else 
		document.write('<input type=button value="View Results" onClick="window.open(\'Poll/viewPoll.asp?pollid=12\',\'poll\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=300\');" id=button1 name=button1></td></tr>');
	document.write('	</form>');
	document.write('	</table>');
	document.write('</td></tr>');
	document.write('</table>');
}
