﻿
LswLoading = new Object();
LswLoading._variableName = 'LswLoading';
if(typeof(ApplicationPath) == 'undefined')
{
    LswLoading.LoadingHtmlUrl = '/portal/LannaSoftWorks/LswModal/loading.html';
}
else 
{
    LswLoading.LoadingHtmlUrl = '/portal/LannaSoftWorks/LswModal/loading.html';
}
LswLoading.WindowCssClasses = new Array('ajaxloading_Modal');
LswLoading.WindowTitleCssClasses = new Array('ajaxloading_ModalTitle');
LswLoading.WindowCloseCssClasses = new Array('ajaxloading_ModalClose');
LswLoading.WindowContentCssClasses = new Array('ajaxloading_ModalContent');
LswLoading.WindowMaskCssClasses = new Array('ajaxloading_ModalMask');
LswLoading.WindowFooterCssClasses = new Array('ajaxloading_ModalFooter');
LswLoading.WindowResizeCssClasses = new Array('ajaxloading_ModalResize');
LswLoading.ZIndex = 999;
LswLoading._isShown = false;
LswLoading._initialized = false;
LswLoading._modal = null;
LswLoading._modalTitle = null;
LswLoading._modalClose = null;
LswLoading._modalAnimationMask = null;
LswLoading._modalMask = null;
LswLoading._modalIframe = null;
LswLoading._modalResize = null;
LswLoading._modalFooter = null;
LswLoading._modalContent = null;
LswLoading._animationHandle = null;
LswLoading._isOpening = false;
LswLoading._hiddenSelects = null;
LswLoading._checkForScrollResizeHandle = null;
LswLoading._lastModalInfo = null;
LswLoading._lastWindowInfo = null;
LswLoading._isDragging = false;
LswLoading._moveModalInfo = null;
LswLoading._resizeModalInfo = null;
LswLoading._isResizing = false;
LswLoading.Configure = function(loadingHtmlUrl, windowCssClasses,
    windowTitleCssClasses, windowCloseCssClasses, windowContentCssClasses,
    windowFooterCssClasses, windowResizeCssClasses, windowMaskCssClasses,
    zIndex)
{
    this.LoadingHtmlUrl = loadingHtmlUrl;
    this.WindowCssClasses = windowCssClasses;
    this.WindowTitleCssClasses = windowTitleCssClasses;
    this.WindowCloseCssClasses = windowCloseCssClasses;
    this.WindowContentCssClasses = windowContentCssClasses;
    this.WindowMaskCssClasses = windowMaskCssClasses;
    this.WindowFooterCssClasses = windowFooterCssClasses;
    this.WindowResizeCssClasses = windowResizeCssClasses;
    this.ZIndex = zIndex;
}

LswLoading.IsShown = function()
{
    return this._isShown;
}

LswLoading._getWindowInfo = function()
{
    var scrollX = 0, scrollY = 0, width = 0, height = 0, contentWidth = 0, contentHeight = 0;
    if (typeof(window.pageXOffset) == 'number')
    {
        scrollX = window.pageXOffset;
        scrollY = window.pageYOffset;
    }
    else if (document.body && (document.body.scrollLeft ||
        document.body.scrollTop))
    {
        scrollX = document.body.scrollLeft;
        scrollY = document.body.scrollTop;
    }
    else if (document.documentElement && (document.documentElement.scrollLeft 
        || document.documentElement.scrollTop))
    {
        scrollX = document.documentElement.scrollLeft;
        scrollY = document.documentElement.scrollTop;
    }
    if (typeof(window.innerWidth) == 'number')
    {
        width = window.innerWidth;
        height = window.innerHeight;
    }
    else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
    {
        width = document.documentElement.clientWidth;
        height = document.documentElement.clientHeight;
    }
    else if (document.body && (document.body.clientWidth ||
        document.body.clientHeight))
    {
        width = document.body.clientWidth;
        height = document.body.clientHeight;
    }
    if (document.documentElement && (document.documentElement.scrollHeight ||
        document.documentElement.offsetHeight))
    {
        if (document.documentElement.scrollHeight >
            document.documentElement.offsetHeight)
        {
            contentWidth = document.documentElement.scrollWidth;
            contentHeight = document.documentElement.scrollHeight;
        }
        else
        {
            contentWidth = document.documentElement.offsetWidth;
            contentHeight = document.documentElement.offsetHeight;
        }
    }
    else if (document.body && (document.body.scrollHeight ||
        document.body.offsetHeight))
    {
        if (document.body.scrollHeight > document.body.offsetHeight)
        {
            contentWidth = document.body.scrollWidth;
            contentHeight = document.body.scrollHeight;
        }
        else
        {
            contentWidth = document.body.offsetWidth;
            contentHeight = document.body.offsetHeight;
        }
    }
    else
    {
        contentWidth = width;
        contentHeight = height;
    }
    if (height > contentHeight)
        height = contentHeight;
    if (width > contentWidth)
        width = contentWidth;
    var rect = new Object();
    rect.ScrollX = scrollX;
    rect.ScrollY = scrollY;
    rect.Width = width;
    rect.Height = height;
    rect.ContentWidth = contentWidth;
    rect.ContentHeight = contentHeight;
    if(navigator !== 'undefined' &&  navigator.appName !== 'undefined' && navigator.appName.indexOf("Microsoft")!=-1)
    {
        var IEVersion = this._getIEVersionNumber();
        if(IEVersion < 7.0)
        {
            rect.ContentWidth = contentWidth - 22;
            rect.ContentHeight = contentHeight - 4;
        }
    }
    return rect;
}

