﻿setTimeout("Comevo_refreshUserSession()", 300000); //300000 ms = 5 min.

function Comevo_refreshUserSession()
{
    // Calls the corresponding PageMethod in the BasePage.
    // This, hopefully, keeps the session active and lets us know who is currently
    // on the site.
    if (window.location.pathname.toLowerCase().indexOf('intake.aspx') == -1) 
    {
        PageMethods.RefreshUserSession();
    }
    
    // Set a timer to keep calling this every so often.
    setTimeout("Comevo_refreshUserSession()", 300000); //300000 ms = 5 min.
}

function Comevo_rotateSidebar(nextSidebar, totalSidebars, seconds) 
{
    document.getElementById("pageSidebarMain").innerHTML = 
        document.getElementById("pageSidebar" + nextSidebar).innerHTML;
   
    if (nextSidebar < totalSidebars) 
    {
        nextSidebar++;
    }
    else 
    {
        nextSidebar = 1;
    }

    setTimeout("Comevo_rotateSidebar(" + nextSidebar + "," + totalSidebars +"," + seconds + ")", seconds * 1000); //1000 ms = 1 sec.
}


