<%@ page language="java" buffer="100kb" errorPage="/common/error.jsp"%>

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

<%@ page import="vkc.view.WebShare" %>
<%@ page import="vkc.view.form.ClusterCategoryForm" %>
<%@ page import="org.apache.struts.Globals" %>

<vkc:checkLogin/>
<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" />
    <meta http-equiv="robots"        content="noindex" />
    <meta http-equiv="robots"        content="nofollow" />

  	<vkc:cssinclude />

    <script type="text/javascript" src="<vkc:rewrite page='/common/utils.js'/>"></script>

    <script type="text/javascript">
    window.name = "MAINVIEW";
    var currentCalendar = null;
    var windowOpen = null;

    function init(){
		setAnchor();
    }

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

	function unloadPage() {
    	if ( currentCalendar!=null ) {
      		hideCalendar();
    	}

	    if ( windowOpen != null ) {
	    	windowOpen.close();
	    }
    }

	</script>
</head>

<body onload="init();" onUnload="unloadPage();">
<html:form action="/clusterCategory" method="post">
<bean:define id="form" name="clusterCategoryForm" scope="request" type="vkc.view.form.ClusterCategoryForm"/>

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

<table width="100%" cellspacing="0" 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>

 <tr><td>&nbsp;</td></tr>
 <tr><td>&nbsp;</td></tr>

  <tr valign="middle">
    <td align="center" valign="middle">
      <table cellspacing="0" cellpadding="0" border="0">
        <tr>
          <td align="left" nowrap="nowrap" colspan="2">
            <b><vkc:message key="vkc.cluster"/>:</b>
          </td>
        </tr>
        <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>
        <tr>
          <td align="left" nowrap="nowrap">
            <b><vkc:message key="vkc.category"/>:</b>
          </td>
          <td align="left" nowrap="nowrap">
            <vkc:write name="form" property="category.name"/>
          </td>
        </tr>
 		
 		<tr><td>&nbsp;</td></tr>

        <tr>
          <td align="left" nowrap="nowrap">
            <b><vkc:message key="vkc.cluster.clusteralgomode"/>:</b>
          </td>
          <td align="left" nowrap="nowrap">
			<html:radio name="form" property="clusterAlgoMode" value='<%=ClusterCategoryForm.CLUSTER_AVERAGE.toString()%>'/>&nbsp;
            <vkc:message key="vkc.cluster.clusteralgomode.average"/>
          </td>
        </tr>
        <tr>
          <td align="left" nowrap="nowrap">
            &nbsp;
          </td>
          <td align="left" nowrap="nowrap">
			<html:radio name="form" property="clusterAlgoMode" value='<%=ClusterCategoryForm.CLUSTER_CLINK.toString()%>'/>&nbsp;
            <vkc:message key="vkc.cluster.clusteralgomode.clink"/>
          </td>
        </tr>

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

        <tr>
          <td align="left" nowrap="nowrap">
            <b><vkc:message key="vkc.cluster.clustermode"/>:</b>
          </td>
          <td align="left" nowrap="nowrap">
			<html:radio name="form" property="clusterMode" value='<%=ClusterCategoryForm.FASTCLUSTERING.toString()%>'/>&nbsp;
            <vkc:message key="vkc.cluster.clustermode.fastclustering"/>
          </td>
        </tr>
        <tr>
          <td align="left" nowrap="nowrap">
            &nbsp;
          </td>
          <td align="left" nowrap="nowrap">
			<html:radio name="form" property="clusterMode" value='<%=ClusterCategoryForm.BESTCLUSTERING.toString()%>'/>&nbsp;
            <vkc:message key="vkc.cluster.clustermode.bestclustering"/>
          </td>
        </tr>

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

        <tr>
          <td align="left" nowrap="nowrap">
            <b><vkc:message key="vkc.cluster.termintersection"/>:</b>
          </td>
          <td align="left" nowrap="nowrap">
            <html:checkbox name="form" property="termIntersection"/>
          </td>
        </tr>

        <tr>
          <td align="left" nowrap="nowrap">
            <b><vkc:message key="vkc.cluster.termintersection1"/></b>
          </td>
          <td align="left" nowrap="nowrap">
            &nbsp;
          </td>
        </tr>

        <vkc:hline colspan="5" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>
        
        <tr>
          <td align="center" nowrap="nowrap" colspan="2">
            <vkc:button property="action.cluster" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.cluster"/></vkc:button>
            <vkc:button property="action.cancel" onclick="javascript:disableAllButtonsAndSubmit(this);"><vkc:message key="button.cancel"/></vkc:button>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</html:form>
</body>
</html:html>