/**
 * @author Dani
 */

function mysql_insert(valores) {
	var ajax = undefined;
	jQuery.ajax({
		url:"/eventos/php/ajax.php",
		cache: false,
		async: false,
		data: '__insert__='+valores,
		success: function(msg) { ajax = msg; }
	});
	return ajax;
}

function mysql_delete(valores) {
	var ajax = undefined;
	jQuery.ajax({
		url:"/eventos/php/ajax.php",
		cache: false,
		async: false,
		data: '__delete__='+valores,
		success: function(msg) { ajax = msg; }
	});
	return ajax;
}

function loader(visibilidad,imagen,content,boton) {
	if (visibilidad == 'true') {
		jQuery("#"+imagen).show("fast");
		if (content != 'null') { jQuery("#"+content).hide("normal"); }
		if (boton != 'null') { document.getElementById(boton).disabled = (visibilidad=='true')?true:false; }
	}
	else {
		jQuery("#"+imagen).hide("fast");
		if (content != 'null') { jQuery("#"+content).show("slow"); }
		if (boton != 'null') { document.getElementById(boton).disabled = (visibilidad=='true')?true:false; }
	}	
}
