﻿var timerID;

function StartSessionTrackerTimer()
{
   TimerID = window.setInterval("UpdateSessionTimeStamp()",30000);
}

function UpdateSessionTimeStamp() 
{
    var CurrentSessionID = parent.document.getElementById('ctl00_hiddenSessionID');
    var CurrentCompanyID = parent.document.getElementById('ctl00_hiddenCompanyID');
    var CurrentUserID = parent.document.getElementById('ctl00_hiddenUserID');
    
    try
    {
        checkForUpdate =  SessionTrackerWS.UpdateSession
            (
                CurrentSessionID.value, //Param
                CurrentCompanyID.value, //Param
                CurrentUserID.value, //Param
                OnComplete,     //Complete event
                OnTimeout       //Timeout event
            );
    }
    catch(exception)
    {
    }    
}

function OnComplete(result) 
{
}

function OnTimeout(result) 
{
   //TODO: [DS]Need to spend some time working out why the UpdateSession call sometimes times out after a while
}