<!-- Голосование на 3 вопроса -->
function roll3()
{
	var strRoll;
	strRoll = "";
	flaglinkRoll = false;
	
// Проверяем на наличие объектов РадиоБаннон_3
		if (document.MainForm.RRoll_1 == undefined) {
				flagRRoll_1 = false	}
				else	{
				flagRRoll_1 = true	}
		if (document.MainForm.RRoll_2 == undefined) {
				flagRRoll_2 = false	}
				else	{
				flagRRoll_2 = true	}
		if (document.MainForm.RRoll_3 == undefined) {
				flagRRoll_3 = false	}
				else	{
				flagRRoll_3 = true	}


		if (flagRRoll_1 == true) {
			for (i = 0; i < document.MainForm.RRoll_1.length;) {
				if (document.MainForm.RRoll_1[i].checked) {
					linkRoll_1 = document.MainForm.RRoll_1[i].value;
					strRoll = "idroll_1=" + linkRoll_1 + "&"
					flaglinkRoll = true
				}
				i++;
			}
		}

		if (flagRRoll_2 == true) {
			for (i = 0; i < document.MainForm.RRoll_2.length;) {
				if (document.MainForm.RRoll_2[i].checked) {
					linkRoll_2 = document.MainForm.RRoll_2[i].value;
					strRoll = strRoll + "idroll_2=" + linkRoll_2 + "&"
					flaglinkRoll = true
				}
				i++;
			}
		}

		if (flagRRoll_3 == true) {
			for (i = 0; i < document.MainForm.RRoll_3.length;) {
				if (document.MainForm.RRoll_3[i].checked) {
					linkRoll_3 = document.MainForm.RRoll_3[i].value;
					strRoll = strRoll + "idroll_3=" + linkRoll_3
					flaglinkRoll = true
				}
				i++;
			}
		}

	if (flaglinkRoll == true)  {

// Если строка заканчивается на ru/ то изменяем строку запроса, вставляя ?
			URL_t = document.URL;		
			URL_t1 = URL_t.substr(URL_t.length-1,1);
	
		if (URL_t1 == "/")  {
			document.MainForm.action=document.URL+"default.asp?"+strRoll;
			document.MainForm.submit();		
			return;		
		}
		else {
			document.MainForm.action=document.URL+"&"+strRoll;
			document.MainForm.submit();		
			return;
		}
	}
}
