function ShowEduTask1(id)
{
    TaskId = id;
    MakeDataRequest(Handler1, 1);
}

function Handler1(data)
{
    			var oAnswersDiv = ShowContent(data, ButtonHandler1);
				oAnswersDiv.id = 'EduVariantDiv';
				sContStr = data.getAttribute('content');
				while ( (sContStr.indexOf('<V>') >=0) || (sContStr.indexOf('</V>') >=0) )
				{
					var j = sContStr.indexOf('<V>');
					if ( j >=0 )
					{
						s0 = sContStr.substr(0, j);
						s1 = "<input type='radio' id='myCheck' name='varCheck'>" + sContStr.substring(j+3);
						sContStr = s0 + s1;	
				
					}
		
					var k = sContStr.indexOf('</V>');
					if ( k >= 0 )
					{
						s0 = sContStr.substr(0, k);
						s1 = sContStr.substring(k+4);
						sContStr = s0 + s1;		
					}
				}
				oAnswersDiv.innerHTML = sContStr;
}

function ButtonHandler1()
{
					//alert("sent");
					var sAnswers = "";
					var oContentDiv = document.getElementById('EduVariantDiv');
					var boxes = oContentDiv.getElementsByTagName('input');
					var iVarAm = boxes.length;
					
					for ( i = 0; i < iVarAm; i++)
					{
						
							if (boxes[i].checked) {
								sAnswers += (i + 1);
								sAnswers += ","
								
								
							}
							if (i == iVarAm - 1 && sAnswers.length != 0) {
							
								sAnswers = sAnswers.substr(0, sAnswers.length - 1);
							}
						
					}
					alert(sAnswers);
    SendReply(sAnswers);
}
