var timerRunning = '';

function checkLimit(form,input,limit) {
	content = eval("document." + form + "." + input + ".value");
	contentRaw = content.replace(/[\r\n]/g, '');
	len = contentRaw.length
	//hidden = "document." + form + ".checkLimitVal_" + input + ".value";
	//display = "document." + form + "." + input + ".value";
	//if (len <= limit) {
		document.getElementById("checkLimitCount_"+input).innerHTML = len;
		//setCount = hidden + "=" + display;
		//eval(setCount);
	//	}
	//else {
	//	restore = display + "=" + hidden;
	//	eval(restore);
	//	alert('Maximum length for this field is ' + limit + ' characters');
	//	}
	if (len > limit) {
		alert('Maximum length for this field is ' + limit + ' characters');
	}
	if (timerRunning != 1) {
		refreshSession();
	}
}
	
function refreshSession() {
	if (timerRunning == 0) {
		var randomnumber=Math.floor(Math.random()*100000000)
		fakeImage = new Image();
		fakeImage.src = "/sessionrefresh.cfm?"+randomnumber;
	}
	mytime=setTimeout('timerRunning = 0',1200000);
	timerRunning = 1;
}

