function ru(va) {
	var confirmation = confirm("Are you sure you want to remove this user? This CANNOT be undone.");
	if(confirmation == true) {
		$.post("ru.php", { uid: va }, function(data) { 
			window.location = "members.php";
		});
	}
}

function rc(va) {
	var confirmation = confirm("Are you sure you want to remove this category? This CANNOT be undone.");
	if(confirmation == true) {
		$.post("rc.php", { uid: va }, function(data) { 
			window.location = "categories.php";
		});
	}
}

function complete(taskid, tasktype) {
	$.post("complete.php", { uid: taskid, uitype: tasktype }, function(data) { 
		window.location = "dashboard.php";
	});
}

function removex(taskid, tasktype) {
	$.post("removex.php", { uid: taskid, uitype: tasktype }, function(data) { 
		window.location = "logbook.php";
	});
}

function displaymode(newmode) {
	$('#countdown').countdown.stop();
	$.post("load_tasks.php", { mode: newmode }, function(data) { 
		$("#display_mode").html(newmode);
		$("#tasks").html(data);
		slideTimer();
	});
}

function livetasks() {
	var displaymode = $("#display_mode").html();
	$.post("load_tasks.php", { mode: displaymode }, function(data) { 
		$("#tasks").html(data);
		slideTimer();
	});
}

function slideTimer() {
	$('#countdown').countdown({seconds: 10, callback: 'livetasks()'});
}
