<%@ master language="C#" autoeventwireup="true" inherits="APC, App_Web_j58pc9zj" %>
<%@ Register Assembly="DevExpress.Web.ASPxDataControls.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxDataControls" TagPrefix="dxwdc" %>
<%@ Register Assembly="DevExpress.Web.ASPxGrid.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxGrid" TagPrefix="dxwg" %>
<%@ Register Assembly="DevExpress.Web.ASPxNavBar.v6.3, Version=6.3.1.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4"
    Namespace="DevExpress.Web.ASPxNavBar" TagPrefix="dxwn" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head runat="server">
    <title>Untitled Page</title>

    <script language="javascript" src="./scriptsw.js" type="text/javascript"></script>

    <script type="text/javascript">
        function viewDocuments()
        {
            var url = 'ViewDocs.aspx';
            var returnValue = openDialog(url,640,150,'View Documents', dummyClose);
            if (returnValue != 'NOTIE')            
                dummyClose(returnValue);
        }                
        function viewRequestInfo(pkid, type)
        {
            // routine to popup Detail Information Dialog
            if (type == '1')
            {
                var url = 'PaymentRequest.aspx?reqId=' + pkid;
                var returnValue = openDialog(url,920,600,'Payment Request Information', processPayRequest);
                if (returnValue != 'NOTIE')
                    processPayRequest(returnValue);
            }
            if (type == '90')
            {
               newPayRequest(pkid);
            }
            if (type == '2')
            {
                var url = 'IntPaymentRequest.aspx?reqId=' + pkid;
                var returnValue = openDialog(url,930,595,'Internal Payment Request Information', processIntPayRequest);
                if (returnValue != 'NOTIE')
                    processIntPayRequest(returnValue);
            }
            if (type == '91')
            {
               newIntPayRequest(pkid);
            }
        }
        
        function processPayRequest(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
               // check if a commit was made
               var returnmsg = returnValue.split('|');
               if (returnmsg[0] == 'commit')
                   commitPayRequest(returnmsg[1]);
            }
        }    
        
        function commitPayRequest(url)
        {
            // url to commit an existing request, done here because of timing issues with show modal dialog
            dialogWin = new Object();
            var url = 'Progress.aspx?type=' + url;
            var returnValue = openDialog(url,410,110,'Payment Request Commit', processCommit);
            if (returnValue != 'NOTIE')            
                processCommit(returnValue);
        }
        
        function newIntPayRequest(pkid)
        {
            // routine to bring up the New Internal Payment Request Dialog
            var url = 'NewIntPaymentRequest.aspx';
            if (pkid != '')
                url += '?guidId=' + pkid;
            var returnValue = openDialog(url,890,460,'New Internal Payment Request', processNewIntPayRequest);
            if (returnValue != 'NOTIE')            
            processNewIntPayRequest(returnValue);
        }
        
        function processNewIntPayRequest(returnValue)
        {
            // routine to process value returned by dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
	            // check if a commit was made
   	            var returnmsg = returnValue.split('|');
   	            if (returnmsg[0] == 'commit')
    	            commitNewIntPayRequest(returnmsg[1]);
    	        if (returnmsg[0] == 'refresh')
    	            document.forms[0].submit();
            }
        }

        function commitNewIntPayRequest(guid)
        {
            // url to commit a new request, done here because of timing issues with show modal dialog
            dialogWin = new Object();
            var url = 'Progress.aspx?type=7&guid=' + guid;
            var returnValue = openDialog(url,410,110,'New Internal Payment Request Commit', processCommit);
            if (returnValue != 'NOTIE')            
                processCommit(returnValue);
        }
        
        function processIntPayRequest(returnValue)
        {
            // routine to process the returned value from the dialog
            if (returnValue == null) {returnValue = 'undefined';}
            if (returnValue != 'undefined')
            {
               // check if a commit was made
               var returnmsg = returnValue.split('|');
               if (returnmsg[0] == 'commit')
                   commitIntPayRequest(returnmsg[1]);
            }
        }    
        
        function commitIntPayRequest(url)
        {
            // url to commit an existing request, done here because of timing issues with show modal dialog
            dialogWin = new Object();
            var url = 'Progress.aspx?type=' + url;
            var returnValue = openDialog(url,410,110,'Internal Payment Request Commit', processCommit);
            if (returnValue != 'NOTIE')            
                processCommit(returnValue);
        }
        </script>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;">
    <form id="form1" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 550px;">
            <tr>
                <td style="vertical-align: top; background-color: transparent; width: 100%; background-image: url(./Images/backs/nbBack.gif);
                    background-repeat: repeat;" id="mainheader" colspan="2">
                    <table>
                        <tr>
                            <td>
                                <img src="./Images/logo.png" style="width: 140px" /></td>
                            <td>
                                <table>
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label1" runat="server" Style="font-weight: bold; color: black; font-family: Tahoma"
                                                Text="Association for" Width="304px"></asp:Label></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 357px">
                                            <asp:Label ID="Label2" runat="server" Style="font-weight: bold; color: black; font-family: Tahoma"
                                                Text="Progressive  Communications" Width="304px"></asp:Label></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr align="left" valign="top" style="height: 100%">
                <td style="vertical-align: top; width: 6%; background-image: url(./Images/backs/nbBack.gif);
                    height: 100%; background-repeat: repeat-x;" id="leftmenu">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
                <td id="mainview" style="height: 100%">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="viewTable">
                        <tr style="vertical-align: top; font-weight: bold; color: White; font-family: Tahoma;">
                            <td style="height: 10%" id="viewheader">
                                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                                </asp:ContentPlaceHolder>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: auto">
                                <asp:ContentPlaceHolder ID="DynamicBody" runat="server">
                                </asp:ContentPlaceHolder>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
