﻿function CheckForTimeout(page) {
    client = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
    
    //client.onreadystatechange = processStateChange;					
    client.open("get",page + ".aspx?toChk=1",true);
    client.send(null);    
}
function PageTimer(page) {
    var tStart  = null;
    
    alert("in timer: " + page);
    if(!tStart) { tStart = new Date(); }

    var tDate = new Date();
    var tDiff = tDate.getTime() - tStart.getTime();

    tDate.setTime(tDiff);

    CheckForTimeout(page)
    timerID = setTimeout("PageTimer(" + page + ")", 60000);
}


