function count(chars,id) {
filllength = document.getElementById("T" + id).value;
free = chars - filllength.length;
if(free<0) { document.getElementById("T" + id).value = filllength.substr(0,chars); free = 0; }
document.getElementById("C" + id).value = free; }
