<%@ page language="java" import="org.apache.jasper.compiler.*,java.util.*,java.sql.*,java.net.*,java.awt.*,java.awt.image.*,javax.swing.*,java.io.*"%>


<html>
<head>
<script LANGUAGE="JavaScript">


    //create a global variable so the window object can be accessed elsewhere


    function createWindow(url) {

        var winNum = self.opener.winNum;
        var imgWin = self.opener.imgWin[winNum];

        //if the window.name isn't set, create the window
        if(imgWin == null) {
            var targetWin = "ImageWindow_"+winNum.toString();
            imgWin = window.open(url,targetWin,'status=yes,top=20,left=20,dependent=yes,scrollbars=yes,resizable=no,width=400,height=400,menubar=no');
            //imgWin.location.replace(url);
            imgWin.location.reload();

            self.opener.imgWin[winNum] = imgWin;
            winNum++;
            self.opener.winNum = winNum;
        }//
        else {
            if(imgWin.name != null) {
                imgWin.focus();
            }
        }//else

    }//function createWindow(url)



    function loadFrame(url,target) {

        var newWin=window.open(url,target);
        newWin.location.replace(url);
		//updated from newWin.location.reload();

    } //function loadFrame(url,target)

</script>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000">
<font FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
<%!
    //String mapURL="http://localhost:8000/smarthome/maps/europe/europe.html";
	String mapURL="http://peta-esru.mecheng.strath.ac.uk:8000/eeis/maps/europe/europe.html";
    String[]  fuelTypeStrings = { "0 : Total","1 : Electricity(kWh)", "2 : Gas(kWh)", "3 : Oil"} ;
    String[]  fuelTypeCode   = {"0","1","2","3" };
    String [] scopeNameSet = {"No scope defined"};
    String[] years = {"2000"};
    String fuelType = "";
    String scope = "";
    //String resultType = "";
    String dataType = "totalConsumption";
    String [] dataTypeCheck = {"Total consumption (kWh)", "Consumption per area (kWh/m2)",
                           "Consumption per heated area (kWh/m2)"};

    String [] dataTypeValues = {"totalConsumption","consumptionPerArea","consumptionPerHeatedArea"};

    String [] numbers = {"1","2","3","4","5","6","7","8","9",
                    "10", "11","12" } ;
    String classNo = "5";
    String rangeOption = "";
    String inputRangeFrom = "";
    String inputRangeTo = "";

    String fromMonth = "";
    String toMonth = "";
    String fromYear = "";
    String toYear = "";

    String[] months = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep",
                    "Oct", "Nov","Dec" } ;

    String periodTitle = "";
    String title = "";


%>
</font><font FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
<jsp:useBean id="em" scope="session" class="EntrakMain"/>
<jsp:useBean id="mcpm" scope="session" class="MainControlPanel_Map"/>
<jsp:useBean id="cpm" scope="session" class="ClassificationManager"/>
<%

        String actionButtonName = request.getParameter("action");

        try {
           
            mcpm.linkDatabase(new URL(mapURL));
            //mcpm.setDatabase( em.database );
			mcpm.setDatabase ("strathclyde");
			
			System.out.println("JSP_CPM, OK here mapURL" + mapURL);
         
            ScopeFileManager sfm = new ScopeFileManager(mcpm.urlScope);
			
            sfm.readScopeFileWC();

            cpm.setConnection(mcpm.getConnection());
            cpm.setDatabase(mcpm.getDatabase());
			
            cpm.setUrlScope(mcpm.urlScope);
            cpm.setUrlEntrakHome(mcpm.getUrlEntrakHome());

            System.out.println("JSP_CPM, cpm.urlEntrakHome: " + cpm.getUrlEntrakHome());
            System.out.println("JSP_CPM, mcpm.urlEntrakHome: " + mcpm.getUrlEntrakHome());

            String cl = ClassLoaderName.getName(getClassLoader().toString());
            //System.out.println("CPM.jsp, CLName : " + cl);
			// cpm.setClassLoaderName(getClassLoader().toString());    //This is important for Web client!

            cpm.setClassLoaderName(cl);    //This is important for Web client!

            cpm.setup();
            System.out.println("CPM.jsp, " + cpm.getClassLoaderName());

            fuelTypeStrings = cpm.getFuelTypeStrings();
            fuelTypeCode = cpm.getFuelTypeCode();
            scopeNameSet = cpm.scopeNameSet;
	

            String [] yearsArray = cpm.getYears();

            if(yearsArray != null)
                years = yearsArray;

        } //try

        catch(MalformedURLException mue) {
                 System.out.println(" Error malformURL exception " );
        } //catch(MalformedURLException mue)