LswLoading._getIEVersionNumber = function () {
    var ua = navigator.appVersion;
    var MSIEOffset = ua.indexOf("MSIE ");
    
    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}

LswLoading._getCurrentStyleValue = function(element, styleRule, jsStyleRule)
{
    var value = 0;
    if (document.defaultView && document.defaultView.getComputedStyle)
        value = parseInt(document.defaultView.getComputedStyle(element, "")
            .getPropertyValue(styleRule), 0);
    else if (element.currentStyle)
        value = parseInt(element.currentStyle[jsStyleRule], 0);
    if (!isNaN(value))
        return value;
    else
        return 0;
}

LswLoading._calculateStyleOffset = function(element)
{
    var result = new Object();
    result.Height = this._getCurrentStyleValue(element, 'border-top-width',
        'borderTopWidth') + this._getCurrentStyleValue(element, 'border-bottom-width', 'borderBottomWidth') + this._getCurrentStyleValue(element,
        'padding-top', 'paddingTop') + this._getCurrentStyleValue(element,
        'padding-bottom', 'paddingBottom');
    result.Width = this._getCurrentStyleValue(element, 'border-left-width',
        'borderLeftWidth') + this._getCurrentStyleValue(element, 'border-right-width', 'borderRightWidth') + this._getCurrentStyleValue(element,
        'padding-left', 'paddingLeft') + this._getCurrentStyleValue(element,'padding-right', 'paddingRight');
    return result;
}

