
<%@ page import="vkc.view.form.NewDocumentForm" %>

<%@ taglib uri="struts-bean"  prefix="bean"  %>
<%@ taglib uri="struts-html"  prefix="html"  %>
<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="vkc-taglib"   prefix="vkc"   %>

<vkc:init/>
<html:html locale="true">
<head>
    <meta http-equiv="content-type"  content="text/html; charset=iso-8859-1" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="pragma"        content="no-cache" />
    <meta http-equiv="expires"       content="0" />

  	<vkc:cssinclude />

    <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'   />"></script>
    <script type="text/javascript" src="<vkc:rewrite page='/common/calendar.js'/>"></script>
    <script type="text/javascript" src="<vkc:rewrite page='/common/overlib/overlib.js'/>"><!-- overLIB (c) Erik Bosrup --></script>
    <script type="text/javascript" src="<vkc:rewrite page='/common/tiny_mce/tiny_mce.js'/>"></script>

    <script type="text/javascript">
    window.name = "MAINVIEW";
	initTinyMCE("<vkc:write name='user' property='language.shortName'/>", "<vkc:rewrite page='/templates/${template.name}/tiny_mce.css'/>");
    var currentCalendar = null;

    function init() {
        setAnchor();
    }

    function setAnchor() {
        <logic:present parameter="anchor">
            <bean:parameter id="anchor2" name="anchor"/>
            this.location.hash = '<%=anchor2%>';
        </logic:present>
    }

    function deleteAttribute( index ) {
        var form = document.forms[0];
        form.index.value = index;
    }
    function unloadPage() {
        if ( currentCalendar != null ) {
              hideCalendar();
        }
    }

    function selectDocType() {
       var index = 0;
       var doc   = document.forms[ 0 ].newDocumentFormFile.value;
       var i     = doc.lastIndexOf( "." );
       var suf   = doc.substring( i ).toUpperCase();

       if ( suf == ".BMP" ) 	 index = 1;
       <logic:iterate id="docType" name="newDocumentForm" property="documentTypes" indexId="i" offset="2">
		else if ( suf == ".<vkc:write name="docType" property="extension" />" ) index = <vkc:write name="i"/>;
       </logic:iterate>

       document.forms[ 0 ].newDocumentExtension.selectedIndex=index;
       return;
    }
	
    function editText(elem) {
        if (document.getElementById) {
		    while (document.getElementById("newDocumentDescription").value.search(/\r\n/)!=-1 
		    	 || document.getElementById("newDocumentDescription").value.search(/\r/)!=-1 
		    	 || document.getElementById("newDocumentDescription").value.search(/\n/)!=-1) {
			 	if (document.getElementById("newDocumentDescription").value.search(/\r\n/)!= -1) {
			 		document.getElementById("newDocumentDescription").value = document.getElementById("newDocumentDescription").value.replace(/\r\n/," ");
			 	} else {
			 		if (document.getElementById("newDocumentDescription").value.search(/\r/)!=-1) {
			 			document.getElementById("newDocumentDescription").value = document.getElementById("newDocumentDescription").value.replace(/\r/," ");
			 		}
			 		
			 		if (document.getElementById("newDocumentDescription").value.search(/\n/) != -1) {
			 			document.getElementById("newDocumentDescription").value = document.getElementById("newDocumentDescription").value.replace(/\n/," ");
			 		}
		 		}
			}
		}
	}
   
    function uploadTypeChanged() {
        var form = document.forms[0];
       
        if (form.action.indexOf('?') == -1) {
          form.action = form.action + '?action.change.uploadtype=true';
        } else {
          form.action = form.action + '&action.change.uploadtype=true';
        }

        form.submit();

        return true;
    }

    function showHelpText() {
    	var text = '<vkc:message javascript="true" filter="false" key="vkc.keywords.help"/>';
        
        return overlib( text, STICKY, MOUSEOFF, WIDTH, 200, OFFSETX, 30, OFFSETY, -10, RIGHT );
    }

    function toggleTinyMCEToolbar() {
        var form = document.forms[0];
    	<logic:equal name="newDocumentForm" property="showTinyMCEToolbar" value="true">
    	form.showTinyMCEToolbar.value = 'false';
    	</logic:equal>
    	<logic:equal name="newDocumentForm" property="showTinyMCEToolbar" value="false">
    	form.showTinyMCEToolbar.value = 'true';
    	</logic:equal>
        
        if (form.action.indexOf('?') == -1) {
          form.action = form.action + "?action.toggle.tinymcetoolbar=true";
        } else {
          form.action = form.action + "&action.toggle.tinymcetoolbar=true";
        }

        form.submit();
    }

    </script>

