
function createXHR() 
{
    var request = false;
        try {
            request = new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (err2) {
            try {
                request = new ActiveXObject('Microsoft.XMLHTTP');
            }
            catch (err3) {
		try {
			request = new XMLHttpRequest();
		}
		catch (err1) 
		{
			request = false;
		}
            }
        }
    return request;
}

var timerConn;
function holdConn(){
	var xhr = createXHR();

	var aleatorio=Math.random(); 
	xhr.open("GET", "/manteinAlive.asp?aleatorio="+aleatorio, true);
    	xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xhr.setRequestHeader("Accept-Charset","8859-1");
	xhr.send(null);
}

function initConn(){
	if(!timerConn)timerConn=setInterval(holdConn,600000);
}

