function CambiaLingua(lingua){
	var PAGINA = document.URL;
	if("ITA"==lingua ){
		var Adress = PAGINA.toLowerCase().replace(/ita/, "ENG");
	}else{
		var Adress = PAGINA.toLowerCase().replace(/eng/, "ITA");
	}
	//document.write(Adress);
	location.href=Adress;
}
function checkSelect(name,valore){
	//alert(document.getElementById(name).options[1].value);
	var controllo=false;
		for (var idx=0;idx<document.getElementById(name).options.length;idx++) {
			if (valore==document.getElementById(name).options[idx].value) {
				//alert(document.getElementById(name).options[idx].value);
				document.getElementById(name).selectedIndex=idx;
				document.getElementById(name).options[idx].selected=true;
				controllo=true;
			}
		}
		if( false==controllo ){
			document.getElementById(name).options[document.getElementById(name).options.length] = new Option(valore,valore);
			document.getElementById(name).options[document.getElementById(name).options.length-1].selected=true;
		}
	}


	function checkRadio(name,valore){
		//alert(document.getElementById(name).options[1].value);
		//alert(valore);

		var frm=document.volontari;
		var radio=frm[name];
		//if("PATENTE"==name){
		//	alert(valore);
		//}
		if(valore.toUpperCase() == "TRUE"){
			radio[0].checked=true;
		}else{
			radio[1].checked=true;
		}
		//document.getElementById(name).checked=true;	
	}
	function checkValueRadio(name,valore){
		//alert(document.getElementById(name).options[1].value);
		//alert(valore);

		var frm=document.volontari;
		var radio=frm[name];
		//if("PATENTE"==name){
		//	alert(valore);
		//}
		for(i=0;i<3;i++){
		//alert(radio[i].value+" --- "+valore);
			if(radio[i].value == valore  ){
			//alert(radio[i].value+" --- "+valore);
				radio[i].checked=true; 
			}
		}
		//document.getElementById(name).checked=true;	
	}
	
	function checkCB(name,valore){
			if("True" == valore){
				document.getElementById(name).checked=true;
			}
		}

	function checkBButton(name,valore){
		//alert(valore);
		document.getElementById(name+valore).checked=true;
	}	
	function checkBIter(name,valore){
		var frm=document.volontari;
		var radio=frm[name];
		if(valore=="POMERIGGIO"){
			radio[0].checked=true;
		}
		if(valore=="SERALE"){
			radio[1].checked=true;
		}	
		if(valore=="WEEK-END"){
			radio[2].checked=true;
		}	
	}
	

