Simplify javascript redirecting functions logic
The first thing I see which will cut the file at least in half is making a single redirectToPage function that redirects to a given page. You have many copies of the same basic function which currently looks like this

function functionName(params) {
    StartLoading();
    loading = 0;
    location.href = "someURL"
}


When you see a similar block of code like this being repeated multiple times, it's a good time to refactor, (it's debatable, but I would consider refactoring at 2 repetitions, and definitely refactor at 3). Your new function will be

function redirectToPage(url) {
    StartLoading();
    loading = false; // explained below
    location.href = url;
}


You can now erase most of that file, using this one more generic function and passing the urls as arguments.

You are also using loading as a boolean sometimes, and sometimes as an integer. Your code will be easier to reason about if you stick to one. It looks like you're only using loading as a boolean, so I changed loading = 0 to loading = false. You can make this change throughout the rest of the file as well.

This may be enough changes for you. If not, there are a few other functions that you have that redirect to a page but with slightly different functionality, such as calling AbortPushUpdates or not setting the loading variable. You can extend your new redirectToPage function to handle these cases like so

/**
 * Call this function giving the url to redirect to, and other options
 */
function redirectToPage(url, options) {
   if (!options || !options.hasOwnProperty('startLoading') || options.startLoading == true) {
     // default is to run StartLoading()
     StartLoading();
   }

   if (options &amp;&amp; options.hasOwnProperty('abortPushUpdates') &amp;&amp; options.abortPushUpdates) {
     // default is to NOT call AbortPushUpdates
     AbortPushUpdates();
   }

   if (!options || !options.hasOwnProperty('setLoading') || options.setLoading == true) {
     // default is to set the loading variable
     loading = false;
   }

   // Always redirect
   location.href = url;
 }


You can now use this function in any of the following ways

redirectToPage('/Administration/AddAccount/' + accountID);
redirectToPage('/Administration/AddCompany', {setLoading: false, startLoading: false})
redirectToPage('/Home/SelectEquipmentCollection', {abortPushUpdates: true})


Good luck with your refactor, and let me know if you have any follow up questions!