function keepAlive(objExecutor){
	
   var myAjax = new Ajax.Request(
			"KeepAlive.aspx", 
			{
				method: 'get', 
				parameters: '', 
				onComplete: showResponse
			});
}

alertedsession = false;

function showResponse(originalRequest)
	{
		//put returned XML in the textarea
		if (originalRequest.responseText == "NOT OK"){
			if (!alertedsession){
				alert('Warning: Your login session has expired, if you have any unsubmitted content please copy it to resubmit it after login');
				alertedsession = true;
			}
		}
	}

new PeriodicalExecuter(keepAlive, 600);