<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" Title="platnosci.admoto.pl - Strona logowania" Culture="auto" UICulture="auto" meta:resourcekey="PageResource1"%>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager id="ScriptManager1" runat="server"></asp:ScriptManager> 
    
<div id="left">
</div>
<div id="content">
    <p><asp:Literal ID="informacja1" runat="server" meta:resourcekey="informacja1Literal">Zaloguj się, aby dokonać płatności kartą.</asp:Literal></p>
    <div id="login">
        <p><asp:Literal ID="informacja2" runat="server" meta:resourcekey="informacja2Literal">Wprowadź numer NIP swojej firmy i numer zlecenia</asp:Literal></p>
        <p><asp:Label ID="NIPLabel" runat="server" AssociatedControlID ="NIPTextBox" Text="NIP:"
            meta:resourcekey="login_NIPLabel"></asp:Label>
        <asp:TextBox ID="NIPTextBox" runat="server"></asp:TextBox></p>                        
        <p><asp:Label ID="NrZlecLabel" runat="server" AssociatedControlID ="NrZlecTextBox" Text="Nr zlecenia:"
            meta:resourcekey="login_NrZlecLabel"></asp:Label>
        <asp:TextBox ID="NrZlecTextBox" runat="server"></asp:TextBox></p>
        <p>
            <asp:Button ID="ZalogujButton" runat="server" Text="Zaloguj" meta:resourcekey="ZalogujButton" OnClick="ZalogujButton_Click"/></p>
        <p class="blad"><asp:Literal ID="errorMsg" runat="server" meta:resourcekey="errorMsgLiteral"></asp:Literal>            
        </p>
        <p class="pomoc">
            <asp:LinkButton ID="NieWieszButton" runat="server" meta:resourcekey="NieWieszButton" OnClientClick="return false;">Nie wiesz jaki jest Twój nr zlecenia?</asp:LinkButton>
        </p>           
    </div>        
</div>


        <div id="flyout" style="display: none; overflow: hidden; z-index: 2; background-color: #FFFFFF; border: solid 1px #D0D0D0;"></div>
        
        <div id="info" style="display: none; width: 400px; z-index: 2; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); font-size: 12px; border: solid 1px #CCCCCC; background-color: #FFFFFF; padding: 5px;">
            <div id="btnCloseParent" style="float: right; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);">
                <asp:LinkButton id="btnClose" runat="server" OnClientClick="return false;" Text="X" ToolTip="Close"
                    Style="background-color: #666666; color: #FFFFFF; text-align: center; font-weight: bold; text-decoration: none; border: outset thin #FFFFFF; padding: 5px;" />
            </div>
            <div>
                <p class="bold">
                    <asp:Literal ID="infoText" runat="server" meta:resourcekey="infoText">Nr zlecenia zakreślony jest czerwoną linią.</asp:Literal></p>            
                    <asp:ImageButton ID="FakturaImageButton" runat="server" AlternateText="faktura" />                               
            </div>
        </div>
       
       
       <script type="text/javascript" language="javascript">
            // Move an element directly on top of another element (and optionally
            // make it the same size)
            function Cover(bottom, top, ignoreSize) {
                var location = Sys.UI.DomElement.getLocation(bottom);
                top.style.position = 'absolute';
                top.style.top = location.y + 'px';
                top.style.left = location.x + 'px';
                if (!ignoreSize) {
                    top.style.height = bottom.offsetHeight + 'px';
                    top.style.width = bottom.offsetWidth + 'px';
                }
            }
        </script>


<ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="NieWieszButton">
            <Animations>
                <OnClick>
                    <Sequence>
                        <%-- Disable the button so it can't be clicked again --%><EnableAction Enabled="false" /><%-- Position the wire frame on top of the button and show it --%><ScriptAction Script="Cover($get('ctl00_ContentPlaceHolder1_NieWieszButton'), $get('flyout'));" /><StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/><%-- Move the wire frame from the button's bounds to the info panel's bounds --%><Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
                            <Move Horizontal="250" Vertical="-250" />
                            <Resize Width="410" Height="548" />
                            <Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
                        </Parallel>
                        
                        <%-- Move the info panel on top of the wire frame, fade it in, and hide the frame --%><ScriptAction Script="Cover($get('flyout'), $get('info'), true);" /><StyleAction AnimationTarget="info" Attribute="display" Value="block"/><FadeIn AnimationTarget="info" Duration=".2"/><StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/><%-- Flash the text/border red and fade in the "close" button --%><Parallel AnimationTarget="info" Duration=".5">
                            <Color PropertyKey="color" StartValue="#666666" EndValue="#FF0000" />
                            <Color PropertyKey="borderColor" StartValue="#666666" EndValue="#FF0000" />
                        </Parallel>
                        <Parallel AnimationTarget="info" Duration=".5">
                            <Color PropertyKey="color" StartValue="#FF0000" EndValue="#666666" />
                            <Color PropertyKey="borderColor" StartValue="#FF0000" EndValue="#666666" />
                            <FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" />
                        </Parallel>
                    </Sequence>
                </OnClick>
            </Animations>
