function ajaxUpdater(url, params, element_id, type) {
	$.ajax({
		type: ((type == "post") ? "post" : "get"),
		processData: true,
		url: url,
		data: params,
		cache: false,
		success: function(data) {
			$("#" + element_id).html(data);
		}
	});
}

function cursorClear() {
  document.body.style.cursor = "default";
}

function cursorWait() {
  document.body.style.cursor = "wait";
}

function digits(val) {
	if (val.length > 0) {
		var valo = new String();
		var numero = "0123456789.";
		var chars = val.split("");
		for (i = 0; i < chars.length; i++) {
			if (numero.indexOf(chars[i]) != -1)
				valo += chars[i];
		}
		return valo;
	} else {
		return '';
	}
}

function highlight(item, is_true) {
	if (is_true) {
		$("#" + item).addClass('error');
	} else {
		$("#" + item).removeClass('error');
	}
}

function isEmail(str) {
	var regex = /^[a-z0-9\._-]+@([a-z0-9_-]+\.)+[a-z]{2,6}$/i;
	return regex.test(str);
}

function pngfix() {
    $("img.png").pngfix();
}