//var my_form = getElement ( "to_frame" );

function popup_vote ( frm_name , txt , e )
	{
	my_form = getElement ( "to_frame" );
	check = false;

	frm = getElement ( frm_name );
	theGroup = frm.vote_questions_id;
	for (i=0; i< theGroup.length; i++) 
		{
		if ( theGroup[i].checked) 
			{
			question_id = theGroup[i].value;
			check = true;
			break;
			}
		}
	
	if ( check == false )
		{
		alert ( 'Выберите вариант ответа' );
		}
	else
		{
		open_frame ( "{voiting|vote|vote_id|" + frm.vote_id.value + "|answer_id|" + question_id + "}" , 330 , 100 , e , txt )
		}
	}

function popup_vote_show ( vote_id , txt , e )
	{
	my_form = getElement ( "to_frame" );
	open_frame ( "{voiting|show_result|vote_id|" + vote_id + "}" , 330 , 100 , e , txt )
	}