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

<%@ page import="java.util.HashMap" %>
<%@ page import="vkc.db.serializer.VKCSysParameterSerializer" %>

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

<html:html locale="true">
<head>
    <title><vkc:message key="vkc" /></title>
    <meta http-equiv="content-type"  content="text/html; charset=iso-8859-1" />

    <script language='JavaScript' type="text/javascript">
   	window.name = 'MAINFRAMESET';

    if (<%=VKCSysParameterSerializer.retrieveIntValue("LOGIN", "StandaloneModus", 1)%> != 0) {
        if  (top != self) {
            top.location = self.location;
        }
    }
    </script>

</head>
<frameset rows="82, *, 25" border="0" frameborder="0" framespacing="0">
<bean:parameter id="functionalViewId" name="functionalViewId" value=""/>
<bean:parameter id="projectId" name="projectId" value=""/>
<bean:parameter id="subfolderId" name="subfolderId" value=""/>
<bean:parameter id="anchorvalue" name="anchor" value="top"/>
<bean:parameter id="sysLinkMessageKey" name="sysLinkMessageKey" value=""/>
  <%
  	HashMap tabParams = new HashMap();
  	
  	if (request.getParameter("functionalView") != null) {
  		tabParams.put("reloadMainview", "false");
		tabParams.put("viewId", vkc.view.PageId.FUNCTIONAL_VIEW);
		tabParams.put("selectedViewId", vkc.view.PageId.FUNCTIONAL_VIEW);

		if (request.getParameter("functionalViewId") != null) {
			tabParams.put("selectedTabId", functionalViewId);
		}
  	} else if (request.getParameter("projectView") != null) {
  		tabParams.put("reloadMainview", "false");
		tabParams.put("viewId", vkc.view.PageId.PROJECT_VIEW);
		tabParams.put("selectedViewId", vkc.view.PageId.PROJECT_VIEW);

		if (request.getParameter("projectId") != null) {
			tabParams.put("selectedTabId", projectId);
		}
  	} else {
  		tabParams.put("reloadMainview", "false");
		tabParams.put("viewId", vkc.view.PageId.PROJECT_VIEW);
		tabParams.put("selectedViewId", vkc.view.PageId.PROJECT_VIEW);
  	}
  	
	request.setAttribute("tabParams", tabParams);

  	HashMap params = new HashMap();
	
	params.put("anchor", anchorvalue);
		
	if (request.getParameter("functionalViewId") != null) {
		params.put("functionalViewId", functionalViewId);
	}
		
	if (request.getParameter("projectId") != null) {
		params.put("projectId", projectId);
	}
		
	if (request.getParameter("subfolderId") != null) {
		params.put("subfolderId", subfolderId);
	}
		
	if (request.getParameter("sysLinkMessageKey") != null) {
		params.put("sysLinkMessageKey", sysLinkMessageKey);
	}
		
	request.setAttribute("params", params);
  %>

  <vkc:frame page="/procobaTab.do" name="tabParams" frameborder="0" scrolling="no" frameName="TABVIEW" noresize="true"/>
  
  <% if (request.getParameter("functionalView") != null) { %>
    <vkc:frame page="/functionalView.do" name="params" frameborder="0" scrolling="auto" frameName="MAINVIEW" noresize="false"/>
  <% } else if (request.getParameter("projectView") != null) { %>
    <vkc:frame page="/projectView.do" name="params" frameborder="0" scrolling="auto" frameName="MAINVIEW" noresize="false"/>
  <% } else { %>
    <vkc:frame page="/projectView.do" name="params" frameborder="0" scrolling="auto" frameName="MAINVIEW" noresize="false"/>
  <% } %>

  <vkc:frame page="/copyrightView.do" frameborder="0" scrolling="no" frameName="COPYRIGHTVIEW" noresize="true"/>
</frameset>
</html:html>