//Confirm user action
function confirm_action(msg) {
	if (confirm(msg)) {
		return true;
	} else {
		return false;
	}
}

//Confirm user action then redirect to new url
function confirm_location(msg,url) {
	if (confirm(msg)) {
		window.location = url;
	} else {
		return false;
	}
}



//Used for cancelling <form> edits
function cancel_edit(msg) {
	if (msg == NULL) {
		msg = "Are you sure you want to discard these changes?";
	}
	if (confirm(msg)) {
		javascript:history.back();
	}
}
