function load_sonda(id, page) {
	var static_width=$('#sonda_'+id+'_static_width').val();

	$('#sonda_form_'+id+'_response').parent().css('opacity',0.4);

	$.ajax({
		url: 'includes/sonda/engine.php?SID='+$('#SID').val(),
		data: "sonda_id="+id+"&page="+page+"&static_width="+static_width,
		type: 'post',
		dataType: 'html',
		cache: false,
		error: function(request) { alert('AJAX: Server connection error!'); },
		success: function(response) {
			$('#sonda_form_'+id+'_response').html(response);
			$('#sonda_form_'+id+'_response').parent().css('opacity',1);
		}
	});
}



jQuery.fn.sondaForm = function(options) {
	options = options || {};
	
	$(this).bind("submit", function() {
		if(options.in_progress==1) return false;
		post_form(this);
		return false;
	});


	function post_form(forma) {
		options.in_progress=1;
		$(forma).parent().css('opacity',0.4);

		$.ajax({
			url: 'includes/sonda/engine.php?SID='+$('#SID').val(),
			data: $(forma).serialize(),
			type: 'post',
			dataType: 'html',
			cache: false,
			error: function(request) { alert('AJAX: Server connection error!'); },
			success: function(response) {
				options.in_progress=0;
				$('#sonda_form_'+options.sonda_id+'_response').html(response);
				$(forma).parent().css('opacity',1);
			}
		});
	}
}