// Copiright (c) 2005 by Whitelion

function find(id)
{
 if(document.all)return(document.all.item(id));
 if(document.getElementById)return(document.getElementById(id));
 return(false);
}

function initLen(t,l,len)
{
 if(t)
     {
      if(t.value.length>len)t.value=t.value.substring(0,len);
      var obj=find(l);
      if(obj)obj.value=len-t.value.length;
     }
}

function checkLen(t,l,len)
{
 if(t)
     {
     initLen(t,l,len);
     t.focus();
     }
}