LswLoading.Open = function(url, width, height, onCloseFunction, x, y,
    ignoreCloseAndAnimation)
{
    if (!ignoreCloseAndAnimation && this._isShown)
        this.Close();
    else if (this._hiddenSelects)
    {
        for (var i = 0; i < this._hiddenSelects.length; i++)
        {
            if (this._hiddenSelects[i].Element.style.visibility == 'hidden')
                this._hiddenSelects[i].Element.style.visibility =
                    this._hiddenSelects[i].Visibility;
        }
        this._hiddenSelects = null;
    }
    if (!this._initialized)
        this._initialize();
    try
    {
        this._modalTitle.childNodes[1].innerHTML =
            this._modalIframe.contentWindow.document.title;
    }
    catch (err){}
    if (!ignoreCloseAndAnimation)
        this._modalIframe.src = url;
    try
    {
        this._modalIframe.contentWindow.opener = window;
    }
    catch (err){}
    this._modalAnimationMask.style.display = 'none';
    this._modalMask.style.display = 'none';
    this._lastWindowInfo = this._getWindowInfo();
    this._modalAnimationMask.style.display = 'block';
    if (width > this._lastWindowInfo.Width)
        width = this._lastWindowInfo.Width;
    this._modalAnimationMask.style.position = 'absolute';
    this._modalAnimationMask.style.zIndex = this.ZIndex;
    this._modalAnimationMask.style.display = 'block';
    this._modalAnimationMask.style.visibility = 'hidden';
    this._modalAnimationMask.style.overflow = 'hidden';
    this._modalAnimationMask.style.width = width + 'px';
    this._modalContent.style.width = width + 'px';
    this._modal.style.position = 'absolute';
    this._modal.style.display = 'block';
    this._modal.style.visibility = 'hidden';
    this._modal.style.left = '0px';
    this._modal.style.top = '0px';
    this._modalMask.style.position = 'absolute';
    this._modalMask.style.display = 'block';
    this._modalMask.style.zIndex = this.ZIndex;
    this._modalMask.style.visibility = 'visible';
    var modalContentOffset = this._calculateStyleOffset(this._modalContent);
    var offset = (this._modal.offsetHeight - this._modalContent.offsetHeight) -
        modalContentOffset.Height;
    if (height + offset > this._lastWindowInfo.Height)
        height = this._lastWindowInfo.Height - offset;
    if (width < this._modalResize.offsetWidth * 2)
        width = this._modalResize.offsetWidth * 2;
    if (width < this._modalClose.offsetWidth * 2)
        width = this._modalClose.offsetWidth * 2;
    if (height < this._modalTitle.offsetHeight + this._modalFooter.offsetHeight)
        height = this._modalTitle.offsetHeight + this._modalFooter.offsetHeight;
    this._modalIframe.style.height = height + 'px';
    this._modalContent.style.height = height + 'px';
    this._modalContent.style.width = (width - (this._modal.offsetWidth -
        this._modalContent.offsetWidth) - modalContentOffset.Width) + 'px';
    this._modalAnimationMask.style.width = (width - 20) + 'px';
    this._modalAnimationMask.style.height = (this._modal.offsetHeight - 66) + 'px';
    this._modalMask.style.left = '0px';
    this._modalMask.style.top = '0px';
    this._modalMask.style.width = (this._lastWindowInfo.ContentWidth) + 'px';
    this._modalMask.style.height = (this._lastWindowInfo.ContentHeight) + 'px';
    //alert(this._lastWindowInfo.ContentWidth + ';' + this._lastWindowInfo.ContentHeight);
    this._lastWindowInfo = this._getWindowInfo();
    var panelWidth = this._modal.offsetWidth;
    var panelHeight = this._modal.offsetHeight;
    var animatePropertyName, animateTargetValue, animateNextValue;
    if (typeof(x) == 'undefined' || isNaN(parseInt(x, 10)))
        x = ((this._lastWindowInfo.Width - panelWidth) / 2) +
            this._lastWindowInfo.ScrollX;
    if (x + panelWidth > this._lastWindowInfo.Width +
        this._lastWindowInfo.ScrollX)
        x = this._lastWindowInfo.Width + this._lastWindowInfo.ScrollX -
            panelWidth;
    if (x < this._lastWindowInfo.ScrollX)
        x = this._lastWindowInfo.ScrollX;
    if (typeof(y) == 'undefined' || isNaN(parseInt(y, 10)))
        y = ((this._lastWindowInfo.Height - panelHeight) / 2) +
            this._lastWindowInfo.ScrollY;
    if (y + panelHeight > this._lastWindowInfo.Height +
        this._lastWindowInfo.ScrollY)
        y = this._lastWindowInfo.Height + this._lastWindowInfo.ScrollY -
            panelHeight;
    if (y < this._lastWindowInfo.ScrollY)
        y = this._lastWindowInfo.ScrollY;
    this._modalAnimationMask.style.left = x + 'px';
    this._modalAnimationMask.style.top = y + 'px';
    animateTargetValue = 0;
    animateNextValue =  - panelHeight;
    this._modal.style.visibility = 'visible';
    this._modalAnimationMask.style.visibility = 'visible';
    this._modalAnimationMask.style.overflow = 'hidden';
    if (this._modalAnimationMask.getClientRects)
    {
        var selectBoxes = document.getElementsByTagName('select');
        this._hiddenSelects = new Array();
        for (var i = 0; i < selectBoxes.length; i++)
        {
            this._hiddenSelects[this._hiddenSelects.length] = 
            {
                Element: selectBoxes[i], Visibility:
                    selectBoxes[i].style.visibility
            };
            selectBoxes[i].style.visibility = 'hidden';
        }
    }
    this._isOpening = true;
    if (ignoreCloseAndAnimation)
        this._animationHandle = window.setTimeout(new Function
            (this._variableName + '._animate(0,0,0,0);'), 9);
    else
    {
        this._modalIframe.style.display = 'none';
        this._animate(0,  - panelHeight, panelHeight / 3, .67);
    }
    this._lastModalInfo = 
    {
        Url: this._modalIframe.src, OnCloseFunction: onCloseFunction, X: x, Y:
            y, Width: parseInt(width, 10), Height: parseInt(height, 10)
    };
    this._isShown = true;
}

