/* File Created: September 19, 2014 */

function moveTimeNowBar(timeInMinutes) {
	$(".sched-now-line").css("top", timeInMinutes + 'px');
	$(".sched-now-line").show();
}

function checkApptPageChange(targetUrl, confirmationMsg) {
    if ($('#apptNoteAdd').val() !== $('#apptNoteAdd').data('apptNoteAdd')) {
        // Confirm dialog
        $("#alert-no-btn").off();
        $("#alert-yes-btn").off();

        $("#alert-no-btn").on("click", function (e) {
            hideAlertDialog();
        });

        $("#alert-yes-btn").on("click", function (e) {
            $(".desktop-nav-items a, ul.menu li ul a.prompt, ul.menu li ul a#userHelp").off();
            window.location = targetUrl;
        });

        showAlertDialogYesNo(confirmationMsg);
        return false;
    } else {
        $('#apptNoteAdd').data('apptNoteAdd', "");
        return true;
    }
}