function open_notice_popup(link)
{
	var win=window.open(link,'','resizable=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=600,height=500,left=200,top=200');
	win.focus();
}

function confirmPoll()
{
	var empty_q = "";
	var qcount = parseInt(document.getElementById("qcount").value);
	var acount = 0;
	var j = 0;
	var pqid = 0;
	var obj;
	var ok = false;
	
	for(var i=0; i<qcount; i++)
	{
		acount = parseInt(document.getElementById("count"+i).value);
		if(acount > 0)
		{
			pqid = parseInt(document.getElementById("pqid"+i).value);
			if(pqid <= 0) continue;
			ok = false;
			for(j=1; j<=acount; j++)
			{
				obj = document.getElementById("q_"+pqid+"_"+j);
				if((obj.type == "checkbox" || obj.type == "radio") && obj.checked)
				{
					ok = true;
					break;
				}
			}
			if(!ok)
			{
				empty_q += (empty_q?", ":"") + document.getElementById("qno"+i).value;
			}
		}
	}
	if(empty_q && !confirm("Nie wypełniono pytań numer: "+empty_q+". Czy na pewno chcesz zakończyć ankietę?")) return;
	document.form1.finish.value=1;
	document.form1.submit();
}