<%@ page language="java" import="java.util.*" errorPage="error.jsp"%>




<html>
<head>
<title>Entrak Web Interface</title>

    <jsp:useBean id="em" scope="session" class="EntrakMain"/>
    <jsp:useBean id="mcpm" scope="session" class="MainControlPanel_Map"/>

<%

    mcpm.setConnection(em.con);
    mcpm.setDatabase(em.database);

    mcpm.setUrlMap(em.urlMap);
    mcpm.setUrlHelp(em.urlHelp);
    mcpm.setHostOfDBMS(em.hostOfDBMS);
    mcpm.setUsername(em.username);
    mcpm.setPassword(String.copyValueOf(em.password));

    mcpm.setUrlEntrakHome("http://peta-esru.mecheng.strath.ac.uk:8000/smarthome");
  
    System.out.println("JSPMCPM_MenuBar, urlEntrakHome : " + mcpm.getUrlEntrakHome());
    System.out.println("JSPMCPM_MenuBar, database : " + mcpm.getHostOfDBMS());
    
	 mcpm.urlScope =  "http://peta-esru.mecheng.strath.ac.uk:8000/smarthome/highland.scope";	

    //for admin
   // em.saveProperties4admin();

%>


<SCRIPT LANGUAGE="JavaScript">
<!--
function popWin(the_page,the_target,the_width,the_height) {
		window.open(the_page,the_target,"status=no,menubar=no,scrollbars=no,resizable=no,width=" + the_width + ",height=" + the_height);
}
//-->
</SCRIPT>

  <SCRIPT LANGUAGE="JavaScript">
<!--
function popwin(aPage, aTarget, w, h, var1, var2){
        window.open(aPage,aTarget,'status=no,top=0,left=0,scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h);
}
//-->
</SCRIPT>



<SCRIPT LANGUAGE="JavaScript">
    <!--- Hide script from old browsers

    // This function gets the URL of the right frame
        function getMapURL() {
            var mapURL=""+parent.detailFrame.location.href;
            return mapURL;
    }// end script hiding from old browsers -->

</SCRIPT>


<SCRIPT LANGUAGE="JavaScript">

  function openWin(aPage, aTarget, w, h, var1, var2) {
    	window.open(aPage,aTarget,'status=yes,top=0,left=0,dependent=yes, menubar=no, scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h);    		
   }



</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">


    //Global window number
  


    function openEPM(aPage, aTarget, w, h, var1, var2) {
     winNum = 0;
     profileWinNum = 0;

    //Global window name
     profileWin = new Array();
    //profileWin = "";
     imgWin = new Array();
	 
        if(profileWin[profileWinNum] == null) {
       
            var mapURL=""+parent.detailFrame.location.href;
            var p=""+aPage+"?mapURL="+mapURL;
            profileWin[profileWinNum] = window.open(p,aTarget+"_"+profileWinNum.toString(),'status=yes,top=0,left=0,dependent=yes, menubar=yes, scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h);
            
            profileWinNum++;
        }//
        else {
           
        }//else
    }//



</SCRIPT>



<SCRIPT LANGUAGE="JavaScript">

    function openCPM(aPage, aTarget, w, h, var1, var2) {
    //Global window number
    winNum = 0;
    profileWinNum = 0;

    //Global window name
    profileWin = new Array();
    //profileWin = "";
    imgWin = new Array();
        if(profileWin[profileWinNum] == null) {

        //if(profileWin.name == null) {

            var mapURL=""+parent.detailFrame.location.href;
            var p=""+aPage+"?mapURL="+mapURL;
            profileWin[profileWinNum] = window.open(p,aTarget+"_"+profileWinNum.toString(),'status=yes,top=0,left=0,dependent=yes, menubar=yes, scrollbars=' +((var1=='scroll' || var2=='scroll')? 'yes' : 'no')+ ',resizable=' +((var1=='resize' || var2=='resize')? 'yes' : 'no')+ ',width='+w+',height='+h);
            
            profileWinNum++;
        }//
        else {
            //if(profileWin[profileWinNum].name != null) {
                //profileWin[profileWinNum].focus();
                //profileWin.focus();
            //}
        }//else
    }//



</SCRIPT>


<SCRIPT language="JavaScript">

    function underConstruction() {
        alert("This option is under construction");
    } //


</SCRIPT>





</HEAD>




<body>


<p>
    Analysis Options
</p>
<small>
    <ul>
        <li>

        	<A HREF="EPMframe.jsp"
        	    TARGET="epm_popup" onClick="openWin(this.href,this.target,900,500,'scroll','resize'); return false;">
                Consumption Profile
        	</A>
            <br><br>
        </li>

       
        <li>
        	<A HREF="CPMframe.jsp"
        	    TARGET="cpm_popup" onClick="openWin(this.href,this.target, 900,500,'scroll','resize'); return false;">
                Classification
        	</A>
			<br><br>
        </li>

        <li>
        	<A HREF="cold_alarm_applet/DynamicDataViewer.html"
        	    TARGET="coldalarm" onClick="openWin(this.href,this.target, 700, 640,'scroll','resize'); return false;" >
             Cold Alarm Monitoring Centre 
        	</A>
			<br><br>
        </li>

        <li>
        	<A HREF="#"
        	    TARGET="" onClick="underConstruction();">
                Climate Profile
        	</A>
			<br><br>
        </li>

        <li>
        	<A HREF="#"
        	    TARGET="" onClick="underConstruction();">
                Gaseous Emission Analysis
        	</A>
			<br><br>
        </li>
        
        </li>
      
    </ul>
</small>


 


<!--

<p>
    <script language="JavaScript">
        document.write(getMapURL());
    </script>
</p>
<p>em.urlMap = <%=em.urlMap%></p>
<p>em.urlHelp = <%=em.urlHelp%></p>
<p>em.hostOfDBMS = <%=em.hostOfDBMS%></p>
<p>em.username = <%=em.username%></p>
<p>em.password = <%=em.password%></p>

-->

</body>

</html>