LswLoading._checkForScrollResize = function()
{
    if (this._checkForScrollResizeHandle)
        window.clearTimeout(this._checkForScrollResizeHandle);
    if (this._isShown && !this._isOpening && this._lastWindowInfo)
    {
        try
        {
            this._modalTitle.childNodes[1].innerHTML =
                this._modalIframe.contentWindow.document.title;
        }
        catch (err){}
        var windowInfo = this._getWindowInfo();
        if (windowInfo.ScrollX != this._lastWindowInfo.ScrollX ||
            windowInfo.ScrollY != this._lastWindowInfo.ScrollY ||
            windowInfo.Width != this._lastWindowInfo.Width || windowInfo.Height
            != this._lastWindowInfo.Height)
            this.Open(null, this._lastModalInfo.Width,
                this._lastModalInfo.Height, this._lastModalInfo.OnCloseFunction,
                this._lastModalInfo.X, this._lastModalInfo.Y, true);
        else
            this._checkForScrollResizeHandle = window.setTimeout(new Function
                ('window.' + this._variableName + '._checkForScrollResize();'),
                999);
    }
}

LswLoading.Close = function(returnValue)
{
    if (this._isShown)
    {
        if (!this._initialized)
            this._initialize();
        this._modal.style.position = 'absolute';
        this._modal.style.display = 'none';
        this._modalAnimationMask.style.position = 'absolute';
        this._modalAnimationMask.style.display = 'none';
        this._modalMask.style.position = 'absolute';
        this._modalMask.style.display = 'none';
        this._modalIframe.src = this.LoadingHtmlUrl;
        var onCloseFunction = this._lastModalInfo.OnCloseFunction;
        this._isShown = false;
        this._lastModalInfo = null;
        this._windowInfo = null;
        if (this._hiddenSelects)
        {
            for (var i = 0; i < this._hiddenSelects.length; i++)
            {
                if (this._hiddenSelects[i].Element.style.visibility == 'hidden')
                    this._hiddenSelects[i].Element.style.visibility =
                        this._hiddenSelects[i].Visibility;
            }
            this._hiddenSelects = null;
        }
        if (onCloseFunction)
            onCloseFunction(returnValue);
        this.Dispose();
    }
}

LswLoading.Refresh = function()
{
    if (this._animationHandle)
        window.clearTimeout(this._animationHandle);
    this.Dispose();
    if (this._isShown && this._lastModalInfo)
        this.Open(this._lastModalInfo.Url, this._lastModalInfo.Width,
            this._lastModalInfo.OnCloseFunction, this._lastModalInfo.Height,
            this._lastModalInfo.OnCloseFunction, this._lastModalInfo.X,
            this._lastModalInfo.Y);
}

