package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.List<java.lang.String> _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.List<java.lang.String> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n");
      out.write("<HTML>\r\n");
      out.write("\t<HEAD>\r\n");
      out.write("\t\t<TITLE>Eclipse BIRT Home</TITLE>\r\n");
      out.write("\t\t<META http-equiv=Content-Type content=\"text/html; charset=iso-8859-1\">\r\n");
      out.write("\t\t<LINK href=\"styles/iv/index.css\" type=text/css rel=stylesheet>\r\n");
      out.write("\t\t<LINK href=\"http://www.eclipse.org/images/eclipse.ico\" type=image/x-icon rel=\"shortcut icon\">\r\n");
      out.write("\t\t<STYLE>\r\n");
      out.write("\t\t\t.warningMessage { color:red; }\r\n");
      out.write("\t\t</STYLE>\r\n");
      out.write("\t");

		String javaVersion = System.getProperty("java.version");
		String viewerVersion = "2.6.2";
		String engineVersion = "2.6.2";
	
      out.write("\r\n");
      out.write("\t</HEAD>\r\n");
      out.write("\t<BODY>\r\n");
      out.write("\t\t<!-- Page banner -->\r\n");
      out.write("\t\t<TABLE class=banner-area cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\r\n");
      out.write("\t\t\t<TBODY>\r\n");
      out.write("\t\t\t\t<TR>\r\n");
      out.write("\t\t\t\t\t<TD width=115><a href=\"http://www.eclipse.org/\">\r\n");
      out.write("\t\t\t\t\t\t<IMG src=\"webcontent/birt/images/EclipseBannerPic.jpg\" alt=\"Eclipse Logo\" width=\"115\" height=\"50\" border=0></a>\r\n");
      out.write("\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t\t<TD>\r\n");
      out.write("\t\t\t\t\t\t<IMG src=\"webcontent/birt/images/gradient.jpg\" alt=\"gradient banner\" width=\"300\" height=\"50\" border=0>\r\n");
      out.write("\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t\t<TD vAlign=center align=right width=250>\r\n");
      out.write("\t\t\t\t\t\t<a class=\"birt\" href=\"http://www.eclipse.org/birt\">\r\n");
      out.write("\t\t\t\t\t\t\t<!-- Temporary BIRT header -->\r\n");
      out.write("\t\t\t\t\t\t\t<SPAN style=\"PADDING-RIGHT: 10px; FONT-WEIGHT: bold; FONT-SIZE: 20px; COLOR: #e8e8ff; FONT-FAMILY: arial, sans-serif\">\r\n");
      out.write("\t\t\t\t\t\t\t\tBIRT\r\n");
      out.write("\t\t\t\t\t\t\t</SPAN>\r\n");
      out.write("\t\t\t\t\t\t</a> \r\n");
      out.write("\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t</TR>\r\n");
      out.write("\t\t\t</TBODY>\r\n");
      out.write("\t\t</TABLE>\r\n");
      out.write("\t\t<!-- Table with menu & content -->\r\n");
      out.write("\t\t<TABLE cellSpacing=0 cols=2 cellPadding=0 border=0 width=\"100%\">\r\n");
      out.write("\t\t\t<TBODY>\r\n");
      out.write("\t\t\t\t<TR>\r\n");
      out.write("\t\t\t\t\t<TD class=content style=\"PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px\" >\r\n");
      out.write("\t\t\t\t\t\t<!-- Page title -->\r\n");
      out.write("\t\t\t\t\t\t<TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>\r\n");
      out.write("\t\t\t\t\t\t\t<TBODY>\r\n");
      out.write("\t\t\t\t\t\t\t\t<TR>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<TD vAlign=top>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t<span class=\"indextop\">BIRT viewer has been installed.</span><p>&nbsp;\r\n");
      out.write("\t\t\t\t\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<TD class=jump style=\"PADDING-LEFT: 10px\" align=right rowSpan=2>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t\t<IMG src=\"webcontent/birt/images/Idea.jpg\" alt=\"Idea\" width=\"120\" height=\"86\">\r\n");
      out.write("\t\t\t\t\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t\t\t\t\t</TR>\r\n");
      out.write("\t\t\t\t\t\t\t\t<TR>\r\n");
      out.write("\t\t\t\t\t\t\t\t\t<TD>&nbsp;</TD>\r\n");
      out.write("\t\t\t\t\t\t\t\t</TR>\r\n");
      out.write("\t\t\t\t\t\t\t</TBODY>\r\n");
      out.write("\t\t\t\t\t\t</TABLE>\r\n");
      out.write("\t\t\t\t\t\t<!-- Content area -->\r\n");
      out.write("\t\t\t\t\t\t<p>Thank you for your choosing BIRT (Business Intelligence Reporting Tool).</p>\r\n");
      out.write("\t\t\t\t\t\t<p>Viewer Version : ");
      out.print( viewerVersion );
      out.write("</p>\r\n");
      out.write("\t\t\t\t\t\t<p>Engine Version: ");
      out.print( engineVersion );
      out.write("</p>\r\n");
      out.write("\t\t\t\t\t\t");

							String javaVersionMessage = javaVersion;
							
							// check Java version
							String[] versionParts = javaVersion.split("\\.");
							int majorVersion = 0;
							int minorVersion = 0;
							try
							{
								majorVersion = Integer.parseInt(versionParts[0]);		
								minorVersion = Integer.parseInt(versionParts[1]);
								if ( majorVersion < 1 || ( majorVersion == 1 && minorVersion < 5 ) )
								{
									javaVersionMessage = "<span class=\"warningMessage\">" + javaVersion + " (WARNING: BIRT " + viewerVersion + " only supports JRE versions >= 1.5)</span>";
								}
							}
							catch (NumberFormatException e)
							{
							
							}
						
      out.write("\r\n");
      out.write("\t\t\t\t\t\t<p>JRE version: ");
      out.print( javaVersionMessage  );
      out.write("</p>\r\n");
      out.write("\t\t\t\t\t\t<p><a href=\"");
      out.print( request.getContextPath( ) + "/frameset?__report=test.rptdesign&sample=my+parameter" );
      out.write("\">View Example</a>\r\n");
      out.write("\t\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t</TR>\r\n");
      out.write("\t\t\t</TBODY>\r\n");
      out.write("\t\t</TABLE>\r\n");
      out.write("\t</BODY>\r\n");
      out.write("</HTML>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
