// www.sibiul.ro

function checkvote(){

var form = 'document.voting';

if (document.voting.b_food && document.voting.b_food.checked == 1 && document.voting.g_food.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}
if (document.voting.b_service && document.voting.b_service.checked == 1 && document.voting.g_service.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}
if (document.voting.b_value && document.voting.b_value.checked == 1 && document.voting.g_value.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}
if (document.voting.b_scene && document.voting.b_scene.checked == 1 && document.voting.g_scene.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}
if (document.voting.b_seating && document.voting.b_seating.checked == 1 && document.voting.g_seating.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}
if (document.voting.b_gem && document.voting.b_gem.checked == 1 && document.voting.g_gem.checked == 1) 
{
	alert("Ai selectat 2 descrieri care se contrazic (ex. nu se poate selecta in acelasi timp se mananca bine si mancarea lasa de dorit)");
	return false;
}

var radioSelected = false;
for (i = 0;  i < document.voting.vot.length;  i++)
{
	if (document.voting.vot[i].checked)
	radioSelected = true;
}
if (!radioSelected)
{
	alert("Este obligatoriu sa dai o nota !");
	return false;
}

if (document.voting.comentariu.value == '') 
{
	alert("Este obligatoriu sa scri parerea ta !");
	return false;
}


}

