<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MultiSelect.aspx.vb" Inherits="MultiSelect" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Multiple Sites Selection</title>
     <link rel="StyleSheet" href="style/cuahsi.css" type="text/css"/> 
     <script language="javascript" type="text/javascript" src="javascript/WebMapApp.js"></script> 
    <script language="javascript" type="text/javascript" src="javascript/cuahsi.js"></script> 
    <script language="javascript" type="text/javascript" src="javascript/calendar.js"></script> 
    <script type="text/javascript" language="javascript">
     var VariableWin;
     function Availability() {
      //alert(document.form2.ddlVariables.options[document.form2.ddlVariables.selectedIndex].value);
      if(document.form2.ddlVariables.options.length==0){
        alert("No variable is selected.\nPlease select a variable before continuing");
      }else{
        checkAvailability(document.form2.ddlVariables.options[document.form2.ddlVariables.selectedIndex].value);    //,document.form2.ddlVariables.options[document.form2.ddlVariables.selectedIndex].text)
      }
     }
     function start(){
//       var oTxt=document.getElementById('txtVariableName');
//       if(oTxt!=undefined){
//         oTxt.focus();
//       }
       if((ActiveNetworkName==undefined) || (ActiveNetworkName=='')){
         if(opener){
           ActiveNetworkName=opener.GetActiveNetworkName();
         }
       }
       //document.title = document.title + ". "+ActiveNetworkName;
       LoadVariablesM();
     }
     function shutdown(){
       if(VariableWin){
         VariableWin.close();
       }
     }
     function ShowVariables(){
       if(VariableWin!=null){
         VariableWin.close();
       }
       VariableWin=OpenWindow('VariableList.aspx','Variables','toolbar=0,location=0,directiories=0,menubar=0,scrollbars=0,resizable=0,status=1,height=310,width=725');
     }
     function ShowOptionText(oSelect,sValue,KeyPrefix,TitlePrefix){
       if(opener){
         opener.ShowOptionText(oSelect,sValue,KeyPrefix,TitlePrefix);
       }
     }
          
   </script>
</head>
<body onload="start()" onunload="shutdown()">
    <form id="form2" runat="server">
         <asp:Panel runat="server" ID="PageHeader" CssClass="MapViewer_TitleBannerStyle" Width="100%" Height="50px" style="position: relative; z-index: 100; left: 0px; top: -6px;" BackImageUrl="~/Images/header.jpg">
               &nbsp;<asp:Label ID="MapViewer_TitleTextShadowLabel" runat="server" Text="Multiple Sites Selection" Font-Size="12pt" Font-Names="Verdana" ForeColor="White" Font-Bold="True" style="position: absolute; left: 290px; top: 16px; z-index: 100;" Width="224px"></asp:Label>
           <table border="1" style="width: 480px; z-index: 101; left: 12px; position: absolute; top: 56px;"  >
            <tr><td colspan="10" style="height: 5px;"></td></tr>
            <tr>
            <td style="height: 23px; width: 391px;" align = "left">Enter the starting letters of a variable: 
              <input type="text" style="width: 44px; font-size:10; height: 20px; background-color: #ffffcc;" id="txtVariableName"  onkeyup="getMatchingList3(siteVarArrayM, this.value, 'ddlVariables',1, true,'',false);"/>
            </td>
             <td style="height: 23px; width:auto;"  align = "left">          
               <input id="btnShowAll" type="button" value="ListVariables" onclick="javascript:ShowVariables();" />
               </td>
           </tr>    
           <tr>
               <td colspan="2" style="width:auto" align="left">Variable: &nbsp;
                 <select id="ddlVariables" size="1" style="width:378px" onclick="ShowOptionText(this,this.value,'[','] ')">
                   <option value="-1">Enter a name in the above text box...</option>
                 </select>
               </td>
             </tr>
            <tr>            
              <td colspan="2" style="width: 480px;" align="left"  >Start Date:&nbsp
                <input type="text" id="startDateM" style="width:140px; height:17px" />
                &nbsp;&nbsp;End Date:&nbsp;<input type="text" id="endDateM" style="width:140px; height:17px" />
              </td>
           </tr>
            <tr>
            <td colspan="2" style="height: 40px; width: 495px;" align="center">
            <input type="button" value="Check Availability" onclick="Availability();" style="width: 119px;" id="cmdChkAvailable"/>&nbsp
            <input type="button" value="Show Sites" id="refresh" onclick="javascript:ShowVariableStations();" style="width: 84px" />&nbsp;&nbsp;
            <input type="button" value="Add To Cart" onclick="addToCartMultiple();" style="width: 76px;" id="addToCartM"/> 
            <input type="button" value="Show Cart" onclick="ShowCartM();" style="width: 80px; background-position: center center; background-repeat: no-repeat;" id="ShowCart"/>&nbsp;&nbsp; 
            </td>
            <asp:HiddenField  ID="VarListHidden" Value=""    runat="server" />
            </tr>
            <tr>
            </tr>
            </table>
           </asp:Panel> 
     <div align="center" style="left:180px;top:320px;">  &nbsp;</div>
     <div style="position: absolute; left: 24px; top: 264px; width: 475px; height:40px;visibility:hidden; background-color: white; border-right: #0000ff thin solid; border-top: #0000ff thin solid; border-left: #0000ff thin solid; border-bottom: #0000ff thin solid; z-index: 102;" id="checkVariableDiv" class="variableForm">            
     <table  style="width: 460px; left: 4px; top: -46px;"  >
            <tr>
                <td style="height: 24px; width: 200px;"><input type="text"   readonly="readonly" id="msg" style="width: 460px; border-top-style: none; border-right-style: none; border-left-style: none; text-align: justify; border-bottom-style: none;" /></td>
            </tr>
     </table>
    </div>
      <div id="loadingDiv" style="z-index: 103; left: 168px; visibility: hidden; width: 168px;
        position: absolute; top: 260px; height: 24px">
        <img id="loadingImg" alt="Loading" src="Images/loading.gif" />
      </div>
    </form>
</body>
</html>
