﻿/* 
This script is used to replace the login information in static HTML pages using AJAX and jQuery. 
The HTML page should include this script at the end of the body and the <li> for the login
button must have an ID attribute of: loglink.
*/
$(document).ready(function () {
    $.ajax({
        type: "POST",
        url: "/login.ashx",
        success: function (data) {
            $("#loglink").html(data);
        }
    });
});

/*
This function is used by HTML pages to force a log out using an ASHX handler.
*/
function ForceLogout() {
    $.ajax({
        type: "POST",
        url: "/logout.ashx",
        success: function (data) {
            $("#loglink").html(data);
        }
    });
}    

