  function isOk(key,d){
     invalid='<>/'
     p=invalid.indexOf(key);
     l=key.length;
     s=key.substring(parseInt(l)-1);
     if(invalid.indexOf(s)>=0)
     {
       //alert(p);alert(l);alert(key);alert(s);alert(d);
       document.LAYOUTFORM.elements[d].value=key.substring(0,parseInt(l)-1);return false;
     }
     return true;
    }

    function en(){
      document.fr.b.disabled=false;
    }

    function aa(){
     alert('ddsdfd');
    }

    function test(n){
     valid='012'
     l=n.length;
     alert(n);
     alert(l);
     s=n.substring(parseInt(l)-1);
     alert(s);
     alert(valid.indexOf(s));
     if(valid.indexOf(s)<0){
      alert('f');
      return false;
     }
     else{
      alert('t');
      return true;
     }
    }

    function ch(n,d){
     if(n.indexOf('<')>-1){
       s=n.indexOf('<');
       l=n.length;
       document.LAYOUTFORM.elements[d].value=n.substring(0,s)+n.substring(s+1,l);
       n=document.LAYOUTFORM.elements[d].value;
       ch(n,d);  
     } 
     else
     {
      if(n.indexOf('>')>-1){
       s=n.indexOf('>');
       l=n.length;
       document.LAYOUTFORM.elements[d].value=n.substring(0,s)+n.substring(s+1,l);
       n=document.LAYOUTFORM.elements[d].value;
       ch(n,d);  
      } 
      else
      {
       return true;
      }
     }
    }
