/*
function aggiorna_immagine_captcha(id_captcha_response, id_captcha_image) {
	UtilService.getNewCaptchaImageURL(function(url) {
		var jImg = $('#' + id_captcha_image);
		jImg.attr('src', url);

		var jRsp = $('#' + id_captcha_response);
		jRsp.val('');
		
		jRsp.focus();
	});	
	
	return false;
}
*/

/*
function contattaci(form, id_email, id_tipo_richiesta, id_msg, id_captcha_response, id_captcha_image) {

	var jEmail = $('#' + id_email);
	var email = jEmail.val();
	if (email == '' || email == jEmail.attr('title')) {
		alert("L'email è obbligatoria.");
		return false;
	}

	var jTipoRichiesta = $('#' + id_tipo_richiesta);
	var tipoRichiesta = jTipoRichiesta.val();
	
	var jMsg = $('#' + id_msg);
	var messaggio = jMsg.val();
	if (messaggio == '' || messaggio == jMsg.attr('title')) {
		alert("Il messaggio è obbligatorio.");
		return false;
	}
	
	var jCaptchaResponse = $('#' + id_captcha_response);
	var captchaResponse = jCaptchaResponse.val();

	if (captchaResponse == '') {
		alert("Digita i caratteri corrispondenti all'immagine.");
		return false;
	}

	var jCaptchaImageURL = $('#' + id_captcha_image);
	var captchaImageURL = jCaptchaImageURL.attr('src');

	UtilService.contattaci(email, tipoRichiesta, messaggio, captchaResponse, captchaImageURL, function(result) {
		if (result != '') {
			alert("I caratteri dell'immagine digitati non sono corretti!");
		}
		else {
			alert("Messaggio inviato.");
		}
		aggiorna_immagine_captcha(id_captcha_response, id_captcha_image);
	});	
	
	return false;
}
*/
