﻿/// <reference name="MicrosoftAjax.debug.js" />
/// <reference name="MicrosoftAjaxTimer.debug.js" />
/// <reference name="MicrosoftAjaxWebForms.debug.js" />

/// <reference path="jquery-1.2.6-vsdoc.js"/>

SCOTT.CSC.FooterNavigation = function(clientId, loginStatusID, signOutUrl, registrationId, myAccountUrl) 
{
    this.ClientID = clientId;
    this.LoginStatusID = loginStatusID;
    this.SignOutUrl = signOutUrl;
    this.RegistrationID = registrationId;
    this.MyAccountUrl = myAccountUrl;
    this.Selector = '#' + clientId;
    this.Initialize();
};

SCOTT.CSC.FooterNavigation.prototype =
{
    Name : 'SCOTT.CSC.FooterNavigation',
    __typeName : 'SCOTT.CSC.FooterNavigation',
    __class : true,
    AttachEvents : function()
    {
        var __app = this;
        var context = $(this.Selector);
    },
    ChangeLoginStatus : function(isAuthenticated)
    {
        var __app = this;
        
        if (isAuthenticated)
        {
            $('#' + this.LoginStatusID).text('Sign Out').attr('href', this.SignOutUrl);
            $('#' + this.RegistrationID).text('My Account').attr('href', this.MyAccountUrl);
        }
    }
};

SCOTT.CSC.Extend(SCOTT.CSC.FooterNavigation, SCOTT.CSC.UserControl);