%>
<%


    if(actionButtonName != null) {


%>
<!--  <p>The button you clicked is <%=actionButtonName%>.</p>  -->
<%

        fuelType = request.getParameter("fuelType");
        cpm.fuelTypePane.itemCombo.setSelectedItem(fuelType);
        int fuel = cpm.fuelTypePane.itemCombo.getSelectedIndex();
        String fuelString = String.valueOf(fuel);

        scope = request.getParameter("scope");
        cpm.selectSetPane.itemCombo.setSelectedItem(scope);



        dataType = request.getParameter("dataType");

        if(dataType.equals("totalConsumption")) {
            cpm.resultTypePane.itemRadio[0].doClick();
        } //if(dataType.equals("totalConsumption"))

        else if(dataType.equals("consumptionPerArea")) {
            cpm.resultTypePane.itemRadio[1].doClick();
        } //else if(dataType.equals("consumptionPerArea"))

        else if(dataType.equals("consumptionPerHeatedArea")) {
            cpm.resultTypePane.itemRadio[2].doClick();
        } //else if(dataType.equals("consumptionPerHeatedArea"))

        else {
            cpm.resultTypePane.itemRadio[0].doClick();
        } //else


        classNo = request.getParameter("classNo");
        rangeOption = request.getParameter("rangeOption");


        cpm.numberOfClassPane.itemField.setText(classNo);
        //cpm.numberOfClassPane.itemField.setText("5");

            cpm.autoButton.setSelected(true);
            cpm.customButton.setSelected(false);

            cpm.inputRangePane.textField[  0 ].setEnabled(false);
            cpm.inputRangePane.textField[  1 ].setEnabled(false);

        fromMonth = request.getParameter("fromMonth");
        toMonth = request.getParameter("toMonth");
        fromYear = request.getParameter("fromYear");
        toYear = request.getParameter("toYear");

        cpm.fromPane.combo[0].setSelectedItem(fromMonth);
        cpm.toPane.combo[0].setSelectedItem(toMonth);
        cpm.fromPane.combo[1].setSelectedItem(fromYear);
        cpm.toPane.combo[1].setSelectedItem(toYear);


        String[] fuelTypeStrings = cpm.getFuelTypeStrings();
        String itemTitle = new String( fuelTypeStrings[ fuel ] +" in " + " \'" +
                     (String) cpm.selectSetPane.itemCombo.getSelectedItem() + "\' ");


         periodTitle = new String( (String) cpm.fromPane.combo[ 0 ].getSelectedItem() +
                ", " +  (String) cpm.fromPane.combo[ 1 ].getSelectedItem() + "-" +
                 (String) cpm.toPane.combo[ 0 ].getSelectedItem() +  ", " +
                 (String) cpm.toPane.combo[ 1 ].getSelectedItem() );

         title = new String( itemTitle +  ": Classification " +
              cpm.resultTypePane.itemRadio[ 0 ].getText()  +
              periodTitle   );



%>
<!--
        <p>
            fuelType = <%=fuelType%><br>
            fuel = <%=fuel%><br>
            cpm.fuelType = <%=(String)cpm.fuelTypePane.itemCombo.getSelectedItem()%><br>
            scope = <%=scope%><br>
            cpm.scope = <%=(String)cpm.selectSetPane.itemCombo.getSelectedItem()%><br>
            itemTitle = <%=itemTitle%><br>
            dataType = <%=dataType%><br>
            cpm.resultTypePane.itemRadio[0].isSelected() = <%=cpm.resultTypePane.itemRadio[0].isSelected()%><br>
            cpm.resultTypePane.itemRadio[1].isSelected() = <%=cpm.resultTypePane.itemRadio[1].isSelected()%><br>
            cpm.resultTypePane.itemRadio[2].isSelected() = <%=cpm.resultTypePane.itemRadio[2].isSelected()%><br>
            classNo = <%=classNo%><br>
            rangeOption = <%=rangeOption%><br>

            cpm.autoButton.isSelected() = <%=cpm.autoButton.isSelected()%><br>
            cpm.customButton.isSelected() = <%=cpm.customButton.isSelected()%><br>

            cpm.fromPane.combo[0].getSelectedItem() = <%=cpm.fromPane.combo[0].getSelectedItem()%><br>
            cpm.fromPane.combo[1].getSelectedItem() = <%=cpm.fromPane.combo[1].getSelectedItem()%><br>
            cpm.toPane.combo[0].getSelectedItem() = <%=cpm.toPane.combo[0].getSelectedItem()%><br>
            cpm.toPane.combo[1].getSelectedItem() = <%=cpm.toPane.combo[1].getSelectedItem()%><br>
        </p>
-->
<%

        if (actionButtonName.equals("Draw Chart")) {

            System.out.println("CPM.jsp, actionButtonName = Draw Chart");

            cpm.setFuelWC(fuel);
            cpm.setItemTitleWC(itemTitle);


%>
<script>
                loadFrame("drawPieImg.jsp","imgFrame_c");
            </script>
<%

        } //if (actionButtonName.equals("Draw Chart"))



        else { //actions for other buttons goes here


%>
<script>
                loadFrame("blank.jsp","imgFrame_c");
            </script>
<%

        } //else



    } //if(actionButtonName != null)


    else {


%>
<script>
            loadFrame("blank.jsp","imgFrame_c");
        </script>
<%

    } //else