</ajaxToolkit:AnimationExtender>

<ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose">
            <Animations>
                <OnClick>
                    <Sequence AnimationTarget="info">
                        <%--  Shrink the info panel out of view --%><StyleAction Attribute="overflow" Value="hidden"/><Parallel Duration=".3" Fps="15">
                            <Scale ScaleFactor="0.05" Center="true" ScaleFont="true" FontUnit="px" />
                            <FadeOut />
                        </Parallel>
                        
                        <%--  Reset the sample so it can be played again --%><StyleAction Attribute="display" Value="none"/><StyleAction Attribute="width" Value="400px"/><StyleAction Attribute="height" Value=""/><StyleAction Attribute="fontSize" Value="12px"/><OpacityAction AnimationTarget="btnCloseParent" Opacity="0" /><%--  Enable the button so it can be played again --%><EnableAction AnimationTarget="ctl00_ContentPlaceHolder1_NieWieszButton" Enabled="true" /></Sequence>
                </OnClick>
                <OnMouseOver>
                    <Color Duration=".2" PropertyKey="color" StartValue="#FFFFFF" EndValue="#FF0000" />
                </OnMouseOver>
                <OnMouseOut>
                    <Color Duration=".2" PropertyKey="color" StartValue="#FF0000" EndValue="#FFFFFF" />
                </OnMouseOut>
             </Animations>
        </ajaxToolkit:AnimationExtender>

 <asp:Panel ID="xmlShow" runat="server" style="display: none; z-index: 3; background-color:#DDD; border: thin solid navy;">
            <pre style="margin: 5px">&lt;ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="btnInfo"&gt;
&lt;Animations&gt;
    &lt;OnClick&gt;
        &lt;Sequence&gt;
           <em>&lt;%-- Disable the button --%&gt;</em>
            &lt;EnableAction Enabled="false" /&gt; 
           <em>&lt;%-- Show the flyout --%&gt;</em>
            &lt;Parallel AnimationTarget="flyout" Duration=".3" Fps="25"&gt;
                &lt;Move Horizontal="150" Vertical="-50" /&gt;
                &lt;Resize Height="260" Width="280" /&gt;
                &lt;Color AnimationTarget="flyout" PropertyKey="backgroundColor"
                        StartValue="#AAAAAA" EndValue="#FFFFFF" /&gt;
            &lt;/Parallel&gt;
          <em>&lt;%-- Fade in the text --%&gt; </em>
            &lt;FadeIn AnimationTarget="info" Duration=".2"/&gt;
          <em>&lt;%-- Cycle the text and border color to red and back --%&gt;</em>
            &lt;Parallel AnimationTarget="info" Duration=".5"&gt;
                &lt;Color PropertyKey="color"
                        StartValue="#666666" EndValue="#FF0000" /&gt;
                &lt;Color PropertyKey="borderColor"
                        StartValue="#666666" EndValue="#FF0000" /&gt;
            &lt;/Parallel&gt;
            &lt;Parallel AnimationTarget="info" Duration=".5"&gt;
                &lt;Color PropertyKey="color"
                        StartValue="#FF0000" EndValue="#666666" /&gt;
                &lt;Color PropertyKey="borderColor"
                        StartValue="#FF0000" EndValue="#666666" /&gt;
                &lt;FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" /&gt;
            &lt;/Parallel&gt;
        &lt;/Sequence&gt;
    &lt;/OnClick&gt;
&lt;/Animations&gt;
&lt;/ajaxToolkit:AnimationExtender&gt;</pre>
        </asp:Panel>
        
        <asp:Panel ID="xmlClose" runat="server" style="display: none; z-index: 3; background-color: #DDD; border: thin solid navy;">
            <pre style="margin: 5px">&lt;ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose"&gt;
&lt;Animations&gt;
    &lt;OnClick&gt;
        &lt;Sequence AnimationTarget="info"&gt;
          <em>&lt;%-- Scale the flyout down to 5% to make it disappear --%&gt;</em>
            &lt;Parallel Duration=".3" Fps="15"&gt;
                &lt;Scale ScaleFactor="0.05" Center="true"
                        ScaleFont="true" FontUnit="px" /&gt;
                &lt;FadeOut /&gt;
            &lt;/Parallel&gt;
          <em>&lt;%-- Reset the styles on the info box --%&gt;</em>
            &lt;StyleAction Attribute="display" Value="none"/&gt;
            &lt;StyleAction Attribute="width" Value="250px"/&gt;
            &lt;StyleAction Attribute="height" Value=""/&gt;
            &lt;StyleAction Attribute="fontSize" Value="12px"/&gt;
          <em>&lt;%-- Re-enable the button --%&gt;</em>
            &lt;EnableAction Enabled="true"
                    AnimationTarget="ctl00_SampleContent_btnInfo" /&gt;
        &lt;/Sequence&gt;
    &lt;/OnClick&gt;
&lt;/Animations&gt;
&lt;/ajaxToolkit:AnimationExtender&gt;
        </pre>
        </asp:Panel>



</asp:Content>

