function ajaxRequestContainsErrors() {
    return document.getElementById("maximumSeverityForm:maximumSeverity").value > 0;
}

function activeExpiredMessage(requestContextPath) {
	A4J.AJAX.onExpired = function(loc) {
		// Registration form
		if (loc.pathname.indexOf('accomm-register.html') != -1 ||
			loc.pathname.indexOf('questionnaire.html') != -1 ||
			loc.pathname.indexOf('eco-questionnaire.html') != -1) {
			alert('WE\'RE SORRY - but you have exceeded the Application\'s "time out limit"\nfor submitting the current page.\nYou will therefore need to restart the Registration process.');
			
			return requestContextPath + '/public/accomm-register.html';
		}
		// Other pages
		else {
			alert('WE\'RE SORRY - but you have exceeded the Application\'s "time out limit".\nYou will be redirected to the home page.');
		}
		
		return requestContextPath + '/public/home.html';
	}
}
