 var limit = 2000;
 function check() {
   if(document.f.modelinfo.value.length > limit) {
     alert('Too much data!');
     document.f.modelinfo.focus();
     return false; }
   else
     return true; }
 function update() {
   var old = document.f.counter.value;
   document.f.counter.value=document.f.modelinfo.value.length;
   if(document.f.counter.value > limit && old <= limit) {
     alert('Too much data in the text box!');
     if(document.styleSheets) {
       document.f.counter.style.fontWeight = 'bold';
       document.f.counter.style.color = '#ff0000'; } }
   else if(document.f.counter.value <= limit && old > limit
	   && document.styleSheets ) {
       document.f.counter.style.fontWeight = 'normal';
       document.f.counter.style.color = '#000000'; } 
   }