LswLoading._initialize = function()
{
    this._modalMask = document.createElement('div');
    this._modalMask.style.width = 'auto';
    this._modalMask.style.height = 'auto';
    this._modalMask.style.position = 'absolute';
    this._modalMask.style.display = 'none';
    var mm = this._modalMask;
    if (this.WindowMaskCssClasses.length > 0)
    {
        mm.className = this.WindowMaskCssClasses[0];
        for (var i = 1; i < this.WindowMaskCssClasses.length; i++)
        {
            mm.appendChild(document.createElement('div'));
            mm = mm.childNodes[0];
            mm.className = this.WindowMaskCssClasses[i];
            mm.style.width = 'auto';
            mm.style.height = 'auto';
        }
    }
    document.body.appendChild(this._modalMask);
    this._modalAnimationMask = document.createElement('div');
    this._modalAnimationMask.style.position = 'absolute';
    this._modalAnimationMask.style.display = 'none';
    this._modalAnimationMask.style.overflow = 'hidden';
    this._modal = document.createElement('div');
    this._modal.style.width = 'auto';
    this._modal.style.height = 'auto';
    this._modal.style.position = 'absolute';
    this._modal.style.display = 'none';
    var m = this._modal;
    if (this.WindowCssClasses.length > 0)
    {
        m.className = this.WindowCssClasses[0];
        for (var i = 1; i < this.WindowCssClasses.length; i++)
        {
            m.appendChild(document.createElement('div'));
            m = m.childNodes[0];
            m.className = this.WindowCssClasses[i];
            m.style.width = 'auto';
            m.style.height = 'auto';
        }
    }
    this._modalTitle = document.createElement('div');
    m.appendChild(this._modalTitle);
    if (this.WindowTitleCssClasses.length > 0)
    {
        this._modalTitle.className = this.WindowTitleCssClasses[0];
        for (var i = 1; i < this.WindowTitleCssClasses.length; i++)
        {
            this._modalTitle.appendChild(document.createElement('div'));
            this._modalTitle = this._modalTitle.childNodes[0];
            this._modalTitle.className = this.WindowTitleCssClasses[i];
        }
    }
    this._modalTitle.onmousedown = new Function('event', 'window.' +
        this._variableName + '._startDrag(event); return false;');
    this._modalClose = document.createElement('div');
    this._modalTitle.appendChild(this._modalClose);
    var mc = this._modalClose;
    if (this.WindowCloseCssClasses.length > 0)
    {
        mc.className = this.WindowCloseCssClasses[0];
        for (var i = 1; i < this.WindowCloseCssClasses.length; i++)
        {
            mc.appendChild(document.createElement('div'));
            mc = mc.childNodes[0];
            mc.className = this.WindowCloseCssClasses[i];
        }
    }
    this._modalClose.onclick = new Function('window.' + this._variableName +
        '.Close();');
    this._modalTitle.appendChild(document.createElement('span'));
    var e = document.createElement('div');
    e.style.clear = 'both';
    this._modalTitle.appendChild(e);
    this._modalContent = document.createElement('div');
    m.appendChild(this._modalContent);
    if (this.WindowContentCssClasses.length > 0)
    {
        this._modalContent.className = this.WindowContentCssClasses[0];
        for (var i = 1; i < this.WindowContentCssClasses.length; i++)
        {
            this._modalContent.appendChild(document.createElement('div'));
            this._modalContent = this._modalContent.childNodes[0];
            this._modalContent.className = this.WindowContentCssClasses[i];
        }
    }
    this._modalIframe = document.createElement('iframe');
    this._modalIframe.src = this.LoadingHtmlUrl;
    this._modalIframe.width = '100%';
    this._modalIframe.border = '0';
    this._modalIframe.frameBorder = '0';
    this._modalIframe.style.borderLeftWidth = '0px';
    this._modalIframe.style.borderRightWidth = '0px';
    this._modalIframe.style.borderTopWidth = '0px';
    this._modalIframe.style.borderBottomWidth = '0px';
    this._modalContent.appendChild(this._modalIframe);
    this._modalFooter = document.createElement('div');
    m.appendChild(this._modalFooter);
    var mf = this._modalFooter;
    if (this.WindowFooterCssClasses.length > 0)
    {
        mf.className = this.WindowFooterCssClasses[0];
        for (var i = 1; i < this.WindowFooterCssClasses.length; i++)
        {
            mf.appendChild(document.createElement('div'));
            mf = mf.childNodes[0];
            mf.className = this.WindowFooterCssClasses[i];
        }
    }
    this._modalResize = document.createElement('div');
    mf.appendChild(this._modalResize);
    var e = document.createElement('div');
    e.style.clear = 'both';
    mf.appendChild(e);
    var mr = this._modalResize;
    if (this.WindowResizeCssClasses.length > 0)
    {
        mr.className = this.WindowResizeCssClasses[0];
        for (var i = 1; i < this.WindowResizeCssClasses.length; i++)
        {
            mr.appendChild(document.createElement('div'));
            mr = mr.childNodes[0];
            mr.className = this.WindowResizeCssClasses[i];
        }
    }
    this._modalResize.onmousedown = new Function('event', 'window.' +
        this._variableName + '._startResize(event); return false;');
    this._modalAnimationMask.appendChild(this._modal);
    document.body.appendChild(this._modalAnimationMask);
    this._initialized = true;
}

