<%@ page language="C#" autoeventwireup="true" inherits="BranchSelect, App_Web_branchselect.aspx.cdcab7d2" enableEventValidation="false" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>..:: iERP ::..</title>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />

    <script type="text/javascript" language="javascript" src="../App_Include/JavaScript/ScreenSaverStar.js"> </script>

    <script language="javascript" src="App_Include/JavaScript/js_functions.js" type="text/javascript"> </script>
    
    <link href="App_Themes/iERP/style.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
    
        var td2;
        function hl(td) { if (td != undefined && td != td2) { document.getElementById(td).className = "tab2"; } }
        function hl2(td) {

            if (td != undefined && td != td2) { document.getElementById(td).className = "tab3"; } 
        }
        function uhl(td) { if (td != undefined && td != td2) { document.getElementById(td).className = "tab1"; } }

        function opn(td) {
            var doc = document.forms[0];
            var td3 = td2; td2 = ""; uhl(td3); hl2(td); td2 = td;
        }

        function resizeObject() {
            var w = getBrowserWindowSize().width;
            var h = getBrowserWindowSize().height - 5;

            var cObj = document.getElementById("pnlBranch");
            if (cObj != null) {
                cObj.style.height = (parseInt(h) - 130) + "px";
            }

        }

    </script>
    
    <script type="text/javascript" language="javascript">
    
    function validateRecord() {
            var doc = document.forms[0];
            if (doc.hdnSessionBranchId.value == 0) {
                alert("Please Select Department...");
                return false;
            }
            else {
                return true;
            }
        }	
    </script>

    <style type="text/css">
        a:link
        {
            text-decoration: none;
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 12px;
            color: #000000;
        }
    </style>
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" onload="resizeObject(); initScreenSaver('1',<%=Session["AutoLogOutTime"]%>);">
    <form id="form1" runat="server">
    <table id="Table1" cellspacing="0" cellpadding="0" width="90%" align="center" border="0">
        <tr>
            <td align="center" colspan="4" style="height: 1px; font-size: xx-small; color: #FFFFFF;">
                .
            </td>
        </tr>
        <tr>
            <td class="pagetitle" colspan="4" align="center">
                <b>Select Department</b>
                <asp:ImageButton ID="imgExit" runat="server" ImageUrl="~/ToolBarIcon/Cancel.png"
                    BackColor="Transparent" ToolTip="Close" OnClick="imgExit_Click" Style="float: right;" />
            </td>
        </tr>
        <tr class="formbg">
            <td align="left" colspan="4" id="Tree" width="100%" style="border: 1px solid #999999;">
                <asp:Panel ID="pnlBranch" runat="server" BorderWidth="1" BorderStyle="Solid" BorderColor="#999999" height="50px" style ="overflow:scroll">
                    <asp:TreeView ID="trvBranch" runat="server" CssClass="treenormal" PopulateNodesFromClient="true"
                        EnableTheming="True" HoverNodeStyle-CssClass="treenormalselected" SelectedNodeStyle-CssClass="treenormalselected"
                        SelectedNodeStyle-Width="100%" ShowLines="true" RootNodeStyle-Font-Bold="true"
                        RootNodeStyle-Font-Size="Large" OnSelectedNodeChanged="trvBranch_SelectedNodeChanged">
                    </asp:TreeView>
                </asp:Panel>
                <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" class="formbg">
                    <tr>
                        <td width="50%" align="center" class="frametitle">
                            <b>Current Department</b>
                        </td>
                        <td width="50%" align="center" class="frametitle">
                            <b>Switch To Department</b>
                        </td>
                    </tr>
                    <tr>
                        <td width="50%" align="center">
                            <asp:Literal ID="litCurrentBranch" runat="server"></asp:Literal>
                        </td>
                        <td width="50%" align="center">
                            <asp:Literal ID="litChangeBranch" runat="server"></asp:Literal>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center" valign="middle" class="frametitle" style="height: 32px;">
                            <asp:Button ID="BtnSelect" runat="server" CssClass="submit-bt" Width="80px" Text="Select"
                                OnClick="BtnSelect_Click" BorderWidth="2px" BorderStyle="Outset" Height="24px"
                                onmousemove="FocusButton(this.id);" onmouseout="LostFocusButton(this.id);" OnClientClick="javascript:return validateRecord();"></asp:Button>
                            <%--<input id="BtnSelect" type="button" value="Select" onclick=" window.open('SetFrame.aspx',&#9;&#9;&#9;&#9;'_top');"
                                 class="submit-bt" style="border-style:outset; border-width:2px;"  onmousemove="FocusButton(this.id);" onmouseout="LostFocusButton(this.id);"  />--%>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div>
        <asp:HiddenField ID="hdnBusinessUnit" runat="server" />
        <asp:HiddenField ID="hdnBranch" runat="server" />
        <asp:HiddenField ID="hdnyPos" runat="server" Value="0" />
        <asp:HiddenField ID="hdnSessionBusinessUnitId" runat="server" Value="0" />
        <asp:HiddenField ID="hdnSessionBranchId" runat="server" Value="0" />
        <asp:HiddenField ID="hdnSessionBusinessUnitName" runat="server" Value="" />
        <asp:HiddenField ID="hdnSessionBranchName" runat="server" Value="" />
    </div>
    </form>
</body>
</html>
