﻿

window.addEvent('domready', function() {
    setTimeout(wpKeepSessionAlive, 300000);
});

function wpKeepSessionAlive() {

    var xmlhttp = getXmlHTTP();
    var url = wp_GlobalObject.getRootPath() + '/WebPlusResources/ajaxServices/KeepSessionAlive.ashx?rnd=' + Math.random();
    xmlhttp.open("POST", url);
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.responseText == 'OK') {
                setTimeout(wpKeepSessionAlive, 300000);
            }

        }

    }
    xmlhttp.send('var=1');


}