LswLoading.Dispose = function()
{
    if (this._initialized)
    {
        if (this._animationHandle)
            window.clearTimeout(this._animationHandle);
        this._isShown = false;
        this._isOpening = false;
        if (document && document.body)
        {
            document.body.removeChild(this._modalAnimationMask);
            document.body.removeChild(this._modalMask);
            this._modalClose.onclick = null;
            this._modalTitle.onmousedown = null;
            this._modalResize.onmousedown = null;
            this._modal = null;
            this._modalTitle = null;
            this._modalClose = null;
            this._modalAnimationMask = null;
            this._modalMask = null;
            this._modalIframe = null;
            this._modalResize = null;
            this._modalFooter = null;
            this._modalContent = null;
        }
        this._initialized = false;
    }
}

LswLoading._animate = function(targetValue, nextValue, step, acceleration)
{

    if (this._animationHandle)
        window.clearTimeout(this._animationHandle);
    if (!this._isOpening)
        return ;
    var currValue = parseInt(this._modal.style.top, 10);
    if ((step < 0 && currValue < targetValue) || (step > 0 && currValue >
        targetValue) || Math.abs(step) < 1)
    {
        if (this._hiddenSelects)
        {
            for (var i = 0; i < this._hiddenSelects.length; i++)
                this._hiddenSelects[i].Element.style.visibility = 'hidden';
        }
        this._modal.style.top = targetValue + 'px';
        this._modal.style.position = 'static';
        this._modalAnimationMask.style.overflow = 'visible';
        this._animationHandle = null;
        if (!this._isResizing && !this._isDragging)
            this._modalIframe.style.display = 'block';
        this._isOpening = false;
        this._lastWindowInfo = this._getWindowInfo();
        this._checkForScrollResizeHandle = window.setTimeout(new Function
            ('window.' + this._variableName + '._checkForScrollResize();'), 999)
            ;
    }
    else
    {
        this._modal.style.top = nextValue + 'px';
        nextValue = nextValue + step;
        if (step > 0 && nextValue > targetValue)
            nextValue = targetValue;
        else if (step < 0 && nextValue < targetValue)
            nextValue = targetValue;
        step = step * acceleration;
        this._animationHandle = window.setTimeout(new Function
            (this._variableName + '._animate(' + targetValue + ',' + nextValue 
            + ',' + step + ',' + acceleration + ');'), 19);
    }
}

LswLoading._startDrag = function(event)
{
}

LswLoading._endDrag = function(event)
{
}

LswLoading._drag = function(event)
{
}

LswLoading._startResize = function(event)
{
}

LswLoading._endResize = function(event)
{
}

LswLoading._resize = function(event)
{
}


Type.registerNamespace("ScriptLibrary");

ScriptLibrary.LswLoadingAnimation = function(id) {
    this._displayAfter = 0;
    this._timeout = 5 * 60 * 1000;
    this._displayAfterHandle = null;
    this._timeoutHandle = null;
    this._url = '';
    this._width = 179;
    this._height = 75;    
    this._id = id;    
}
ScriptLibrary.LswLoadingAnimation.prototype.show = function(displayAfter) {
    this._url = '/portal/Loading.html';
    
    this._width = 179;
    this._height = 75;
    if(typeof(displayAfter) == 'undefined')
    {
        displayAfter = this._displayAfter;
    }
    this._displayAfterHandle = window.setTimeout ("window." + this._id + ".showModal();", 1);
}

ScriptLibrary.LswLoadingAnimation.prototype.showModal = function() {
    LswLoading.Open(this._url, this._width, this._height, null, null, null, false);
    this._timeoutHandle = window.setTimeout ("LswLoading.Close();", this._timeout);            
}

ScriptLibrary.LswLoadingAnimation.prototype.reset = function() {
    if(this._displayAfterHandle != null)
    {
        window.clearTimeout(this._displayAfterHandle);
        this._displayAfterHandle = null;
    }
    if(this._timeoutHandle != null)
    {
        window.clearTimeout(this._timeoutHandle);
        this._timeoutHandle = null;
    }
    LswLoading.Close();    
}

ScriptLibrary.LswLoadingAnimation.registerClass('ScriptLibrary.LswLoadingAnimation', null);




if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 