function showImgZoom(srcImgZoom,didaImgZoom){
	document.getElementById("boxZoomImg").src=srcImgZoom;
	document.getElementById("boxZoomImgDida").innerHTML = didaImgZoom;
}

function showMapZoom(divMap){
	visAttuale = document.getElementById(divMap).style.visibility;
	if (visAttuale == "visible"){
		document.getElementById(divMap).style.visibility="hidden";
		document.getElementById('mb_inline_top').style.visibility="hidden";		
		//document.getElementById("href_zoom_map").innerHTML = "clicca per l’ingrandimento";
	}
	else{
		document.getElementById(divMap).style.visibility="visible";
		document.getElementById('mb_inline_top').style.visibility="visible";	
		//document.getElementById("href_zoom_map").innerHTML = "chiudi l’ingrandimento";
	} 
}

function inviaFormCandidatura(){
	//reset campi
	if (document.frmInviaCandProf.tipologiaProf.value != "") document.getElementById('errortipologiaProf').style.display="none";
	if (document.frmInviaCandProf.nominativoProf.value != "") document.getElementById('errornominativoProf').style.display="none";
	if (document.frmInviaCandProf.titoloStudioProf.value != "") document.getElementById('errortitoloStudioProf').style.display="none";
	if (document.frmInviaCandProf.abitazioneProf.value != "") document.getElementById('errorabitazioneProf').style.display="none";
	if (document.frmInviaCandProf.studioProf.value != "") document.getElementById('errorstudioProf').style.display="none";
	if (document.frmInviaCandProf.privacyCheck.checked == true) document.getElementById('errorprivacyCheck').style.display="none";
	if (document.frmInviaCandProf.CodeCaptCha.value != "") document.getElementById('errorCodeCaptCha').style.display="none";
	
	//controllo campi
	if (document.frmInviaCandProf.tipologiaProf.value == "") document.getElementById('errortipologiaProf').style.display="block";
	else if (document.frmInviaCandProf.nominativoProf.value == "") document.getElementById('errornominativoProf').style.display="block";
	else if (document.frmInviaCandProf.titoloStudioProf.value == "") document.getElementById('errortitoloStudioProf').style.display="block";
	else if (document.frmInviaCandProf.abitazioneProf.value == "") document.getElementById('errorabitazioneProf').style.display="block";
	else if (document.frmInviaCandProf.studioProf.value == "") document.getElementById('errorstudioProf').style.display="block";
	else if (document.frmInviaCandProf.privacyCheck.checked == false) document.getElementById('errorprivacyCheck').style.display="block";
	else if (document.frmInviaCandProf.CodeCaptCha.value == "") document.getElementById('errorCodeCaptCha').style.display="block";
	else document.frmInviaCandProf.submit();
}

function sendFrmRicercaBandi(){
	valTipBando = document.frmRicercaBandi.typeBando.value;
	if (valTipBando == "1") document.frmRicercaBandi.action = "bandi-di-gara.html";
	else if (valTipBando == "2") document.frmRicercaBandi.action = "esiti-di-gara.html";
	else if (valTipBando == "3") document.frmRicercaBandi.action = "avvisi.html";
	else if (valTipBando == "4") document.frmRicercaBandi.action = "selezione-del-personale.html";
	
	//reset campi
	if (document.frmRicercaBandi.typeBando.value != "") document.getElementById('errortipologiaBando').style.display="none";
	
	//controllo campi
	if (document.frmRicercaBandi.typeBando.value == "") document.getElementById('errortipologiaBando').style.display="block";
	else document.frmRicercaBandi.submit();
}
