Sys.Application.add_init(AppInit);
//Sys.Application.add_init(function() { Sys.Services.AuthenticationService.set_path('<%= ResolveClientUrl("~/Authentication_JSON_AppService.axd") %>'); });
function AppInit(sender) {
  
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(End); 

}

function End(sender, args) {
    Sys.Application.initialize();
    if (Sys.Services.AuthenticationService.get_isLoggedIn()) {

    }
    else {
        //uts();
        sidenav();

        try
        {
          //loadChart();
        }
        catch(err)
        {
          alert("error");
        } 

        $(document).ready(function () {
                $(".btn-slide").click(function () {
                    $("#panel").slideToggle("slow");
                    $(this).toggleClass("active"); return false;
                });
            });
        if(sender._postBackSettings.sourceElement.id=="ContentPlaceHolderDefault_UmbracoLoginView_Login1_login"){
          $("#panel").slideToggle("slow");
        }
     
    }

}