%>
<!--
<p>
        mapURL : <%=mapURL%>
</p>
-->
<%

        Connection c = mcpm.getConnection();
        String us = mcpm.urlScope;
        String ueHome = mcpm.getUrlEntrakHome();

        if(c == null) {
%>
</font> <font FACE="Arial, Helvetica, sans-serif" SIZE="2">Connection c is null. 
</font><font FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
<%

        } //if(c == null)


        if(us == null) {
%>
</font> <font FACE="Arial, Helvetica, sans-serif" SIZE="2"> String us is null. 
</font><font FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
<%

        } //if(us == null)


        if(ueHome == null) {
%>
</font> <font FACE="Arial, Helvetica, sans-serif" SIZE="2"> String ueHome is null. 
</font><font FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
<%

        } //if(ueHome == null)


%>
</font> 
<form METHOD="post">
  <table WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%" ALIGN="CENTER">
	<tr>
	  <td ALIGN="CENTER" VALIGN="MIDDLE"> 
		<table WIDTH="80%" BORDER="0" VSPACE="5" HSPACE="5" CELLPADDING="2" BGCOLOR="#000000" ALIGN="CENTER">
		  <tr BGCOLOR="#999999"> 
			<td><font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2">Scope:</font></td>
			<td> <font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2"> 
			  <select NAME="scope" SIZE="1">
				<%
                        for(int i=0;i<scopeNameSet.length;i++) {

                            if(scopeNameSet[i].equals(scope)) {
                    %>
				<option selected><%=scopeNameSet[i]%></option>
				<%
                            } //if(scopeNameSet[i].equals(scope))

                            else {
                    %>
				<option><%=scopeNameSet[i]%></option>
				<%
                            } //else

                        } //for(int i=0;i<scopeNameSet.length;i++)
                    %>
			  </select>
			  </font></td>
		  </tr>
		  <tr BGCOLOR="#999999"> 
			<td><font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2">Fuel 
			  type:</font></td>
			<td> <font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2"> 
			  <select NAME="fuelType" SIZE="1">
				<%
                        for(int i=0;i<fuelTypeStrings.length;i++) {
                            if(fuelTypeStrings[i].equals(fuelType)) {

                    %>
				<option selected><%=fuelTypeStrings[i]%></option>
				<%

                            } //if(fuelTypeStrings[i].equals(fuelType))

                            else {
                    %>
				<option><%=fuelTypeStrings[i]%></option>
				<%
                            } //else
                        } //for(int i=0;i<fuelTypeStrings.length;i++)
                    %>
			  </select>
			  </font></td>
		  </tr>
		  <tr BGCOLOR="#999999"> 
			<td HEIGHT="42"><font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2">Data 
			  type:</font></td>
			<td> <font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2"> 
			  <%
                    for(int i=0;i<dataTypeCheck.length;i++) {
                        if(dataType.equals(dataTypeValues[i])) {

                            %>
			  <input TYPE="radio" NAME="dataType" VALUE="<%=dataTypeValues[i]%>" CHECKED>
			  <%=dataTypeCheck[i]%> 
			  <%

                        }//if(dataType.equals(dataTypeCheck[i]))

                        else {

                            %>
			  <input TYPE="radio" NAME="dataType" VALUE="<%=dataTypeValues[i]%>">
			  <%=dataTypeCheck[i]%> 
			  <%

                        } //else

                    }//for(int i=0;i<dataTypeCheck.length;i++)

                %>
			  </font></td>
		  </tr>
		  <tr BGCOLOR="#999999"> 
			<td><font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2"> 
			  Duration: </font></td>
			<td> <font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2">From: 
			  <select NAME="selectasdasd">
				<option SELECTED><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">1</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">2</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">3</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">4</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">5</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">6</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">7</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">8</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">9</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">10</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">11</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">12</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">13</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">14</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">15</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">16</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">17</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">18</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">19</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">20</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">21</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">22</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">23</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">24</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">25</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">26</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">27</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">28</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">29</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">30</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">31</font></option>
			  </select>
			  <select NAME="fromMonth" SIZE="1">
				<%
                                for(int i=0;i<months.length;i++) {

                                    if(months[i].equals(fromMonth)) {
                            %>
				<option selected><%=months[i]%></option>
				<%
                                    } //if(months[i].equals(fromMonth))
                                    else {
                            %>
				<option><%=months[i]%></option>
				<%
                                    } //else
                                } //for(int i=0;i<months.length;i++)
                            %>
			  </select>
			  <select NAME="fromYear" SIZE="1">
				<%
                                for(int i=0;i<years.length;i++) {
                                    if(years[i].equals(fromYear)) {
                            %>
				<option selected><%=years[i]%></option>
				<%
                                    } //if(years[i].equals(fromYear))
                                    else {
                            %>
				<option><%=years[i]%></option>
				<%
                                    } //else
                                } //for(int i=0;i<years.length;i++)
                            %>
			  </select>
			  </font> <font FACE="Arial, Helvetica, sans-serif" COLOR="#FFFFFF" SIZE="2">To: 
			  <select NAME="select2">
				<option SELECTED><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">1</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">2</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">3</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">4</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">5</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">6</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">7</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">8</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">9</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">10</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">11</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">12</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">13</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">14</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">15</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">16</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">17</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">18</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">19</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">20</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">21</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">22</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">23</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">24</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">25</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">26</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">27</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">28</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">29</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">30</font></option>
				<option><font FACE="Arial, Helvetica, sans-serif" SIZE="2" COLOR="#FFFFFF">31</font></option>
			  </select>
			  <select NAME="toMonth" SIZE="1">
				<%
                                for(int i=0;i<months.length;i++) {

                                    if(months[i].equals(toMonth)) {
                            %>
				<option selected><%=months[i]%></option>
				<%
                                    } //if(months[i].equals(toMonth))
                                    else {
                            %>
				<option><%=months[i]%></option>
				<%
                                    } //else
                                } //for(int i=0;i<months.length;i++)
                            %>
			  </select>
			  <select NAME="toYear" SIZE="1">
				<%
                                for(int i=0;i<years.length;i++) {
                                    if(years[i].equals(toYear)) {
                            %>
				<option selected><%=years[i]%></option>
				<%
                                    } //if(years[i].equals(toYear))
                                    else {
                            %>
				<option><%=years[i]%></option>
				<%
                                    } //else
                                } //for(int i=0;i<years.length;i++)
                            %>
			  </select>
			  </font></td>
		  </tr>
		  <tr BGCOLOR="#999999"> 
			<td> <font COLOR="#FFFFFF" FACE="Arial, Helvetica, sans-serif" SIZE="2">Class 
			  no 
			  <select NAME="classNo" SIZE="1">
				<%
                        for(int i=0;i<numbers.length;i++) {

                            if(classNo.equals(String.valueOf(numbers[i]))) {

                    %>
				<option selected><%=numbers[i]%></option>
				<%

                            } //if(classNo.equals(String.valueOf(numbers[i])))

                            else {

                    %>
				<option><%=numbers[i]%></option>
				<%

                            } //else
                        } //for(int i=0;i<numbers.length;i++)

                    %>
			  </select>
			  </font></td>
			<td><font COLOR="#FFFFFF" FACE="Arial, Helvetica, sans-serif" SIZE="2"> 
			  <input TYPE="submit" VALUE="Draw Chart" NAME="action">
			  </font></td>
		  </tr>
		</table>
	  </td>
	</tr>
  </table>
  <table WIDTH="100%" BORDER="0" VSPACE="5" HSPACE="5" CELLPADDING="5">
  </table>
</form>
</body>
</html>