</head>
<body onload="init();" onUnload="unloadPage();">
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<table width="auto" cellspacing="5" cellpadding="0" border="0">
  <logic:present name="<%=org.apache.struts.Globals.ERROR_KEY%>">
  <html:messages id="error" message="false">
  <tr><td align="left" nowrap="nowrap" colspan="2"><span class="error"><b><vkc:write name="error"/></b></span></td></tr>
  </html:messages>
  <tr><td colspan="2"><vkc:img page="/templates/${template.name}/gfx/trans.gif" alt="" height="5" border="0"/></td></tr>
  </logic:present>

  <html:form action="/newDocument" method="post" enctype="multipart/form-data">

  <bean:define id="form" name="newDocumentForm"/>

  <html:hidden property="categoryId"   name="form"/>
  <html:hidden property="sourcePageId" name="form"/>
  <html:hidden property="newDocumentPreDocId" name="form"/>
  <html:hidden property="index" name="form"/>
  <html:hidden property="conversionResponse" name="form"/>
  <logic:notEmpty name="form" property="targetId">
    <html:hidden property="targetId" name="form"/>
  </logic:notEmpty>
  <logic:notEmpty name="form" property="subTargetId">
    <html:hidden property="subTargetId" name="form"/>
  </logic:notEmpty>
  <logic:notEmpty name="form" property="newDocumentWebcopyName">
    <html:hidden property="newDocumentWebcopyName" name="form"/>
  </logic:notEmpty>

  <vkc:hidden property="showTinyMCEToolbar"/>

  <logic:notEmpty property="category" name="form">
  <logic:empty name="form" property="classifyResults">

  <logic:equal value="0" name="form" property="newDocumentPreDocId">
  <tr>
    <td width="100%" align="left" colspan="2">
      <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
          <td align="left" nowrap="nowrap" colspan="1"><b><vkc:message key="vkc.document.new.title"/></b></td>
          <td align="right" nowrap="nowrap" colspan="1">&nbsp;<vkc:message key="mandatory.field1"/>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/>&nbsp;<vkc:message key="mandatory.field2"/></td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:equal>

  <logic:greaterThan value="0" name="form" property="newDocumentPreDocId">
  <tr>
    <td width="100%" align="left" colspan="2">
      <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
          <td align="left" nowrap="nowrap" colspan="1"><b><vkc:message key="vkc.document.new.version.title"/></b></td>
          <td align="right" nowrap="nowrap" colspan="1">&nbsp;<vkc:message key="mandatory.field1"/>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/>&nbsp;<vkc:message key="mandatory.field2"/></td>
        </tr>
      </table>
    </td>
  </tr>
  </logic:greaterThan>
  
  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td nowrap="nowrap"><b><vkc:message key="vkc.category"/>:</b></td>
    <td colspan="1">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td>
            <logic:iterate id="pathdescr" name="form" property="category.absPathDescr.pathNodes" indexId="index">
            <logic:greaterThan name="index" value="0">
            <span dir="ltr">
            <vkc:img page="/templates/${template.name}/gfx/dot.gif" border="0" alt=""/>
            </span>
            </logic:greaterThan>

            <logic:equal value="true" name="pathdescr" property="lastNode">
            <span dir="ltr">
            <b><vkc:write name="pathdescr" property="pathName"/></b>
            </span>
            </logic:equal>

            <logic:equal value="false" name="pathdescr" property="lastNode">
            <span dir="ltr">
            <vkc:write name="pathdescr" property="pathName"/>
            </span>
            </logic:equal>
            </logic:iterate>
          </td>
        </tr>
      </table>
    </td>
  </tr>
	
  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.upload"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <table align="left" cellpadding="0" cellspacing="0">
        <tr>
         <td nowrap="nowrap"><html:radio property="newDocumentUploadType" name="form" value="file" onclick="uploadTypeChanged();" /></td>
         <td nowrap="nowrap"><vkc:img page="/templates/${template.name}/gfx/document.gif" border="0" alt=""/></td>
         <td nowrap="nowrap">&nbsp;<vkc:message key="vkc.document.type.file"/>&nbsp;&nbsp;</td>

         <td nowrap="nowrap"><html:radio property="newDocumentUploadType" name="form" value="link" onclick="uploadTypeChanged();" /></td>
         <td nowrap="nowrap"><vkc:img page="/templates/${template.name}/gfx/www-link.gif" border="0" alt=""/></td>
         <td nowrap="nowrap">&nbsp;<vkc:message key="vkc.document.type.link"/>&nbsp;&nbsp;</td>

         <td nowrap="nowrap"><html:radio property="newDocumentUploadType" name="form" value="webcopy" onclick="uploadTypeChanged();" /></td>
         <td nowrap="nowrap"><vkc:img page="/templates/${template.name}/gfx/www-link.gif" border="0" alt=""/></td>
         <td nowrap="nowrap">&nbsp;<vkc:message key="vkc.document.type.webcopy"/>&nbsp;&nbsp;</td>

         <td nowrap="nowrap"><html:radio property="newDocumentUploadType" name="form" value="note" onclick="uploadTypeChanged();" /></td>
         <td nowrap="nowrap"><vkc:img page="/templates/${template.name}/gfx/note.gif" border="0" alt=""/></td>
         <td nowrap="nowrap">&nbsp;<vkc:message key="vkc.document.type.note"/></td>

         <td width="100%">&nbsp;</td>
      </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <logic:equal name="form" property="tinyMCECompatible" value="true">
  <logic:equal name="form" property="showTinyMCEToolbar" value="false">
  <style type="text/css">
  .mceToolbar {
      display:none;
  }
  </style>
  </logic:equal>
  </logic:equal>


  <logic:equal name="form" property="fileUpload" value="true">
  <%-- Behandlung von normalen Dateien --%>

  <html:hidden name="form" property="newDocumentArchiveId"/>

  <logic:notEmpty name="form" property="newDocumentArchiveId">
  <html:hidden property="newDocumentName" name="form"/>
  <html:hidden property="newDocumentSize" name="form"/>
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.file"/>:</b></td>
    <td width="100%" align="left"><vkc:write name="form" property="newDocumentName"/></td>
  </tr>
  </logic:notEmpty>

  <logic:empty name="form" property="newDocumentArchiveId">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.file"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left">
      <html:file property="newDocumentFormFile" size="50" style="width:100%;" onchange="return selectDocType();" onblur="return selectDocType();"/>
    </td>
  </tr>
  </logic:empty>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.filetype"/>:</b></td>
    <td width="100%" align="left">
      <html:select name="form" property="newDocumentExtension" size="1">
        <bean:define id="documentTypes" name="form" property="documentTypes"/>
        <vkc:options collection="documentTypes" property="extension" labelProperty="extensionLabel"/>
      </html:select>
    </td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.author"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentAuthorName" style="width:100%;" maxlengthProperty="document.authorname"/></td>
  </tr>

  <logic:equal name="categorySettings" property="showCreationDate" value="true"> 
  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.creationdate"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentCreationDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentCreationDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentClass" value="true">
  <logic:notEmpty name="form" property="documentClasses">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.class"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select property="newDocumentClassId">
        <logic:iterate id="documentClass" name="form" property="documentClasses" type="vkc.db.entities.VKCDocumentClass">
        <html:option value="<%=String.valueOf( documentClass.getDocClassId() )%>"><vkc:message name="documentClass" property="nameKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentStatus" value="true">
  <logic:notEmpty name="form" property="documentStati">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.status"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select name="form" property="newDocumentStatus" size="1">
        <logic:iterate id="status" name="form" property="documentStati" type="vkc.db.entities.VKCDocumentStatus">
        <html:option value="<%=String.valueOf( status.getStatus() )%>"><vkc:message name="status" property="descriptionKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>
  
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.versiondescr"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentVersionDesc" style="width:100%;" maxlengthProperty="document.versiondesc"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.label"/>:</b></td>
    <td width="100%" align="left">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td><vkc:text name="form" property="newDocumentVersionHigh" size="3" styleClass="monospaced"/></td>
          <td valign="bottom" >&nbsp;.&nbsp;</td>
          <td><vkc:text name="form" property="newDocumentVersionLow" size="3" styleClass="monospaced"/></td>
        </tr>
      </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <tr>
	<td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.generate"/>:</b></td>
	<td width="100%" align="left" colspan="1">
	  <table cellpadding="0" cellspacing="0" border="0">
	    <tr>
		  <td><html:checkbox property="autoTitle"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumenttitle"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoKeyword"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentkeyword"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoDescription"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentdescription"/>&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
          <td><vkc:button property="action.analyse" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.analyse" /></vkc:button></td>
		</tr>
	  </table>
	</td>
  </tr>
  
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.title"/>:&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentTitle" style="width:100%;" maxlengthProperty="document.title"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.keywords"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentKeywords" style="width:100%;" maxlengthProperty="document.keywords" onfocus="return showHelpText();" onblur="return nd();"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap" valign="top"><b><vkc:message key="vkc.description"/>:</b></td>
    <td width="100%" align="left">
      <logic:equal name="form" property="tinyMCECompatible" value="true">
      <logic:equal name="form" property="showTinyMCEToolbar" value="true">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      <logic:equal name="form" property="showTinyMCEToolbar" value="false">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      </logic:equal>
      <vkc:textarea rows="7" style="width:100%;" property="newDocumentDescription" styleId="newDocumentDescription"/>
    </td>
  </tr>
  
     
  </logic:equal>

  <logic:equal name="form" property="linkUpload" value="true">
  <%-- Behandlung von WWW Links --%>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.link"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left" nowrap="nowrap"><vkc:text name="form" property="newDocumentName" maxlengthProperty="document.name" style="width:100%;"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.author"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentAuthorName" style="width:100%;" maxlengthProperty="document.authorname"/></td>
  </tr>

  <logic:equal name="categorySettings" property="showCreationDate" value="true"> 
  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.creationdate"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentCreationDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentCreationDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentClass" value="true">
  <logic:notEmpty name="form" property="documentClasses">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.class"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select property="newDocumentClassId">
        <logic:iterate id="documentClass" name="form" property="documentClasses" type="vkc.db.entities.VKCDocumentClass">
        <html:option value="<%=String.valueOf( documentClass.getDocClassId() )%>"><vkc:message name="documentClass" property="nameKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentStatus" value="true">
  <logic:notEmpty name="form" property="documentStati">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.status"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select name="form" property="newDocumentStatus" size="1">
        <logic:iterate id="status" name="form" property="documentStati" type="vkc.db.entities.VKCDocumentStatus">
        <html:option value="<%=String.valueOf( status.getStatus() )%>"><vkc:message name="status" property="descriptionKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.versiondescr"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentVersionDesc" style="width:100%;" maxlengthProperty="document.versiondesc"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.label"/>:</b></td>
    <td width="100%" align="left">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td><vkc:text name="form" property="newDocumentVersionHigh" size="3" styleClass="monospaced"/></td>
          <td valign="bottom" >&nbsp;.&nbsp;</td>
          <td><vkc:text name="form" property="newDocumentVersionLow" size="3" styleClass="monospaced"/></td>
        </tr>
      </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <tr>
	<td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.generate"/>:</b></td>
	<td width="100%" align="left" colspan="1">
	  <table cellpadding="0" cellspacing="0" border="0">
		<tr>
		  <td><html:checkbox property="autoTitle"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumenttitle"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoKeyword"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentkeyword"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoDescription"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentdescription"/>&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
          <td><vkc:button property="action.analyse" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.analyse" /></vkc:button></td>
		</tr>
	  </table>
	</td>
  </tr>
  

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.title"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentTitle" style="width:100%;" maxlengthProperty="document.title"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.keywords"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentKeywords" style="width:100%;" maxlengthProperty="document.keywords" onfocus="return showHelpText();" onblur="return nd();"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap" valign="top"><b><vkc:message key="vkc.description"/>:</b></td>
    <td width="100%" align="left">
      <logic:equal name="form" property="tinyMCECompatible" value="true">
      <logic:equal name="form" property="showTinyMCEToolbar" value="true">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      <logic:equal name="form" property="showTinyMCEToolbar" value="false">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      </logic:equal>
      <vkc:textarea rows="7" style="width:100%;" property="newDocumentDescription" styleId="newDocumentDescription"/>
    </td>
  </tr>

  </logic:equal>

  <logic:equal name="form" property="webCopyUpload" value="true">
  <%-- Behandlung von WWW Kopien --%>

  <html:hidden name="form" property="newDocumentArchiveId"/>

  <logic:notEmpty name="form" property="newDocumentArchiveId">
  <html:hidden property="newDocumentName" name="form" />
  <html:hidden property="newDocumentSize" name="form" />
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.link.copy"/>:</b></td>
    <td width="100%" align="left"><vkc:write name="form" property="newDocumentName"/></td>
  </tr>
  </logic:notEmpty>

  <logic:empty name="form" property="newDocumentArchiveId">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.link"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left" nowrap="nowrap"><vkc:text name="form" property="newDocumentName" maxlengthProperty="document.name" style="width:100%;"/></td>
  </tr>
  </logic:empty>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.author"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentAuthorName" style="width:100%;" maxlengthProperty="document.authorname"/></td>
  </tr>

  <logic:equal name="categorySettings" property="showCreationDate" value="true"> 
  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.creationdate"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentCreationDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentCreationDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentClass" value="true">
  <logic:notEmpty name="form" property="documentClasses">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.class"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select property="newDocumentClassId">
        <logic:iterate id="documentClass" name="form" property="documentClasses" type="vkc.db.entities.VKCDocumentClass">
        <html:option value="<%=String.valueOf( documentClass.getDocClassId() )%>"><vkc:message name="documentClass" property="nameKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentStatus" value="true">
  <logic:notEmpty name="form" property="documentStati">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.status"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select name="form" property="newDocumentStatus" size="1">
        <logic:iterate id="status" name="form" property="documentStati" type="vkc.db.entities.VKCDocumentStatus">
        <html:option value="<%=String.valueOf( status.getStatus() )%>"><vkc:message name="status" property="descriptionKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.versiondescr"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentVersionDesc" style="width:100%;" maxlengthProperty="document.versiondesc"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.label"/>:</b></td>
    <td width="100%" align="left">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td><vkc:text name="form" property="newDocumentVersionHigh" size="3" styleClass="monospaced"/></td>
          <td valign="bottom" >&nbsp;.&nbsp;</td>
          <td><vkc:text name="form" property="newDocumentVersionLow" size="3" styleClass="monospaced"/></td>
        </tr>
      </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <tr>
	<td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.generate"/>:</b></td>
	<td width="100%" align="left" colspan="1">
	  <table cellpadding="0" cellspacing="0" border="0">
		<tr>
		  <td><html:checkbox property="autoTitle"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumenttitle"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoKeyword"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentkeyword"/>&nbsp;&nbsp;&nbsp;</td>
		  <td><html:checkbox property="autoDescription"/></td>
		  <td align="left" nowrap="nowrap"><vkc:message key="sysparam.context.document.enabledocumentdescription"/>&nbsp;&nbsp;&nbsp;</td>
          <td>&nbsp;</td>
          <td><vkc:button property="action.analyse" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.analyse" /></vkc:button></td>
		</tr>
	  </table>
	</td>
  </tr>
  

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.title"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentTitle" style="width:100%;" maxlengthProperty="document.title"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.keywords"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentKeywords" style="width:100%;" maxlengthProperty="document.keywords" onfocus="return showHelpText();" onblur="return nd();"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap" valign="top"><b><vkc:message key="vkc.description"/>:</b></td>
    <td width="100%" align="left">
      <logic:equal name="form" property="tinyMCECompatible" value="true">
      <logic:equal name="form" property="showTinyMCEToolbar" value="true">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      <logic:equal name="form" property="showTinyMCEToolbar" value="false">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      </logic:equal>
      <vkc:textarea rows="7" style="width:100%;" property="newDocumentDescription" styleId="newDocumentDescription"/>
    </td>
  </tr>

  </logic:equal>

  <logic:equal name="form" property="noteUpload" value="true">
  <%-- Behandlung von Notizen --%>

  <logic:equal name="form" property="autoTitle" value="true">
  <html:hidden property="autoTitle"  name="form"/>
  </logic:equal>
  <logic:equal name="form" property="autoDescription" value="true">
  <html:hidden property="autoDescription"  name="form"/>
  </logic:equal>
  <logic:equal name="form" property="autoKeyword" value="true">
  <html:hidden property="autoKeyword"  name="form"/>
  </logic:equal>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.author"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentAuthorName" style="width:100%;" maxlengthProperty="document.authorname"/></td>
  </tr>  

  <logic:equal name="categorySettings" property="showCreationDate" value="true"> 
  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.creationdate"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentCreationDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentCreationDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentClass" value="true">
  <logic:notEmpty name="form" property="documentClasses">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.class"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select property="newDocumentClassId">
        <logic:iterate id="documentClass" name="form" property="documentClasses" type="vkc.db.entities.VKCDocumentClass">
        <html:option value="<%=String.valueOf( documentClass.getDocClassId() )%>"><vkc:message name="documentClass" property="nameKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <logic:equal name="categorySettings" property="showDocumentStatus" value="true">
  <logic:notEmpty name="form" property="documentStati">
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.status"/>:</b></td>
    <td width="100%" align="left" nowrap="nowrap">
      <html:select name="form" property="newDocumentStatus" size="1">
        <logic:iterate id="status" name="form" property="documentStati" type="vkc.db.entities.VKCDocumentStatus">
        <html:option value="<%=String.valueOf( status.getStatus() )%>"><vkc:message name="status" property="descriptionKey"/></html:option>
        </logic:iterate>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>
  </logic:equal>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.versiondescr"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentVersionDesc" style="width:100%;" maxlengthProperty="document.versiondesc"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.label"/>:</b></td>
    <td width="100%" align="left">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <td><html:text name="form" property="newDocumentVersionHigh" size="3" styleClass="monospaced"/></td>
          <td valign="bottom" >&nbsp;.&nbsp;</td>
          <td><html:text name="form" property="newDocumentVersionLow" size="3" styleClass="monospaced"/></td>
        </tr>
      </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.title"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentTitle" style="width:100%;" maxlengthProperty="document.title"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.keywords"/>:</b></td>
    <td width="100%" align="left"><vkc:text name="form" property="newDocumentKeywords" style="width:100%;" maxlengthProperty="document.keywords" onfocus="return showHelpText();" onblur="return nd();"/></td>
  </tr>

  <tr>
    <td align="left" nowrap="nowrap" valign="top"><b><vkc:message key="vkc.description"/>:</b></td>
    <td width="100%" align="left">
      <logic:equal name="form" property="tinyMCECompatible" value="true">
      <logic:equal name="form" property="showTinyMCEToolbar" value="true">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/minus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      <logic:equal name="form" property="showTinyMCEToolbar" value="false">
	  <vkc:link href="javascript:toggleTinyMCEToolbar();"><vkc:img page="/templates/${template.name}/gfx/plus-big.gif" border="0" titleKey="vkc.string.htmleditor"/></vkc:link>
      </logic:equal>
      </logic:equal>
      <vkc:textarea rows="7" style="width:100%;" property="newDocumentDescription" styleId="newDocumentDescription"/>
    </td>
  </tr>
  </logic:equal>
    
  <logic:equal name="form" property="tinyMCECompatible" value="false">
  <tr>
    <td align="left" nowrap="nowrap" valign="top"><b>&nbsp;</b></td>
    <td width="100%" align="right" nowrap="nowrap" valign="top"><vkc:button property="action.editText" onclick="javascript:editText(this);"><vkc:message key='button.format'/></vkc:button></td>
  </tr>
  </logic:equal>

  <logic:notEmpty name="form" property="addDocAttributes">
  <%-- Beginn Verwaltung globaler Attribute --%>
  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <logic:iterate id="fieldName" indexId="fieldCtr" name="form" property="addDocAttributeKeys" type="java.lang.String">
  <tr>
    <td align="left"><b><vkc:write name="form" property='<%= String.valueOf( "addDocAttributeName(" + fieldName + ")" ) %>'/>:</b><logic:equal name="form" property='<%= String.valueOf( "addDocAttributeAllowNull(" + fieldName + ")" ) %>' value="false">&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></logic:equal></td>
    <td align="left"><html:text name="form" property='<%= String.valueOf( "addDocAttributeValue(" + fieldName + ")" ) %>' style="width:100%;"/></td>
  </tr>
  </logic:iterate>
  </logic:notEmpty>

  <!-- Beginn - Verwaltung dynamischer Attribute -->
  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <tr>
    <td align="left" valign="top" nowrap="nowrap"><b><vkc:message key="vkc.string.dynaAttributes"/>:</b></td>

    <logic:empty name="form" property="dynaAttributes">
    <td width="100%" align="left"><vkc:button property="action.add.dynaattribute" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.addDynaAttribute"/></vkc:button></td>
    </logic:empty>

    <logic:notEmpty name="form" property="dynaAttributes">
    <td width="100%" align="left">
      <a name="dynaattributes"></a>
      <table width="100%" cellspacing="3" cellpadding="0" border="0">
        <tr>
          <td>&nbsp;</td>
          <td width="200" ><b><vkc:message key="vkc.string.name"/>:</b>&nbsp;<vkc:img page="/templates/${template.name}/gfx/mandatoryField.gif" alt="*" border="0"/></td>
          <td width="100%"><b><vkc:message key="vkc.string.value"/>:</b></td>
          <td>&nbsp;</td>
        </tr>

        <logic:iterate id="dynaAttribute" name="form" property="dynaAttributes" indexId="index">
        <tr>
          <td align="right"><b><%=String.valueOf( ( (Integer)index ).intValue() + 1 ) + "."%></b></td>
          <td align="left" nowrap="nowrap"><input type="text" name="dynaAttributeLabel_<%=index%>" value="<vkc:write name='dynaAttribute' property='label'/>" style="width:200px;"></td>
          <td width="100%" align="left"><input type="text" name="dynaAttributeValue_<%=index%>" value="<vkc:write name='dynaAttribute' property='value'/>" style="width:100%;"></td>
          <td align="left" ><vkc:image page="/templates/${template.name}/gfx/button-deletecategory.gif" property="action.delete.dynaattribute" onclick='<%= String.valueOf( "return deleteAttribute(" + index + ")" )%>' titleKey="vkc.document.remove.attribute"/></td>
        </tr>
        </logic:iterate>

        <tr>
          <td align="left" colspan="2"><vkc:button property="action.add.dynaattribute" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.addDynaAttribute"/></vkc:button></td>
        </tr>
      </table>
    </td>
    </logic:notEmpty>
  </tr>
  <!-- Ende - Verwaltung dynamischer Attribute -->

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.document.publish"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentPubDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentPubDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="left" nowrap><b><vkc:message key="vkc.document.expires"/>:</b></td>
    <td width="100%" align="left">
       <table cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td><html:text property="newDocumentExpDate" maxlength="10" size="10" styleClass="dateField"/></td>
           <td><vkc:calendarbutton buttonName="btn_newDocumentExpDate" /></td>
           <td>&nbsp;[<vkc:message key="vkc.profile.date_format"/>]</td>
         </tr>
       </table>
    </td>
  </tr>

  <logic:notEmpty name="form" property="proxyUsers">
  <bean:define property="proxyUsers" name="form" id="proxyUsers"/>
  <vkc:hline lineHeight="1" lineClass="hline" colspan="2" bottomSpace="0" topSpace="0"/>
  <tr>
    <td align="left" nowrap="nowrap"><b><vkc:message key="vkc.document.byproxy"/>:</b></td>
    <td width="100%" align="left">
      <html:select name="form" property="proxyUserId">
        <html:option value="0">&nbsp;</html:option>
        <vkc:options collection="proxyUsers" property="userId" labelProperty="lastnameLabel"/>
      </html:select>
    </td>
  </tr>
  </logic:notEmpty>

  <logic:equal value="0" name="form" property="newDocumentPreDocId">
  <logic:equal value="false" name="form" property="requestSourceIsProjectView">
  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>
  <tr>
     <td align="left" nowrap="nowrap">&nbsp;</td>
     <td width="100%" align="left">
       <table>
         <tr>
           <td valign="top" nowrap="nowrap"><html:checkbox name="form" property="classifyFromCategory"/></td>
           <td valign="top" nowrap="nowrap"><vkc:message key="vkc.string.classifyFrom"/></td>
           <td valign="top"><vkc:write name="form" property="category.absPathDescr.absolutePathString"/></td>
         </tr>
       </table>
     </td>
  </tr>
  </logic:equal>

  <logic:equal value="true" name="form" property="requestSourceIsProjectView">
    <html:hidden name="form" property="classifyFromCategory" value="true"/>
  </logic:equal>
  </logic:equal>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr>
    <td align="center" nowrap="nowrap" colspan="2">
      <vkc:button property="action.publish" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.publish" /></vkc:button>      

      <logic:equal name="form" property="newDocumentPreDocId" value="0">
      <vkc:button property="action.classify" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.classify"/></vkc:button>
      </logic:equal>

      <vkc:button property="action.cancel" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.cancel"  /></vkc:button>
    </td>
  </tr>

  </logic:empty>

  <logic:notEmpty name="form" property="classifyResults">

  <html:hidden property="newDocumentUploadType"   name="form"/>
  <html:hidden property="newDocumentArchiveId"    name="form"/>
  <html:hidden property="newDocumentAuthorName"   name="form"/>
  <html:hidden property="newDocumentName"         name="form"/>
  <html:hidden property="newDocumentSize"         name="form"/>
  <html:hidden property="newDocumentExtension"    name="form"/>
  <html:hidden property="newDocumentClassId"      name="form"/>
  <html:hidden property="newDocumentStatus"       name="form"/>
  <html:hidden property="newDocumentVersionDesc"  name="form"/>
  <html:hidden property="newDocumentVersionHigh"  name="form"/>
  <html:hidden property="newDocumentVersionLow"   name="form"/>
  <html:hidden property="newDocumentTitle"        name="form"/>
  <html:hidden property="newDocumentKeywords"     name="form"/>
  <html:hidden property="newDocumentDescription"  name="form"/>
  <html:hidden property="newDocumentCreationDate" name="form"/>
  <html:hidden property="newDocumentExpDate"      name="form"/>
  <html:hidden property="newDocumentPubDate"      name="form"/>
  <html:hidden property="proxyUserId"             name="form"/>
  <html:hidden property="classifyFromCategory"    name="form"/>
  <html:hidden property="newDocumentUploadType"   name="form"/>
  <logic:equal name="form" property="autoTitle" value="true">
  <html:hidden property="autoTitle"  name="form"/>
  </logic:equal>
  <logic:equal name="form" property="autoDescription" value="true">
  <html:hidden property="autoDescription"  name="form"/>
  </logic:equal>
  <logic:equal name="form" property="autoKeyword" value="true">
  <html:hidden property="autoKeyword"  name="form"/>
  </logic:equal>

  <logic:notEmpty name="form" property="addDocAttributes">
    <logic:iterate id="fieldName" indexId="fieldCtr" name="form" property="addDocAttributeKeys" type="java.lang.String">
    <html:hidden property='<%= String.valueOf( "addDocAttributeValue(" + fieldName + ")" ) %>'  name="form"/>
    </logic:iterate>
  </logic:notEmpty>

  <logic:notEmpty name="form" property="dynaAttributes">
    <logic:iterate id="dynaAttribute" name="form" property="dynaAttributes" indexId="index" type="org.apache.struts.util.LabelValueBean">
    <html:hidden property='<%= "dynaAttributeLabel_" + index %>' value='<%= dynaAttribute.getLabel() %>' />
    <html:hidden property='<%= "dynaAttributeValue_" + index %>' value='<%= dynaAttribute.getValue() %>' />
    </logic:iterate>
  </logic:notEmpty>

  <tr>
    <td align="left" nowrap="nowrap" colspan="2"><b><vkc:message key="vkc.document.classify.results"/>:</b></td>
  </tr>

  <vkc:hline bottomSpace="0" topSpace="0" colspan="2" lineClass="hline" lineHeight="1"/>

  <tr class="tableLineColor">
    <td width="100%" align="left" nowrap="nowrap" colspan="2" class="tableLineColor">
      <table width="100%" cellspacing="1" cellpadding="2" border="0">
        <tr>
          <td nowrap="nowrap" class="headerSelected">&nbsp;<b><vkc:message key="vkc.document.selection"/></b>&nbsp;</td>
          <td nowrap="nowrap" class="headerSelected">&nbsp;<b><vkc:message key="vkc.document.score"/></b>&nbsp;</td>
          <td nowrap="nowrap" class="headerSelected">&nbsp;<b><vkc:message key="vkc.document.category"/></b>&nbsp;</td>
        </tr>

        <logic:iterate id="result" type="vkc.search.ClassifyResultEntry" name="form" property="classifyResults">
        <tr>
          <td align="center" valign="top" nowrap="nowrap" class="columnUnselected"><html:radio name="form" property="selectedId" value="<%=result.getCategoryId()%>"/></td>
          <td align="right" valign="top" nowrap="nowrap" class="columnUnselected"><vkc:write name="result" property="scorePercent"/>%</td>
          <td width="100%" align="left" nowrap="nowrap" class="columnUnselected">
            <table width="100%" cellpadding="0" cellspacing="0">
              <tr>
                <td>&nbsp;</td>
                <td width="100%" align="left">
                  <table>
                    <tr>
                      <td colspan="2">
                      	<vkc:link target="_blank" page="/showCategory.do" paramId="categoryId" paramName="result" paramProperty="categoryId">
		                <logic:iterate id="pathdescr" name="result" property="categoryAbsPath.pathNodes" indexId="index">
						<logic:greaterThan name="index" value="0">
                        <span dir="ltr">
		                <vkc:img page="/templates/${template.name}/gfx/dot.gif" border="0" alt=""/>
                        </span>
		                </logic:greaterThan>
		
		                <logic:equal value="true" name="pathdescr" property="lastNode">
                        <span dir="ltr">
		                <b><vkc:write name="pathdescr" property="pathName"/></b>
                        </span>
		                </logic:equal>
		
		                <logic:equal value="false" name="pathdescr" property="lastNode">
                        <span dir="ltr">
		                <vkc:write name="pathdescr" property="pathName"/>
                        </span>
		                </logic:equal>
					
		                </logic:iterate>
		                </vkc:link>
					  </td>
                    </tr>
                  </table>
                </td>
              </tr>

              <logic:notEmpty name="result" property="keywords">
              <tr><td>&nbsp;</td></tr>
              <tr>
                <td>&nbsp;</td>
                <td width="100%" align="left">
                  <table>
                    <tr>
                      <td><b><vkc:message key="vkc.keywords"/>:</b></td>
                      <td><vkc:write name="result" property="keywords"/></td>
                    </tr>
                  </table>
                </td>
              </tr>
              </logic:notEmpty>

              <logic:notEmpty name="result" property="description">
              <tr><td>&nbsp;</td></tr>
              <tr>
                <td>&nbsp;</td>
                <td width="100%" align="left">
                  <table>
                    <tr>
                      <td valign="top"><b><vkc:message key="vkc.description"/>:</b></td>
                      <td>
			          <logic:equal name="form" property="tinyMCECompatible" value="true">
			          <vkc:write name="result" property="description" displayAsHTML="true" renderNewLine="true"/>
			          </logic:equal>
			          <logic:equal name="form" property="tinyMCECompatible" value="false">
			          <vkc:write name="result" property="description" stripHTML="true" renderNewLine="true"/>
			          </logic:equal>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
              </logic:notEmpty>
            </table>
          </td>
        </tr>
        </logic:iterate>
      </table>
    </td>
  </tr>

  <tr>
    <td align="center" nowrap="nowrap" colspan="2">
      <vkc:button property="action.select.category" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.select.category"/></vkc:button>
      <vkc:button property="action.cancel.classify" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.cancel"/></vkc:button>
    </td>
  </tr>

  </logic:notEmpty>

  </logic:notEmpty>
  </html:form>
</table>
</body>
</html:html>
