anchor.diff:    <head>
       <title><%=messages.getString("popupTitle")%></title>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  -    <script type="text/javascript" language="Javascript">
  -      function rtrim(texte){
  -        while (texte.substring(0,1) == ' '){
  -          texte = texte.substring(1, texte.length);
  -        }
  -        return texte;
  -      }
  -
  -      function ltrim(texte){
  -        while (texte.substring(texte.length-1,texte.length) == ' ') {
  -          texte = texte.substring(0, texte.length-1);
  -        }
  -
  -        return texte;
  -      }
  -      function isFormFilled(){
  -
  -        var isEmpty = false;
  -        if (trim(document.addForm.name.value) == "")
  -          isEmpty = true;
  -        return isEmpty;
  -      }
  -
  -      function trim(texte){
  -        var len = texte.length;
  -        if (len == 0){
  -          texte = "";
  -        }
  -        else {
  -          texte = rtrim(texte);
  -          texte = ltrim(texte);
  -        }
  -        return texte;
  -      }
  -
  -      function addFile()
  -      {
  -        if (!isFormFilled() && isCorrectForm()) {
  -          document.addForm.submit();
  +    <script type="text/javascript">
  +      function addFile() {
  +    	var documentName = document.addForm.name.value;
  +        if ($.trim(documentName) != "" && isCorrectForm()) {
  +            if ($("#documentDesc").val().length > 255) {
  +            	var errorMsg =" <%=descriptionLabel%> : <%=attResources.getString("GML.nbCarMax")%> 255 <%= resources.getString("GML.caracteres")%>\n";
  +            	alert(errorMsg);
  +        	} else {
  +        		document.addForm.submit();
  +        	}
           } else {
             alert("<%=pleaseFill%>");
           }
         }
  -    </script>
  +</script>
       <% if (formUpdate != null) {%>
       <script type="text/javascript" src="<%=m_context%>/wysiwyg/jsp/FCKeditor/fckeditor.js"></script>
       <% formUpdate.displayScripts(out, context);%>
  
positive.code:       String descriptionLabel = messages.getString("description");
        String documentPathLabel = messages.getString("document");
        String versionTypeLabel = messages.getString("typeOfVersion");
        String commentsLabel = messages.getString("comments");
        String[] radioButtonLabel = {messages.getString("public"), messages.getString("archive")};
        String requiredFieldLabel = messages.getString("required");
  
  
negative.code:       String name = "";
        String description = "";
        String versionType = new Integer(VersioningSessionController.WORK_VERSION).toString();
        String mimeType = "";
        File dir = null;
        int size = 0;
  