function content_5778bc577c8ed7_83867746($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        echo smarty_function_js_include(array('src' => '/js/jquery/jquery.jqChart.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery/jquery.jqRangeSlider.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery/jquery.mousewheel.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery/jquery.jqChart.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery/jquery.jqRangeSlider.min.js'), $_smarty_tpl);
        ?>



<!--[if IE]><?php 
        echo '<script';
        ?>
 lang="javascript" type="text/javascript" src="/js/excanvas.js"><?php 
        echo '</script';
        ?>
><![endif]-->
<?php 
    }
    function content_5778b5e1b0de11_40700872($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        ?>
<!-- calendar stylesheet -->
<?php 
        echo smarty_function_js_include(array('src' => '/js/calendar-win2k-cold-1.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/calendar.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/lang/calendar-en.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/calendar-setup.js'), $_smarty_tpl);
        ?>


<?php 
    }
    function content_5778af75be41c2_04486561($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_data')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php';
        }
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        echo smarty_function_js_data(array('gNonce' => lib_nonce::getNonce()), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/startup.js'), $_smarty_tpl);
    }
    function content_5778b5e1ad9e94_87175621($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_function_html_options')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.html_options.php';
        }
        if (!is_callable('smarty_function_func')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        echo $_smarty_tpl->getSubTemplate('calendar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>





<?php 
        echo smarty_function_js_include(array('src' => '/css/listboxes.css'), $_smarty_tpl);
        ?>



<?php 
        echo '<script';
        ?>
 language="javascript">

function myInit(){
}

function myFormSubmit(f){
	return true;
}

function onDel(f){
	var dd=document.getElementsByName('sel[]');
	var i;
	var c=0;
	for(i=0;i<dd.length;i++) if(dd[i].checked) c=1;
	if(!c){alert('No items selected');return false;}

	return confirm('Are you sure you want to delete selected items?')
}


function myExport(){
	var s=$('#formFilt').serialize()+'&format=export';
	myRedirect('/cashadvance.php?'+s);
	//formFilt
}
function myExport1(){
	var s=$('#formFilt').serialize()+'&cmd=repcolumns';
	myRedirect('/cashadvance.php?'+s);
	//formFilt
}

<?php 
        echo '</script';
        ?>
>
<style>
.toleft{borderX:solid red 1px;}
A.aMCALoan{ font-size:12pt;font-weight:bold}
span.spCreditScore{color:red}
span.spStatus{color:green;}
span.spStatus_Pending{color:red}

span.spFundingType{color:green;font-weight:bold}

DIV.cashAdvSection{
	border:solid  #3399FF 1px;
	margin:10px;
	width:648px;
	
     background: -webkit-gradient(linear, 0 0, 0 bottom, from(#E7F2FA), to(#AAE7FD));
	background: -moz-linear-gradient(#E7F2FA, #AAE7FD);
	background: linear-gradient(#E7F2FA, #AAE7FD);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#E7F2FA, endColorstr=#AAE7FD);
	
}

.cashAdvSection .tdLeft{
padding:8px;
}

.cashAdvSection .tdRight{
padding:8px;
}

.cashAdvSection table.tblRightBlock TD{
	border-bottom:solid #CCCCCC 1px;
}
</style>



<div class="TitleRow">
  	  <div class="toleft"><strong>MCA/Funding Services - 
	  <?php 
        if ($_smarty_tpl->tpl_vars['statusTitle']->value) {
            echo $_smarty_tpl->tpl_vars['statusTitle']->value;
        } else {
            ?>
All Accounts<?php 
        }
        ?>
	  
	  </strong></div>
  	  <div class="toright">&nbsp;
		<?php 
        if (permitted('SUPERADMIN-RIGHTS')) {
            ?>
          	<input type="button" value="Export" onclickx="myRedirect('<?php 
            echo $_smarty_tpl->tpl_vars['exportLink']->value;
            ?>
')" onclick="myExport()"/>
        <?php 
        }
        ?>
      
        <?php 
        echo $_smarty_tpl->getSubTemplate('status/mca_instr.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

      </div>
	  
	  <!--add tehila-->
		<div class="toright">
				<input type="button" value="Design Report" onclickx="myRedirect('<?php 
        echo $_smarty_tpl->tpl_vars['exportLink']->value;
        ?>
')" onclick="myExport1()"/>
		</div>	
		<!--end tehila-->		
  	   
</div>



<TABLE WIDTH="100%">
  <TR >
    <TD align="center" class="tdValueColumn">
	  <form method="get" id="formFilt">
	  <input type="hidden" name="cmd" value="cashadv_list" />
<div class="boxLeft">
  <div class="fldTitle">Search by Users</div>
  <select name="owner_uid" onchange="this.form.submit()" style="width:90px">
    <option value="">All Users</option>
	      
	  <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selUser']->value, 'selected' => $_smarty_tpl->tpl_vars['owner_uid']->value), $_smarty_tpl);
        ?>

    
        </select>
</div>
	    
       <div class="boxLeft">
         <div class="fldTitle">Search by Lenders</div>
         <select name="lender_uid" onchange="this.form.submit()" style="width:90px">
          <option value="">All Lenders</option>
	        
	  <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selLender']->value, 'selected' => $_smarty_tpl->tpl_vars['lender_uid']->value), $_smarty_tpl);
        ?>

    
        </select>
       </div>	    
        
       <div class="boxLeft">
         <div class="fldTitle">Search by Type</div>
         <select name="FundingType" onchange="this.form.submit()" style="width:120px">
          <option value="">All Funding Types</option>
	        
	  <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selFundingType']->value, 'selected' => $_smarty_tpl->tpl_vars['FundingType']->value), $_smarty_tpl);
        ?>

    
        </select>
       </div>

       <div class="boxLeft">
         <div class="fldTitle">Search Status Level</div>
         <select name="status" onchange="this.form.submit()" style="width:120px">
          
	        
	  <?php 
        echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selStatus']->value, 'selected' => $_smarty_tpl->tpl_vars['status']->value), $_smarty_tpl);
        ?>

    
        </select>
       </div>

<!--add tehila
<div class="boxLeft">
	<div class="fldTitle">titel</div>

	<div class="toleft">&nbsp;
	    <input type="button" value="Edit Columns" onclickx="myRedirect('<?php 
        echo $_smarty_tpl->tpl_vars['exportLink']->value;
        ?>
')" onclick="myExport1()"/>
</div>
<!--end tehila-->

        
		<div class="toright">
           <div class="boxLeft">
             <div class="fldTitle">Start Date</div>
             <input class="rep_date" id="date1" type="text"
                name="date1" value="<?php 
        echo $_smarty_tpl->tpl_vars['date1']->value;
        ?>
" style="width:70px" maxlength="10" onchangeX="this.form.submit()" />
           </div>            
            
           <div class="boxLeft">
             <div class="fldTitle">End Date</div>
             <input class="rep_date" id="date2"
                type="text" name="date2" value="<?php 
        echo $_smarty_tpl->tpl_vars['date2']->value;
        ?>
" style="width:70px" maxlength="10" onchangeX="this.form.submit()" />
           </div>            
    
           <div class="boxLeft"><div class="fldTitle">&nbsp;</div>
             <input type="submit" value="Go"  style="width:38px"  />
           </div>
		</div>
	  </form>
	  </TD>
  </TR>
  <TR >
    <TD class="tdListNav"><?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['pagerHtml'];
        ?>
</TD>
  </TR>
    
   <?php 
        if ($_smarty_tpl->tpl_vars['AchworksNotifier']->value) {
            ?>
   <tr><td><?php 
            echo $_smarty_tpl->tpl_vars['AchworksNotifier']->value;
            ?>
</td></tr>
   <?php 
        }
        ?>


    <TR >
    <TD class="tdListNav2"><?php 
        if (permitted('ADMIN-RIGHTS')) {
            ?>
<div class="navCheckAll"><input  name="checkbox" type="checkbox"  title="Check All" onclick="checkAll(this)" /></div><?php 
        }
        ?>
      <div class="navSortBy">
      	<a class="<?php 
        if ($_smarty_tpl->tpl_vars['layout']->value == 1) {
            ?>
disabled<?php 
        }
        ?>
" href="cashadvance.php?cmd=cashadv_list&layout=1">1-Up</a> 
        - <a class="<?php 
        if ($_smarty_tpl->tpl_vars['layout']->value == 3) {
            ?>
disabled<?php 
        }
        ?>
"href="cashadvance.php?cmd=cashadv_list&layout=3">3-Up</a> 
        
        Sort By: 
        <a href="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('id');
        ?>
" class="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('id');
        ?>
">Contract #</a>, 
        <a href="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('BusinessName');
        ?>
" class="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('BusinessName');
        ?>
">DBA Name</a>, 
        <a href="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('date');
        ?>
" class="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('date');
        ?>
">Date</a>, 
      <a href="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderlink('status');
        ?>
" class="<?php 
        echo $_smarty_tpl->tpl_vars['rep']->value['this']->orderclass('status');
        ?>
">Status</a>        </div></TD> 
    </TR>
</TABLE>






<form method="post">
  <input type="hidden" name="cmd" value="cashadv_del">


<?php 
        if ($_smarty_tpl->tpl_vars['layout']->value == 1) {
            ?>

<?php 
            $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['item']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['rep']->value['list'];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                $_smarty_tpl->tpl_vars['item']->_loop = true;
                ?>
    <?php 
                echo $_smarty_tpl->getSubTemplate('boxes/mca_box.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('item' => $_smarty_tpl->tpl_vars['item']->value), 0);
                ?>

<?php 
            }
            ?>

<?php 
        } else {
            ?>

<div class="appList3up">
<?php 
            $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['item']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['rep']->value['list'];
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                $_smarty_tpl->tpl_vars['item']->_loop = true;
                ?>
   <div class="appListSection appListSection_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['StatusColor'];
                ?>
 3up"><div class="level2">

		<div class="blockContainer">
            <?php 
                if (permitted('SUPERADMIN-RIGHTS')) {
                    ?>
            <input <?php 
                    if (!$_smarty_tpl->tpl_vars['item']->value['allowDelete']) {
                        ?>
disabled<?php 
                    }
                    ?>
  name="sel[]" value="<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id'];
                    ?>
" type="checkbox" />
            <?php 
                }
                ?>
            <a href="/cashadvance.php?cmd=cashadv_edit&app_id=<?php 
                echo $_smarty_tpl->tpl_vars['app_id']->value;
                ?>
&cashadv_id=<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['cashadv_id'];
                ?>
" class="aMCALoan">MCA Acct # <?php 
                echo $_smarty_tpl->tpl_vars['item']->value['cashadv_idStr'];
                ?>
</a><br />
            
            <strong>DBA:</strong> <span class="spTooltip" onmouseover="tooltip.show('<div style=\'max-width:300px\'><?php 
                echo smarty_function_func(array('name' => 'MCAInfoPopup', 'cashadv_id' => $_smarty_tpl->tpl_vars['item']->value['cashadv_id']), $_smarty_tpl);
                ?>
</div>');" onmouseout="tooltip.hide();"><?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['DBAName'], 24, '...', true);
                ?>
</span>
            
            <br />
            <strong>Owner:</strong>  <span title="<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['OwnerName'];
                ?>
"><?php 
                echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['item']->value['OwnerName'], 24, '...', true);
                ?>
</span><br />
            <br />
            Funding Type: <span class="spFundingType">
            	
                <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'Fixed Daily ACH') {
                    ?>
Fixed ACH<?php 
                }
                ?>
                <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'MCA') {
                    ?>
CC TXN %<?php 
                }
                ?>
                <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'LockBox') {
                    ?>
LockBox/TXN %<?php 
                }
                ?>
                <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'CCFixed') {
                    ?>
Fixed + CC<?php 
                }
                ?>
                </span> <br />
            Funding: $<?php 
                echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['AmountRequested']) === null || $tmp === '' ? 0 : $tmp, 2);
                ?>
 <br />
            Payback: $<?php 
                echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2);
                ?>
 (<?php 
                echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['PaybackCoeff']) === null || $tmp === '' ? 0 : $tmp;
                ?>
)<br />

            <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'Fixed Daily ACH') {
                    ?>
Daily ACH: <?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0);
                    ?>
 of <?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['days'];
                    ?>
 Payments<br /><?php 
                }
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'MCA') {
                    ?>
Daily CC: $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
 of $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
<br /><?php 
                }
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'LockBox') {
                    ?>
Daily CC: $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
 of $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
<br /><?php 
                }
                ?>
            <?php 
                if ($_smarty_tpl->tpl_vars['item']->value['FundingProduct'] == 'CCFixed') {
                    ?>
            	Daily ACH: <?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['perfPayments'], 0);
                    ?>
 of <?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['days'];
                    ?>
 Payments<br />
            	Daily CC: $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['totalHold']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
 of $<?php 
                    echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['TotalPayback']) === null || $tmp === '' ? 0 : $tmp, 2);
                    ?>
<br />
            <?php 
                }
                ?>
            
            
            <br />
            <strong>Status:</strong> <span class="spStatus spStatus_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['Status'];
                ?>
 nobr" title="<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['lastNote'];
                ?>
">&nbsp;<strong><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['statusTitle'];
                ?>
</strong></span>
            
            
            <br />
            <strong>Sales Rep:</strong> <span title="<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                ?>
</span>
            <br />

            Comm: $<?php 
                echo smarty_modifier_money(($tmp = @$_smarty_tpl->tpl_vars['item']->value['RepComm']) === null || $tmp === '' ? 0 : $tmp, 2);
                ?>

		</div>
        
    </div>
    </div>
    
    
<?php 
            }
            ?>
</div>


<?php 
        }
        ?>



<?php 
        if (permitted('SUPERADMIN-RIGHTS')) {
            ?>
    <TABLE WIDTH="100%">
    <tr class="trSubmitBar">
      <td>
        <input name="btnDelete" type="submit" onclick="return onDel(this.form)" value="Delete" /></td>
    </tr>
    </TABLE>
<?php 
        }
        ?>


</form>

<?php 
        echo '<script';
        ?>
 type="text/javascript">
    Calendar.setup({
        inputField     :    "date1",      // id of the input field
        ifFormat       :    "%m/%d/%Y",//"%Y-%m-%d",	// %H:%M",       // format of the input field
        showsTime      :    true,            // will display a time selector
        button         :    "date1",   // trigger for the calendar (button ID)
        singleClick    :    true,           // double-click mode
        step           :    1                // show all years in drop-down boxes (instead of every other year as default)
    });
    Calendar.setup({
        inputField     :    "date2",      // id of the input field
        ifFormat       :    "%m/%d/%Y",//"%Y-%m-%d",	// %H:%M",       // format of the input field
        showsTime      :    true,            // will display a time selector
        button         :    "date2",   // trigger for the calendar (button ID)
        singleClick    :    true,           // double-click mode
        step           :    1                // show all years in drop-down boxes (instead of every other year as default)
    });

<?php 
        echo '</script';
        ?>
>

<?php 
    }
    function content_5778af75d5ba21_86432951($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_function_func')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php';
        }
        echo smarty_function_js_include(array('src' => '/js/mybox.js'), $_smarty_tpl);
        ?>


<?php 
        if ($_smarty_tpl->tpl_vars['node']->value) {
            ?>
	<?php 
            echo smarty_function_func(array('name' => 'SecNodeStatus', 'node' => $_smarty_tpl->tpl_vars['node']->value, 'sec' => 'mybox', 'var' => 'SecNodeStatus'), $_smarty_tpl);
            ?>

<?php 
        }
        ?>

<div data-num="<?php 
        echo $_smarty_tpl->tpl_vars['SecNodeStatus']->value['sortOrder'];
        ?>
" data-navcol="<?php 
        echo $_smarty_tpl->tpl_vars['SecNodeStatus']->value['navCol'];
        ?>
" data-node="<?php 
        echo $_smarty_tpl->tpl_vars['node']->value;
        ?>
" class="mybox <?php 
        echo $_smarty_tpl->tpl_vars['class']->value;
        ?>
 <?php 
        if ($_smarty_tpl->tpl_vars['node']->value) {
            ?>
mybox-slide<?php 
        }
        ?>
">
	<h2>
		<div class="title">
			<?php 
        if ($_smarty_tpl->tpl_vars['url']->value) {
            ?>
				<a href="<?php 
            echo $_smarty_tpl->tpl_vars['url']->value;
            ?>
"><?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['title']->value) === null || $tmp === '' ? '&nbsp;' : $tmp;
            ?>
</a>
			<?php 
        } else {
            ?>
				<?php 
            echo ($tmp = @$_smarty_tpl->tpl_vars['title']->value) === null || $tmp === '' ? '&nbsp;' : $tmp;
            ?>

			<?php 
        }
        ?>
		</div>
		<?php 
        if ($_smarty_tpl->tpl_vars['node']->value) {
            ?>
	    <div id="<?php 
            echo $_smarty_tpl->tpl_vars['node']->value;
            ?>
_btn" onclick="mybox_showHideBox('<?php 
            echo $_smarty_tpl->tpl_vars['node']->value;
            ?>
')" class="rightMinus"></div>
	    <?php 
        }
        ?>
	</h2>
	<div id="<?php 
        echo $_smarty_tpl->tpl_vars['node']->value;
        ?>
_block" class="box-inner">
    	<?php 
        echo $_smarty_tpl->tpl_vars['content']->value;
        ?>

	</div>
	<div class="more">&nbsp;</div>
</div>


<?php 
        if ($_smarty_tpl->tpl_vars['node']->value) {
            echo '<script';
            ?>
 language="javascript">
	mybox_initBox('<?php 
            echo $_smarty_tpl->tpl_vars['node']->value;
            ?>
','<?php 
            echo $_smarty_tpl->tpl_vars['SecNodeStatus']->value['state'];
            ?>
','<?php 
            echo $_smarty_tpl->tpl_vars['SecNodeStatus']->value['sortOrder'];
            ?>
');
<?php 
            echo '</script';
            ?>
>
<?php 
        }
    }
    function content_5778b6e563b395_81390751($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php';
        }
        echo smarty_function_js_include(array('src' => '/js/controls/datetime.js'), $_smarty_tpl);
        ?>

<input readonly id="f_<?php 
        echo $_smarty_tpl->tpl_vars['name']->value;
        ?>
_1" type="text" 
	 value="<?php 
        echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['value']->value, '%B %d, %Y, %I:%M %p');
        ?>
" 
	maxlength="10" title="Click to change date" 
	style="width:100%"
	<?php 
        if (!$_smarty_tpl->tpl_vars['disabled']->value) {
            ?>
	onchange="datetimeCtrlOnchange('<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
');<?php 
            echo $_smarty_tpl->tpl_vars['onchange']->value;
            ?>
"
	<?php 
        }
        ?>
	/>
	<?php 
        if (!$_smarty_tpl->tpl_vars['disabled']->value) {
            ?>
<input name="<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
" type="hidden"  value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value;
            ?>
" />
<?php 
            echo '<script';
            ?>
 type="text/javascript">
    Calendar.setup({
        inputField     :    "f_<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
_1",      
        ifFormat       :    "%B %d, %Y, %I:%M %p",
        showsTime      :    true,
        button         :    "f_<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
_1",
        singleClick    :    true,
        step           :    1
    });
<?php 
            echo '</script';
            ?>
>
	<?php 
        }
    }
    function content_5778af8a051997_20571009($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        if (!is_callable('smarty_function_js_data')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php';
        }
        if (!is_callable('smarty_function_cycle')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.cycle.php';
        }
        if (!is_callable('smarty_modifier_ucwords')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.ucwords.php';
        }
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        if (!is_callable('smarty_modifier_truncate')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.truncate.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php';
        }
        if (!is_callable('smarty_modifier_date')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php';
        }
        echo smarty_function_js_include(array('src' => '/css/calendar.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/homepage.css'), $_smarty_tpl);
        ?>


<?php 
        echo '<script';
        ?>
 language="javascript">
	function statAppChange(){
		var statApp=getCtrlValue('statApp');
		el('tblAppProf').style.display= statApp=='Prof'?'':'none';
		el('tblAppVol').style.display= statApp=='Vol'?'':'none';
		el('tblAppNumtrans').style.display= statApp=='Numtrans'?'':'none';

		var statAgent=getCtrlValue('statAgent');
		el('tblAgentAccSub').style.display= statAgent=='AccSub'?'':'none';
		el('tblAgentAcc').style.display= statAgent=='Acc'?'':'none';
		el('tblAgentRes').style.display= statAgent=='Res'?'':'none';
		el('tblAgentCom').style.display= statAgent=='Com'?'':'none';

		var statMca=getCtrlValue('statMca');
		el('tblMcaAmount').style.display= statMca=='Amount'?'':'none';
		el('tblMcaBal').style.display= statMca=='Bal'?'':'none';
		el('tblMcaProf').style.display= statMca=='Prof'?'':'none';

// top 10
		var statTeamleader=getCtrlValue('statTeamleader');
		el('tblTeamleaderLead').style.display= statTeamleader=='Lead'?'':'none';
		el('tblTeamleaderAppt').style.display= statTeamleader=='Appt'?'':'none';
		el('tblTeamleaderSold').style.display= statTeamleader=='Sold'?'':'none';

		var statTm=getCtrlValue('statTm');
		el('tblTmLead').style.display= statTm=='Lead'?'':'none';
		el('tblTmAppt').style.display= statTm=='Appt'?'':'none';
		el('tblTmSold').style.display= statTm=='Sold'?'':'none';

		var statLeadcloser=getCtrlValue('statLeadcloser');
		el('tblLeadcloserLead').style.display= statLeadcloser=='Lead'?'':'none';
		el('tblLeadcloserAppt').style.display= statLeadcloser=='Appt'?'':'none';
		el('tblLeadcloserSold').style.display= statLeadcloser=='Sold'?'':'none';
	}


    $(document).ready(function() {



    });

<?php 
        echo '</script';
        ?>
>
<style>
</style>



<div class="mySortable HomePage">



<?php 
        if (permitted('HOME-DailyQuotes')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

		<?php 
                echo smarty_function_js_data(array('jsQuotes' => $_smarty_tpl->tpl_vars['jsQuotes']->value, 'jsQuotesTimer' => $_smarty_tpl->tpl_vars['confDayquotesTimer']->value), $_smarty_tpl);
                ?>

		<div id="quoteDiv"></div>
		
		<?php 
                echo '<script';
                ?>
>
        var myQuoteI=0;
        myQuoteTimer();
        function myQuoteTimer(){
        	if(jsQuotes.length==0) return;
        	var d=document.getElementById('quoteDiv');
        	if(!d) return;
        	if(!jsQuotes[myQuoteI]){myQuoteI=0;}
        	var s=jsQuotes[myQuoteI]['txt'];
        //	d.innerHTML='Quote #'+(jsQuotes[myQuoteI]['id'])+': '+s;
        	d.innerHTML=s;
        	myQuoteI++;

        //    alert(myFlashTextTag);
        	window.setTimeout("myQuoteTimer()",jsQuotesTimer*1000,"javascript");
        }
		<?php 
                echo '</script';
                ?>
>
		
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-DailyQuotes', 'title' => 'Daily Sales & Motivational Quotes', 'class' => 'box-one box-blue'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>


<?php 
        }
        ?>



<?php 
        if (permitted('HOME-top25App')) {
            ?>

	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statApp">
		  <option value="Prof" selected>by Total Profit $</option>
		  <option value="Vol" >by Volume $</option>
		  <option value="Numtrans" >by Avg TXN $</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>
			  <table id="tblAppProf" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAppProfit']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblAppVol" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAppVol']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['volume'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblAppNumtrans" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right"># Trans</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAppNumtrans']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['numTrans'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
      </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top25App', 'title' => 'Top 25 Merchants', 'class' => 'box-three box-1 box-green'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>

<?php 
        if (permitted('HOME-top25Agent')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25Agent', 'title' => 'Top 25  Sales Agents', 'class' => 'box-three box-2 box-green'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top25Agent', 'title' => 'Top 25  Sales Agents', 'class' => 'box-three box-2 box-green'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statAgent">
		  <option value="AccSub" selected>by Account Submitted</option>
		  <option value="Acc" >by Approved Accounts</option>
		  <option value="Res" >by Residuals</option>
		  <option value="Com" >by Commissions</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>

			  <table id="tblAgentAccSub" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAgentAccSub']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>


			  <table id="tblAgentAcc" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAgentAcc']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblAgentRes" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Amount $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAgentRes']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblAgentCom" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Comm $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topAgentCom']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
    </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top25Agent', 'title' => 'Top 25  Sales Agents', 'class' => 'box-three box-2 box-green'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>

<?php 
        if (permitted('HOME-top25MCA')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statMca">
		  <option value="Amount" selected>by Funding Amount $</option>
		  <option value="Bal" >by Balance $</option>
		  <option value="Prof" >by Profit $</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>
			  <table id="tblMcaAmount" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topMcaAmount']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['amount'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblMcaBal" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Balance $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topMcaBal']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['bal'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblMcaProf" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">Merchant Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Amount $</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topMcaProf']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['BusinessName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['profit'], 2);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
      </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top25MCA', 'title' => 'Top 25 MCA Accounts', 'class' => 'box-three box-3 box-green'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>
  








<?php 
        if (permitted('HOME-top10Teamleader')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statTeamleader">
		  <option value="Lead" selected>by Leads</option>
		  <option value="Appt" >by Appointments</option>
		  <option value="Sold" >by Sold Leads</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>

			  <table id="tblTeamleaderLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTeamleaderLead']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>


			  <table id="tblTeamleaderAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTeamleaderAppt']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblTeamleaderSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTeamleaderSold']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
      </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top10Teamleader', 'title' => 'Top 10 Team Leaders', 'class' => 'box-three box-1 box-red'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>



<?php 
        if (permitted('HOME-top10Tm')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statTm">
		  <option value="Lead" selected>by Leads</option>
		  <option value="Appt" >by Appointments</option>
		  <option value="Sold" >by Sold Leads</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>

			  <table id="tblTmLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTmLead']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>


			  <table id="tblTmAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTmAppt']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblTmSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topTmSold']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
      </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top10Tm', 'title' => 'Top 10 Telemarketers', 'class' => 'box-three box-2 top10box box-red'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>


<?php 
        if (permitted('HOME-top10Leadcloser')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders" align="center">
		  <select style="width:195px" onchange="statAppChange()" name="statLeadcloser">
		  <option value="Lead" selected>by Leads</option>
		  <option value="Appt" >by Appointments</option>
		  <option value="Sold" >by Sold Leads</option>
		  </select>		  </td>
          </tr>
		  <tr>
		  <td>

			  <table id="tblLeadcloserLead" class="myStat25" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topLeadcloserLead']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>


			  <table id="tblLeadcloserAppt" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topLeadcloserAppt']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['UserName'];
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

			  <table id="tblLeadcloserSold" class="myStat25" style="display:none" width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
				  <td class="tdListHeaders myDbaHeader">User Name</td>
				  <td class="tdListHeaders myAmtHeader"><div align="right">Total #</div></td>
				</tr>
				<?php 
                echo smarty_function_cycle(array('values' => 'even,odd', 'reset' => true, 'print' => false), $_smarty_tpl);
                ?>

				<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['topLeadcloserSold']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
				<tr class="<?php 
                    echo smarty_function_cycle(array('values' => 'even,odd'), $_smarty_tpl);
                    ?>
" >
				  <td><div class="myDbaCell"><?php 
                    echo smarty_modifier_ucwords($_smarty_tpl->tpl_vars['item']->value['UserName']);
                    ?>
</div></td>
				  <td><div class="myAmtCell"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cnt'], 0);
                    ?>
</div></td>
				</tr>
				<?php 
                }
                ?>
			  </table>

		  </td>
		  </tr>
        
      </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-top10Leadcloser', 'title' => 'Top 10 Lead Closers', 'class' => 'box-three box-3 top10box box-red'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>






<?php 
        if (permitted('HOME-NewMerchBoard')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<table  width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="tdListHeaders">&nbsp;</td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>Today</strong></td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>MTD</strong></td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>Last Month </strong></td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>YTD</strong></td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>Last Year </strong></td>
          <td align="right" class="tdListHeaders quickStatCell"><strong>Life Time </strong></td>
        </tr>
<?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['statList']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
        <tr class="trOut">
          <td align="left" class="tdValueColumn "><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['statusTitle'];
                    ?>
</td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntToday']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntMTD']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastMonth']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntYTD']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntLastYear']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
          <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo ($tmp = @$_smarty_tpl->tpl_vars['item']->value['cntALL']) === null || $tmp === '' ? 0 : $tmp;
                    ?>
</div></td>
        </tr>
<?php 
                }
                ?>
        
      </table>			
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-NewMerchBoard', 'title' => 'New Merchant Boarding & Underwriting Statistics', 'class' => 'box-one box-yellow'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>


<?php 
        if (permitted('HOME-ApprovedMerch')) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<table  width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="tdListHeaders">&nbsp;</td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>Today</strong></td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>MTD</strong></td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>Last Month </strong></td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>YTD</strong></td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>Last Year </strong></td>
                <td align="right" class="tdListHeaders quickStatCell"><strong>Life Time </strong></td>
              </tr>
            <?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['statProfList']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
            <tr class="trOut">
              <td align="left" class="tdValueColumn "><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['statusTitle'];
                    ?>
</td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntToday']);
                    ?>
</div></td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntMTD']);
                    ?>
</div></td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastMonth']);
                    ?>
</div></td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntYTD']);
                    ?>
</div></td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntLastYear']);
                    ?>
</div></td>
              <td class="tdValueColumn quickStatCell"><div align="right"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntALL']);
                    ?>
</div></td>
            </tr>
            <?php 
                }
                ?>
          </table>
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'HOME-ApprovedMerch', 'title' => 'Approved Merchants - Bonuses, Commissions, & Lease Funding', 'class' => 'box-one box-green'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>




<?php 
        if ($_smarty_tpl->tpl_vars['trafficEmbedUrl']->value) {
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<iframe style="height: 500px; width: 100%;" src="<?php 
                echo $_smarty_tpl->tpl_vars['trafficEmbedUrl']->value;
                ?>
" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe>		
	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => 'test', 'title' => "Daily Traffic Map Report for " . (string) $_smarty_tpl->tpl_vars['trafficEmbedCity']->value . ", " . (string) $_smarty_tpl->tpl_vars['trafficEmbedState']->value, 'class' => 'box-one box-red'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>




<?php 
        $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['section']->_loop = false;
        $_smarty_tpl->tpl_vars['sec_code'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sections']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value) {
            $_smarty_tpl->tpl_vars['section']->_loop = true;
            $_smarty_tpl->tpl_vars['sec_code']->value = $_smarty_tpl->tpl_vars['section']->key;
            ?>
	<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green'));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green'), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

<table class="tblIcons" border="0" cellspacing="0" cellpadding="0" width="100%">
    <?php 
                $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['row']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['section']->value['items3'];
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value) {
                    $_smarty_tpl->tpl_vars['row']->_loop = true;
                    ?>
    <tr> 
	  <?php 
                    $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['item']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['row']->value;
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                        $_smarty_tpl->tpl_vars['item']->_loop = true;
                        ?>
      <td><?php 
                        if ($_smarty_tpl->tpl_vars['item']->value['img']) {
                            ?>
          <div class="myicon_home"><a href="javascript:;" onclick="window.location.href='<?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['url'];
                            ?>
'"><img border="0" src="<?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['img'];
                            ?>
" />
          <div class="title"><?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['title'];
                            ?>
</div>
          </a></div>
        <?php 
                        }
                        ?>
	  </td>
      <?php 
                    }
                    ?>
	  </tr>
    <?php 
                }
                ?>
  </table>

	<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => "HOME-Icons-" . (string) $_smarty_tpl->tpl_vars['sec_code']->value, 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => 'box-one box-green'), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>
  






<?php 
        if ($_smarty_tpl->tpl_vars['leadstorelocatorCode']->value) {
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue"));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=leadstorelocatorCode"
                      OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'"></iframe>
<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => "home_storelocator", 'title' => "Store Locator by Zip Code", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
  
<?php 
        }
        ?>



<?php 
        if (permitted('HOME-TopNews')) {
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray"));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<?php 
                echo smarty_function_js_include(array('src' => '/css/articles.css'), $_smarty_tpl);
                ?>

<div class="articles-page">
    <div class="container clearfix">
        <?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['articles']->value['list'];
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
            <div class="vid-box <?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['color'];
                    ?>
" onclick="myRedirect('<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['url'];
                    ?>
')">
                <div class="vid">
                    <?php 
                    if ($_smarty_tpl->tpl_vars['item']->value['img']) {
                        ?>
                    <img border="0" order="0" widthX="200" heightX="170" src="<?php 
                        echo $_smarty_tpl->tpl_vars['item']->value['img'];
                        ?>
" />
                    <?php 
                    }
                    ?>
                </div>
                
                <div class="info">
                    <div class="title"><?php 
                    echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['item']->value['news']), 100);
                    ?>
</div>
                    <div class="cntviews"> 
                 Article #<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['news_id'];
                    ?>
 </div>
                    <div class="date"><?php 
                    echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['item']->value['post_date'], "%m/%d/%Y %H:%M %p");
                    ?>
</div>
                </div>
            </div>            
        <?php 
                }
                ?>
    
    </div>
</div>
<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => "home_toparticles", 'title' => "Most Recent News Articles", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
  
<?php 
        }
        ?>



<?php 
        if (permitted('HOME-TopVideos')) {
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray"));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>

	<?php 
                echo smarty_function_js_include(array('src' => '/css/trainingvideo.css'), $_smarty_tpl);
                ?>

<div class="training-vid">
    <div class="container">
        <?php 
                $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                $_smarty_tpl->tpl_vars['item']->_loop = false;
                $_from = $_smarty_tpl->tpl_vars['TrainingVideos']->value;
                if (!is_array($_from) && !is_object($_from)) {
                    settype($_from, 'array');
                }
                foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                    $_smarty_tpl->tpl_vars['item']->_loop = true;
                    ?>
            <div class="vid-box <?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['color'];
                    ?>
" onclick="myRedirect('<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['link'];
                    ?>
')">
                <div class="vid">
                    <img src="http://i1.ytimg.com/vi/<?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['youtube_code'];
                    ?>
/default.jpg" width="120" height="90" border="0"/>
                </div>
                
                <div class="info">
                    <div class="title"><?php 
                    echo $_smarty_tpl->tpl_vars['item']->value['name'];
                    ?>
</div>
                    <div class="cntviews"><?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['item']->value['cntViews'], 0);
                    ?>
 views</div>
                    <div class="date"><?php 
                    echo smarty_modifier_date($_smarty_tpl->tpl_vars['item']->value['time_created'], 'datetime');
                    ?>
</div>
                </div>
            </div>            
        <?php 
                }
                ?>
    
    </div>
</div>
<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => "home_toptrainvideo", 'title' => "Most Recent Training Videos", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>

<?php 
        }
        ?>


</div>







<?php 
        echo '<script';
        ?>
 language="javascript">


mybox_sortableInit('.mySortable.HomePage');

<?php 
        echo '</script';
        ?>
>




<?php 
        echo $_smarty_tpl->tpl_vars['speakpipeCode']->value;
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['olarkCode']->value;
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['phpliveCode']->value;
        ?>




<?php 
    }
    function content_5778af8c344465_65996588($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        echo smarty_function_js_include(array('src' => '/js/nav.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/navbtn.css'), $_smarty_tpl);
        ?>






<?php 
        $_smarty_tpl->tpl_vars['slidebox_section'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['slidebox_section']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['sections']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['slidebox_section']->key => $_smarty_tpl->tpl_vars['slidebox_section']->value) {
            $_smarty_tpl->tpl_vars['slidebox_section']->_loop = true;
            if ($_smarty_tpl->tpl_vars['slidebox_section']->value['items'] || $_smarty_tpl->tpl_vars['slidebox_section']->value['html']) {
                ?>

	
	<?php 
                if (isset($_smarty_tpl->tpl_vars['slidebox_section']->value['cnt'])) {
                    ?>
 
		<?php 
                    $_smarty_tpl->tpl_vars['title'] = new Smarty_variable((string) $_smarty_tpl->tpl_vars['slidebox_section']->value['title'] . " (" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['cnt'] . ")", null, 0);
                    ?>
	<?php 
                } else {
                    ?>
		<?php 
                    $_smarty_tpl->tpl_vars['title'] = new Smarty_variable($_smarty_tpl->tpl_vars['slidebox_section']->value['title'], null, 0);
                    ?>
	<?php 
                }
                ?>


	<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"));
                $_block_repeat = true;
                echo smarty_block_mybox(array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

		
		

		<div id="<?php 
                    echo $_smarty_tpl->tpl_vars['slidebox']->value['code'];
                    ?>
_<?php 
                    echo $_smarty_tpl->tpl_vars['slidebox_section']->value['code'];
                    ?>
_block" class="leftMenuDDItems">


		  <?php 
                    if ($_smarty_tpl->tpl_vars['slidebox_section']->value['items']) {
                        ?>
			  <?php 
                        $_smarty_tpl->tpl_vars['slidebox_item'] = new Smarty_Variable();
                        $_smarty_tpl->tpl_vars['slidebox_item']->_loop = false;
                        $_from = $_smarty_tpl->tpl_vars['slidebox_section']->value['items'];
                        if (!is_array($_from) && !is_object($_from)) {
                            settype($_from, 'array');
                        }
                        foreach ($_from as $_smarty_tpl->tpl_vars['slidebox_item']->key => $_smarty_tpl->tpl_vars['slidebox_item']->value) {
                            $_smarty_tpl->tpl_vars['slidebox_item']->_loop = true;
                            ?>
			  	<div class="left_btn1 <?php 
                            if ($_smarty_tpl->tpl_vars['slidebox_section']->value['type'] == 'bluelinks') {
                                ?>
lead_btn1<?php 
                            }
                            ?>
 <?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['class'];
                            ?>
" onclick="myRedirect('<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['url'];
                            ?>
','<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['target'];
                            ?>
')" <?php 
                            if ($_smarty_tpl->tpl_vars['slidebox_item']->value['tooltip']) {
                                ?>
data-tooltip="<?php 
                                echo $_smarty_tpl->tpl_vars['slidebox_item']->value['tooltip'];
                                ?>
"<?php 
                            }
                            ?>
>
			  		<div class="left" title="<?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['title'];
                            ?>
"><?php 
                            echo $_smarty_tpl->tpl_vars['slidebox_item']->value['title'];
                            ?>
</div>
		  			<?php 
                            if (isset($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt']) || $_smarty_tpl->tpl_vars['slidebox_item']->value['showCnt']) {
                                ?>
			  		<div class="right">
			  			<div class="counter">
							<?php 
                                if (is_numeric($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'])) {
                                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'], 0);
                                } else {
                                    echo $_smarty_tpl->tpl_vars['slidebox_item']->value['cnt'];
                                }
                                ?>
						</div>
					</div>
					<?php 
                            }
                            ?>
			  	</div>
		  	  <?php 
                        }
                        ?>
		  <?php 
                    }
                    ?>
	 
		  
		  
		  



	      
	      <?php 
                    if ($_smarty_tpl->tpl_vars['slidebox_section']->value['html']) {
                        ?>
	      	<?php 
                        echo $_smarty_tpl->tpl_vars['slidebox_section']->value['html'];
                        ?>

	      <?php 
                    }
                    ?>



		</div>
	<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_mybox(array('node' => (string) $_smarty_tpl->tpl_vars['slidebox']->value['code'] . "_" . (string) $_smarty_tpl->tpl_vars['slidebox_section']->value['code'], 'title' => $_smarty_tpl->tpl_vars['title']->value, 'class' => "box-one box-gray box-nav"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
		



<?php 
            }
        }
        ?>




<?php 
    }
    function content_5778b6e5db1a50_97898098($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_function_js_data')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php';
        }
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        if (!is_callable('smarty_modifier_cut')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.cut.php';
        }
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        if (!is_callable('smarty_function_html_options')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.html_options.php';
        }
        if (!is_callable('smarty_modifier_num')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.num.php';
        }
        if (!is_callable('smarty_function_my_call')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.my_call.php';
        }
        ?>
<style>
	.statBlock em { 
		color:blue;
	}
	.statBlock a {
		font-weight:bold;
	}
</style>

<!--add tehila -->
<?php 
        echo smarty_function_js_include(array('src' => '/js/form_validator.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/uploader/css/jquery.fileupload-ui.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/uploader/js/vendor/jquery.ui.widget.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/uploader/js/jquery.iframe-transport.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/uploader/js/jquery.fileupload.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/upload.css'), $_smarty_tpl);
        ?>

<!--end tehila -->

<?php 
        echo smarty_function_js_include(array('src' => '/js/lead.js'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('calendar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>



<?php 
        echo smarty_function_js_include(array('src' => '/js/form_validator.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_data(array('approveValidationErr' => $_smarty_tpl->tpl_vars['approveValidationErr']->value, 'tab' => $_smarty_tpl->tpl_vars['tab']->value, 'jsFundingProduct' => $_smarty_tpl->tpl_vars['FundingProduct']->value, 'totalPerc' => $_smarty_tpl->tpl_vars['totalPerc']->value, 'cntLenders' => $_smarty_tpl->tpl_vars['cntLenders']->value, 'BusinessEmail' => $_smarty_tpl->tpl_vars['BusinessEmail']->value, 'cashadv_id' => $_smarty_tpl->tpl_vars['cashadv_id']->value, 'cntMissingDocs' => $_smarty_tpl->tpl_vars['cntMissingDocs']->value, 'permittedSA' => $_smarty_tpl->tpl_vars['permittedSA']->value), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/statusColorBox.css'), $_smarty_tpl);
        ?>



<style>
.notesTable .v1{color:#3282e6}
</style>



<style>
.inpMinimal{background:#DDFFFF}
input.decFld{width:95%}

.HLred{color:red;}
.HLgreen{color:green;}

.financialBanksTable .tdListHeaders{font-size:8pt;}
.financialBanksTable input[type="text"] {text-align:right;width:100%}

.graySummary{
	background-color:#ccc;
	padding:4px;
	margin:8px 0px;
	font-size:12px;
}

</style>
<?php 
        echo '<script';
        ?>
 language="javascript">
//add tehila
var Attachments=[];
$(function () {
	$('#fileupload').fileupload({
        dataType: 'json',
        start: function (e) {
			$('#progress').show();
        },
        stop: function (e) {
			//alert('TEST - it will refresh page to save uploaded files');
			//$('#progress').hide();
			document.form1.jAttachments.value=JSON.stringify(Attachments);
			document.form1.submit();
        },
        done: function (e, data) {
			var origname=data.files[0].name;		
			var size=data.result.files[0].size;
			var file=data.result.files[0].name;
			Attachments.push({name:origname,size:size,file:file});
			showAttachments();
        },
        progressall: function (e, data) {
               var progress = parseInt(data.loaded / data.total * 100, 10);
               $('#progress .bar').css(
                   'width',
                   progress + '%'
               );
        },
    });
	

});

function showAttachments(){
//	alert(print_r(Attachments));
	var ss='';
	for(i in Attachments){
			var v=Attachments[i];
			var title=v.name;
			ss=ss+(ss?'<br>':'')+title
	}
	$('#uploadFilesList').html(ss);
}

//end tehila*/

function emailACHBalanceClick(){
	if(BusinessEmail){
		//alert('Open PDF');
		myRedirect('/pdf/index.php?doc=MCADailyACHPayment&cashadv_id='+cashadv_id);
	}else{
		alert('This report cannot be emailed to the merchant because the email is missing on the DBA page.');
	}
}

function emailACHCCClick(){
	if(BusinessEmail){
		//alert('Open PDF');
		myRedirect('/pdf/index.php?doc=MCACreditCardBatchPayment&cashadv_id='+cashadv_id);
	}else{
		alert('This report cannot be emailed to the merchant because the email is missing on the DBA page.');
	}
}

var savedStatusCL=getCtrlValue('Status'); // add tehila
function myInit(){
	
	var e=el('OfficeCommPerc'); if(e) e.disabled=true;
	var blueitems=['AmountRequested','FactorRate',/*'OfficeCommPerc',*/'RepCommPerc','monthDeposit1','monthDeposit2','monthDeposit3','monthDeposit4','monthDeposit5','monthDeposit6','monthDeposit7','monthDeposit8','monthDeposit9','monthDeposit10','monthDeposit11','monthDeposit12','ManagementFeePerc','DailyResidualPerc','DeductCommissionsFrom','WithdrawalAmt'];
	var grayitems=['TotalPayback','TotalProfit','OfficeComm','RepComm','TotalCorpProfit','MonthlyBankDeposits', 'achPaybackMonths'];
	var i, o;
	for(i=0;i<blueitems.length;i++){
		o=el(blueitems[i]);
		if(!o) continue;
		o.className= o.className+' inpField';
		o.onchange=myOnChangeInputField;
		//alert(o.className);
	}
	for(i=0;i<grayitems.length;i++){
		o=el(grayitems[i]);
		if(!o) continue;
		o.className= o.className+' calcField';
		o.readOnly=true;
		//alert(o.className);
	}
	
	o=el('FundingProduct');
	if(o) o.onchange=function(){document.form1.submit()};
	myOnChangeInputField();
	
	
	var credMinItems=['cred1BorName','cred1BorLastName','cred1BorSSN','cred1CurAddress','cred1CurCity','cred1CurState','cred1CurZip','cred1BorSSN'];
	for(i=0;i<credMinItems.length;i++){
		o=el(credMinItems[i]);
		if(!o) continue;
		o.className= o.className+' inpMinimal';
	}
	

	o=el('Status');
	
	var savedStatus=getCtrlValue('Status');
	if(o){
		o.onchange=function(event){
			var err='';
			var errCL='';
			var s=getCtrlValue('Status');
			if(s=='Participation'||s=='Approved'||s=='Lender Debit'||s=='Merchant Credit'||s=='Agent Credit'
			||s=='Merchant Daily Debit'||s=='Lender Daily Credit'||s=='Completed'||s=='NSF Reject'){
				err='The CRM system will automatically change status of contract to Participation, Approved, and any of the ACH Billing status levels only after you add lenders to contract, add approval date, and add first daily ACH withdrawal date to the contract.';
			}
			
			if(savedStatus=='Lender Debit'||savedStatus=='Merchant Credit'||savedStatus=='Agent Credit'
			||savedStatus=='Merchant Daily Debit'||savedStatus=='Lender Daily Credit'||savedStatus=='Completed'||savedStatus=='NSF Reject'){
				err='You cannot change the status when this contract is active in the ACH Billing system';
			}
			 
			 //add tehila
			if(getCtrlValue('Status')=='Approved'&& !getCtrlValue('checkListDone')){
				errCL='The checkList is not complete!';
				}
				//end tehila
				
				
			if(err /*add tehila*/|| errCL/*end tehila*/){
				if (err) alert(err);
				/*add tehila*/
				if (errCL) alert (errCL);
				/*end tehila*/
				if(permittedSA && confirm('Allow Sysadmin user to change status manually?')){
				}else{
					setCtrlValue('Status',savedStatus);	
				}
			}
			
			myStatusChange2();			
		};
		myStatusChange2();
		//o.onchange();
	}


	o=el('InceptionDate');
	if(o) o.onchange=function(event){
		if(jsFundingProduct=='Fixed Daily ACH' || jsFundingProduct=='CCFixed'){
			var InceptionDate=getCtrlValue('InceptionDate');
	
			var s='';
			for(var i in approveValidationErr){
				s=s+ (s?', ':'')+ approveValidationErr[i];
			}

			if(InceptionDate && s){
				setCtrlValue('InceptionDate','');	
				alert('You cannot add an approval date until the following fields are completed:\n\n'+s);
			}
		}
		
		if(o.value && strToMoney(totalPerc)!=100.0){
			setCtrlValue('InceptionDate','');	
			alert('You cannot add Approval Date or First Withdrawal Date until you have added Syndicate Lender(s) to fund 100% of this contract.');
		}
		
	};


	o=el('achFirstWithdrawalDate');
	if(o) o.onchange=function(event){
			if(o.value && strToMoney(totalPerc)!=100.0){
				o.value='';
				el('f_achFirstWithdrawalDate_1').value='';
				alert('You cannot set-up the first ACH payment until you have added Syndicate Lender(s) to fund 100% of this contract.');
			}
			
			
	};



	
}


function myStatusChange2(){
			if(getCtrlValue('Status')=='Declined'){
					el('DeclineReason').disabled=false;
					el('DealLostReason').disabled=false;
			}else{
					el('DeclineReason').disabled=true;
					el('DealLostReason').disabled=true;
			}
			//tehila for task: substatus
			if(getCtrlValue('Status')=='Pre-Approved'){
					el('PreApprovedSubStatus').disabled=false;
			}else{
					el('PreApprovedSubStatus').disabled=true;
			}
			if(getCtrlValue('Status')=='Merchant Daily Debit'){
					el('PreDailyDebitSubStatus').disabled=false;
			}else{
					el('PreDailyDebitSubStatus').disabled=true;
			}
			if(getCtrlValue('Status')=='Contract IN'){
					el('PreContractINSubStatus').disabled=false;
			}else{
					el('PreContractINSubStatus').disabled=true;
			}
			if(getCtrlValue('Status')=='Underwriting'){
					el('PreUnderwritingSubStatus').disabled=false;
			}else{
					el('PreUnderwritingSubStatus').disabled=true;
			}
			//end
}

function myOnChangeInputField(){
	
	if(el('AmountRequested')){
		var AmountRequested= strToMoney(getCtrlValue('AmountRequested'));
	
		var TotalPayback = AmountRequested * strToMoney(getCtrlValue('FactorRate'));
		var TotalProfit  = TotalPayback - AmountRequested;
		if(getCtrlValue('DeductCommissionsFrom')=='FUNDING'){
			var OfficeComm = AmountRequested * strToMoney(getCtrlValue('OfficeCommPerc'))/100.0 ;
			var RepComm = AmountRequested * strToMoney(getCtrlValue('RepCommPerc'))/100.0 ;
		}else{
			var OfficeComm = TotalPayback * strToMoney(getCtrlValue('OfficeCommPerc'))/100.0 ;
			var RepComm = TotalPayback * strToMoney(getCtrlValue('RepCommPerc'))/100.0 ;
		}
		var TotalCorpProfit = TotalProfit - OfficeComm - RepComm;
		
		var aSum=0; var aCnt=0; var i; var a;
		for(i=1;i<=12;i++){
			a=strToMoney(getCtrlValue('monthDeposit'+i));
			if(a!=0){aSum+=a;aCnt++};
		}
		var MonthlyBankDeposits=aCnt? aSum/aCnt : 0;
		
		setCtrlValue('AmountRequested',formatCurrency(AmountRequested,''));
		setCtrlValue('TotalPayback',formatCurrency(TotalPayback,''));
		setCtrlValue('TotalProfit',formatCurrency(TotalProfit,''));
		setCtrlValue('OfficeComm',formatCurrency(OfficeComm,''));
		setCtrlValue('RepComm',formatCurrency(RepComm,''));
		setCtrlValue('TotalCorpProfit',formatCurrency(TotalCorpProfit,''));
		setCtrlValue('MonthlyBankDeposits',formatCurrency(MonthlyBankDeposits,''));
		
		if(getCtrlValue('FundingProduct')=='MCA'){
		}
		
		if(getCtrlValue('FundingProduct')=='Fixed Daily ACH' || getCtrlValue('FundingProduct')=='CCFixed'){
			var days= sDiv(TotalPayback,  strToMoney(getCtrlValue('WithdrawalAmt')));
			var days1=Math.ceil(days);
//			var days1=parseInt(getCtrlValue('achPaybackMonths'));
//			var WithdrawalAmt=sDiv(TotalPayback,  days1);
						
			var DailyResidualPerc=strToMoney(getCtrlValue('DailyResidualPerc'));
			var DailyResidualPercAmt=TotalPayback * DailyResidualPerc / 100;
			var DailyResidualPercAmtDaily= sDiv(DailyResidualPercAmt, days1);
			var ManagementFeePerc=strToMoney(getCtrlValue('ManagementFeePerc'));
			var ManagementFeePercAmt=TotalPayback * ManagementFeePerc / 100;
			var ManagementFeePercAmtDaily= sDiv(ManagementFeePercAmt , days1);
			
			
			
			//out
			setCtrlValue('achPaybackMonths',days1);
			//setCtrlValue('WithdrawalAmt',formatCurrency(WithdrawalAmt,'$'));
			el('spDailyRes').innerHTML= formatCurrency(DailyResidualPercAmt,'$') + ' / ' + formatCurrency(DailyResidualPercAmtDaily,'$') +' ('+days1+')' ; 
			el('spManFee').innerHTML= formatCurrency(ManagementFeePercAmt,'$') + ' / ' + formatCurrency(ManagementFeePercAmtDaily,'$') +' ('+days1+')' ;
		}
	}	
	
}

function myFormSubmit(f){
//	if(el('InceptionDate') && getCtrlValue('InceptionDate') && cntMissingDocs>0){
//		alert('You cannot add approval date for this merchant because '+cntMissingDocs+' required documentations are missing.');
//		return false;
//	}

	if(!el('DeclineReason').disabled && !getCtrlValue('DeclineReason')){
		alert('Underwriting Decline Reason Is Required');
		return false;
	}

	/*add tehila
	var err='';
	if(getCtrlValue('Status')=='Approved'&& !getCtrlValue('checkListDone')){
		err='The checkList is not complete!';
		}
	if (err){
	alert(err);
	if(permittedSA && confirm('Allow Sysadmin user to change status manually?'))
	{}
	else{
		setCtrlValue('Status',savedStatusCL);
		return false;	
		}
	}
	//end tehila*/
	myXXX_SaveBeep();
	return true;
}


function AddSyndClick(){
	var obj=el('newSynd[perc]');
	var val=obj.value*1;
//	alert(obj.value+','+syndTotalperc*1);
	if(val + syndTotalperc*1>100.0){
		alert('The funding '+val*1+'% you entered has exceeded the amount needed to fund this account.  Please select correct funding % ');
		obj.focus();
		return false;
	}		
	return true;
}


function checklistModified(name){
	//alert(name);
	setCtrlValue('checklist['+name+'][isModified]','1');
}


function mySendClick(cashadv_id,creditOptionsValid){
		if(creditOptionsValid){
	  		if(myCreditValidate() && confirm('Are you sure to send request?')){
				  document.form1.subcmd.value='postCredit';
				  myXXX_SaveBeep();
				  document.form1.submit();
				 //myRedirect('/creditreport.php?cmd=post&cashadv_id='+cashadv_id);
			}				 
		}else{
			alert('You do not have an account setup and activated with ACRAnet credit reporting company.  Please contact ACRAnet.com to setup a new account and add your new account info in the CRM\'s administrative setup/configuration section.');
		}

}

function myCreditValidate(){
	if(!getCtrlValue('cred1BorName')){alert('Borrower Name is Required'); return false;}
	if(!getCtrlValue('cred1BorLastName')){alert('Borrower Last Name is Required'); return false;}
	if(!getCtrlValue('cred1BorSSN')){alert('Borrower SSN is Required'); return false;}
	e=checkSSN(getCtrlValue('cred1BorSSN'),true);
	if (e){alert('Borrower SSN is Invalid'); return false;}
		
	return true;
}


function checkAllLenders(cb){
		var e=document.getElementsByName('selLender[]');
		for(i=0;i<e.length;i++) e[i].checked=cb.checked;;
}

var decTrackChange=false;
function decOnChange(trackChange){
		var decAmountRequested = strToMoney(getCtrlValue('decAmountRequested'));
		var decFactorRate = strToMoney(getCtrlValue('decFactorRate'));
		var decACHDays= strToMoney(getCtrlValue('decACHDays'));
		var decPaybackAmt=decAmountRequested*decFactorRate;
		var decDailyACH=sDiv(decPaybackAmt,decACHDays);
		setCtrlValue('decPaybackAmt',formatCurrency(decPaybackAmt,''));
		setCtrlValue('decDailyACH',formatCurrency(decDailyACH,''));
	
		
		var readonly=getCtrlValue('decSelection')=='2'?false:true;
		var fields=['decAmountRequested','decFactorRate','decACHDays'];
		for(var i in fields){
			if(o=el(fields[i])){
				o.readOnly=readonly;
				myRemoveClass(o,readonly?'inpField':'calcField');
				myAddClass(o,readonly?'calcField':'inpField');
			}
		}
		
		switch(getCtrlValue('decSelection')){
			case '1':
				el('trDecNotes').style.display='none';
				break;
			case '2':
				el('trDecNotes').style.display='';
				el('divDecNotesTitle1').style.display='';
				el('divDecNotesTitle2').style.display='none';
				break;
			case '3':
				el('trDecNotes').style.display='';
				el('divDecNotesTitle1').style.display='none';
				el('divDecNotesTitle2').style.display='';
				break;
		}
		

		if(trackChange) decTrackChange=true;	
}


function decSubmitResponse(){
	if(getCtrlValue('decSelection')=='2' && decTrackChange==false){
		alert('You must first make a change to the funding amount, factor rate, and/or # days of ACH withdrawal fields first before you can submit your response.');
		return;
	}
	
  myXXX_SaveBeep();
  document.form1.submit();
}



function selLenderClick(obj){
	//var a=getCtrlValue('selLender['+uid+']');
	//alert(obj.value+','+obj.checked);
	var uid=obj.value;
	el('trSelLender_'+uid).style.display=obj.checked?'':'none';
}



<?php 
        echo '</script';
        ?>
>
<style>
SPAN.spMCALoan{font-size:12pt;font-weight:bold;color:#3366cc;}
</style>




<form name="form1" method="post" enctype="multipart/form-data" onsubmit="return myFormSubmit(this)">
    <input type=hidden name="cashadv_id" value="<?php 
        echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
        ?>
">
    <input type=hidden name="app_id" value="<?php 
        echo $_smarty_tpl->tpl_vars['app_id']->value;
        ?>
">
    <input type=hidden name="tab" value="<?php 
        echo $_smarty_tpl->tpl_vars['tab']->value;
        ?>
">
    <input type=hidden name="cmd" value="cashadv_submit">
    <input type=hidden name="subcmd" value="">
	<!--add tehila-->
	<input type=hidden name="checkListDone" value="<?php 
        echo $_smarty_tpl->tpl_vars['checkListDone']->value;
        ?>
">
	<input type="hidden" name="jAttachments" />
	<!--end tehila-->

<?php 
        echo $_smarty_tpl->getSubTemplate('status/cashadv_header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('title' => 'MCA Application Summary'), 0);
        ?>




<div class="mySortable mca_dba">


<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

<div class="statBlock">

<div class="graySummary">Approved Funding $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['Lenders']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders'], 430);
                ?>
</em><?php 
            }
            ?>

<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['ApprovedFunding']);
            ?>
</a></div></div>

<div class="graySummary">Payback Amount $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['PaybackAmount']);
            ?>
</a></div></div>

<div class="graySummary">Total Paid Back $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['TotalPaidBack']);
            ?>
</a></div></div>

<div class="graySummary">PaidBack Balance Due$ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['PaybackBalance']);
            ?>
</a></div></div>

<div class="graySummary">Fixed Daily ACH Amount $ <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['FixedDailyACH']);
            ?>
</a></div></div>

<div class="graySummary">User Commissions $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['Users']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Users'], 430);
                ?>
</em><?php 
            }
            ?>
<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['UserCommissions']);
            ?>
</a></div></div>

<div class="graySummary">Additional User Commissions $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['UsersA']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['UsersA'], 430);
                ?>
</em><?php 
            }
            ?>
<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['AdditionalUserCommissions']);
            ?>
</a></div></div>

<div class="graySummary">Merchant Administrative & Underwriting Fees <div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=funding"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['MerchAdmFees']);
            ?>
</a></div></div>

<div class="graySummary">Lender One-Time Mgmt Fees $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['Lenders1']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders1'], 430);
                ?>
</em><?php 
            }
            ?>
<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=synd"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendOneTimeFee']);
            ?>
</a></div></div>

<div class="graySummary">Lender Daily Mgmt Fees $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['Lenders2']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders2'], 430);
                ?>
</em><?php 
            }
            ?>
<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=synd"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendDailyFee']);
            ?>
</a></div></div>

<div class="graySummary">Lender One-Time Admin Fees $ <?php 
            if ($_smarty_tpl->tpl_vars['stat']->value['Lenders3']) {
                ?>
<em><?php 
                echo smarty_modifier_cut($_smarty_tpl->tpl_vars['stat']->value['Lenders3'], 430);
                ?>
</em><?php 
            }
            ?>
<div class="toright"><a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
            echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
            ?>
&tab=synd"><?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['stat']->value['LendAdmFee']);
            ?>
</a></div></div>
</div>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('node' => "mca_dbasummarystat", 'title' => "Summary", 'class' => "box-one"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


   <!--add tehila -add note-->
<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

<table width="100%" >       
        <input type="hidden" name="cmd2" value="submit_note" />
        <input type="hidden" name="contact_id" value="<?php 
            echo $_smarty_tpl->tpl_vars['contact_id']->value;
            ?>
" />

<?php 
            if (permitted('ADMIN-RIGHTS')) {
                ?>
       <tr >
          <td align="center" class="tdValueColumn">
          
          <select name="note_vis">
          <?php 
                echo smarty_function_html_options(array('options' => $_smarty_tpl->tpl_vars['selVis']->value), $_smarty_tpl);
                ?>

          </select>
          
          </td>
        </tr>
<?php 
            }
            ?>
        
        
        <tr >
          <td align="center" class="tdValueColumn"><span class="nobr">
            <textarea name="note_text" rows="5" class="w_3_3"></textarea>
          </span></td>
        </tr>
      </table>
	<div class="footer"><input type="submit" name="btnAddNote" value="Submit Note" /></div>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('node' => "mcanotes_add", 'title' => "Add a Note", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>


<!--end tehila-->


<!--add tehila docs uplodeed-->
<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

    <table  border="0"  cellspacing="0" cellpadding="0" width="100%">
      <tr >
        <td colspan="5" class="tdValueColumn">

		<table class="tblMultipleUpload">
            <tr><td class="c1">
            <span class="fileinput-button" style=''>
                <input type="button" value="Upload Multiple Docs" class="std"> 
                <input id="fileupload" type="file" name="files[]" data-url="/uploader/server/" multiple>
            </span>
            </td>
            <td class="c2"><div id="progress" class="progressBar"><div class="bar"></div></div></td></tr>
            <tr>
              <td colspan="2" class="c3"><div id="uploadFilesList"></div></td>
            </tr>
        </table>
            
            
            </td>
      </tr>
     
    </table>
  <div class="footer">
	  <div class="toleft">
        <?php 
            if (permitted('ADMIN-RIGHTS')) {
                ?>
		<input type="button" value="Show All Docs" class="std" onclick="myRedirect('/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
                echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                ?>
&tab=userdoc')"> 
		<?php 
            }
            ?>
  
    </div>
        <?php 
            if (permitted('ADMIN-RIGHTS')) {
                ?>
            <input  type="submit" value="Save" />
        <?php 
            }
            ?>
  
    </div>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('node' => "mcadocs_docpwupl", 'title' => "Documents/Paperwork Uploaded", 'class' => "box-one box-blue"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>
 




<!--end tehila-->




<?php 
        $_smarty_tpl->tpl_vars['section'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['section']->_loop = false;
        $_smarty_tpl->tpl_vars['k_sec'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['sections']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['section']->key => $_smarty_tpl->tpl_vars['section']->value) {
            $_smarty_tpl->tpl_vars['section']->_loop = true;
            $_smarty_tpl->tpl_vars['k_sec']->value = $_smarty_tpl->tpl_vars['section']->key;
            ?>
        

<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color']));
            $_block_repeat = true;
            echo smarty_block_mybox(array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color']), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>



<?php 
                if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_STATUS') {
                    ?>
    
<TABLE width="100%" class="tblFields">
    <tr>
		<TD class="tdListHeaders">
		<div class="toleft">Required Docs for Underwriting: <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
&tab=checklist"><?php 
                    echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntTotal'], 2);
                    ?>
</a> Total  |  <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
&tab=checklist"><?php 
                    echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntReceived'], 2);
                    ?>
</a> Received | <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
&tab=checklist"><?php 
                    echo smarty_modifier_num($_smarty_tpl->tpl_vars['checklistStat']->value['cntMissing'], 2);
                    ?>
</a> Missing</div>
		<div class="toright"><a href="javascript:;" onclick="showPopUp('/cashadvance.php?cmd=checklist_required_popup&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
',700,600);">View All Req'd Docs</a> 
        | <a href="/cashadvance.php?cmd=cashadv_edit&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
&tab=checklist">Manage</a></div>

					</TD>
	</tr>	
</TABLE>    
<?php 
                }
                ?>




	
	<?php 
                if ($_smarty_tpl->tpl_vars['section']->value['type'] == 'fields') {
                    ?>
    
	<div>
    	<?php 
                    echo $_smarty_tpl->tpl_vars['section']->value['html'];
                    ?>
		
    </div>
<?php 
                }
                ?>

 

<?php 
                if ($_smarty_tpl->tpl_vars['section']->value['type'] == 'lead') {
                    $_smarty_tpl->tpl_vars['leadsec'] = new Smarty_variable($_smarty_tpl->tpl_vars['section']->value['leadSection'], null, 0);
                    ?>
	<table width="100%">
    <TR colspan="3"  id="tr_lead_section_body_<?php 
                    echo $_smarty_tpl->tpl_vars['leadsec']->value['section_code'];
                    ?>
">
      <TD>
	  
	    <div class="boxHolder">
		<?php 
                    $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
                    $_smarty_tpl->tpl_vars['item']->_loop = false;
                    $_from = $_smarty_tpl->tpl_vars['leadsec']->value['list'];
                    if (!is_array($_from) && !is_object($_from)) {
                        settype($_from, 'array');
                    }
                    foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                        $_smarty_tpl->tpl_vars['item']->_loop = true;
                        ?>
			<?php 
                        if ($_smarty_tpl->tpl_vars['item']->value['cellHTML']) {
                            ?>
				<?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['cellHTML'];
                            ?>

			<?php 
                        } else {
                            ?>
				
            	<div class="box_<?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['size'];
                            ?>
_<?php 
                            echo $_smarty_tpl->tpl_vars['leadsec']->value['numCol'];
                            ?>
">
          		<?php 
                            echo $_smarty_tpl->tpl_vars['item']->value['html'];
                            ?>

		    	</div>	
			<?php 
                        }
                        ?>
	
		<?php 
                    }
                    ?>
        
		</div>

	  </TD>
	</TR>
    </table>
<?php 
                }
                ?>


	<div class="footer">
		<?php 
                if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_STATUS') {
                    ?>
		<div class="toleft">
      <a href="javascript:;" onclick="if(confirm('You have chosen to close out Contract # <?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_idStr']->value;
                    echo $_smarty_tpl->tpl_vars['cashadv_idModifier']->value;
                    ?>
,  with an active payback balance of $<?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2);
                    ?>
 still outstanding.  The MCA system will create a new contract and apply the balance of $<?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2);
                    ?>
 to this new contract.  When the Renewal Contract is ready to deposit the approved funding amount to the merchant, the outstanding balance of $<?php 
                    echo smarty_modifier_money($_smarty_tpl->tpl_vars['Balance']->value, 2);
                    ?>
 will be deducted from the funding amount to be deposited to the merchants bank account to close out the old contract.\n\nThe old contract status will remain in its current ACH billing status until the new renewal contract status has changed to \'Approved\'. When the new contract status is \'Approved\', the old contract will close with a status of \'Completed\'.\n\nAre you sure you want to proceed?')) myRedirect('/cashadvance.php?cmd=do_renew&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
')" title="Renew Contract">Renew</a>
		|


      <a href="javascript:;" onclick="if(confirm('You have chosen to duplicate Contract # <?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_idStr']->value;
                    echo $_smarty_tpl->tpl_vars['cashadv_idModifier']->value;
                    ?>
.  The MCA system will create a new contract. \n\nAre you sure you want to proceed?')) myRedirect('/cashadvance.php?cmd=do_clone&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
')">Duplicate</a>
		|


	  <a href="/cashadvance.php?cmd=manpay&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
"   >Early Payoff</a>
        </div>
        
        
	  <a href="javascript:;" onclick="emailACHBalanceClick()"  title="Email ACH Balance Report to Client" >Email ACH Report</a>
		|

	  <a href="javascript:;" onclick="emailACHCCClick()"   title="Email CC Batch Balance Report to Client">Email CC Report</a>
		|
        
        
        <?php 
                }
                ?>
  




		<?php 
                if ($_smarty_tpl->tpl_vars['section']->value['section_code'] == 'DBA_INFO') {
                    ?>
        	<a href="javascript:;" 
		onclick="showPopUp('/dymo/popup.php?type=mca&id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
',700,700)">Print Dymo Label</a>     
        |
        
        
        <?php 
                }
                ?>
        
      
      <?php 
                if ($_smarty_tpl->tpl_vars['section']->value['isEdit']) {
                    ?>
		
      	<a href="javascript:;" onclick="if(myFormSubmit(document.form1)) document.form1.submit()">Save</a>
      <?php 
                } else {
                    ?>
      	
			<a href="javascript:;" 
          onclick="document.location.href='/cashadvance.php?cmd=cashadv_edit&app_id=<?php 
                    echo $_smarty_tpl->tpl_vars['app_id']->value;
                    ?>
&cashadv_id=<?php 
                    echo $_smarty_tpl->tpl_vars['cashadv_id']->value;
                    ?>
&tab=dba&mode=edit'">Edit</a>
      <?php 
                }
                ?>
      
	</div>
<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_mybox(array('node' => "mcadba_" . (string) $_smarty_tpl->tpl_vars['section']->value['section_code'], 'title' => $_smarty_tpl->tpl_vars['section']->value['title'], 'class' => "box-one box-" . (string) $_smarty_tpl->tpl_vars['section']->value['color']), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>





<?php 
        }
        ?>

<?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

<table width="100%">
    <tr>
	<td class="tdListHeaders">User Name</td>
	<td class="tdListHeaders">User Type</td>
	<td class="tdListHeaders">Email</td>
	<td class="tdListHeaders">Phone</td>
    </tr>
  	<?php 
            $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['item']->_loop = false;
            $_from = $_smarty_tpl->tpl_vars['leadusers']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
                $_smarty_tpl->tpl_vars['item']->_loop = true;
                ?>
    <tr>
	<td class="tdValueColumn"><a href="/user.php?cmd=edit_user&uid=<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['uid'];
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['name'];
                ?>
</a></td>
	<td class="tdValueColumn"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['type'];
                ?>
</td>
	<td class="tdValueColumn"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['phone'];
                ?>
 <?php 
                echo smarty_function_my_call(array('phone' => $_smarty_tpl->tpl_vars['item']->value['phone']), $_smarty_tpl);
                ?>
</td>
	<td class="tdValueColumn"><a href="mailto:<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['email'];
                ?>
"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['email'];
                ?>
</a></td>
    </tr>
    <?php 
            }
            ?>
  </table>
<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('node' => "cashadv_dba_leadusers", 'title' => "Users Involved in this MCA Contract (from Lead to MCA Contract Boarding)", 'class' => "box-one"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>




</div>
<?php 
        echo '<script';
        ?>
>mybox_sortableInit('.mySortable.mca_dba');<?php 
        echo '</script';
        ?>
>


</form>


<?php 
        echo '<script';
        ?>
 language="javascript">myInit();
<?php 
        echo '</script';
        ?>
>
<?php 
    }
    function content_5778af89d2bdf7_71019060($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_function_query_string')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.query_string.php';
        }
        echo smarty_function_js_include(array('src' => '/css/pager.css'), $_smarty_tpl);
        ?>




  <ul class="paginate pag2 clearfix">

  
  
	<?php 
        if ($_smarty_tpl->tpl_vars['pager']->value['prevPage']) {
            ?>
 		<li><a href="?<?php 
            echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'page' => 1), $_smarty_tpl);
            ?>
" class="act">Start</a></li>
  		<li><a href="?<?php 
            echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'page' => $_smarty_tpl->tpl_vars['pager']->value['prevPage']), $_smarty_tpl);
            ?>
" class="act">Prev</a></li>
  	<?php 
        } else {
            ?>
 		<li><a href="javascript:;" class="dis">Start</a></li>
  		<li><a href="javascript:;" class="dis">Prev</a></li>
  	<?php 
        }
        ?>
  	
  		<li class="single numrows">(<?php 
        echo $_smarty_tpl->tpl_vars['pager']->value['from'];
        ?>
 - <?php 
        echo $_smarty_tpl->tpl_vars['pager']->value['to'];
        ?>
 of <?php 
        echo $_smarty_tpl->tpl_vars['pager']->value['totalRows'];
        ?>
)</li>
  
  	<?php 
        if ($_smarty_tpl->tpl_vars['pager']->value['nextPage']) {
            ?>
 
  		<li><a href="?<?php 
            echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'page' => $_smarty_tpl->tpl_vars['pager']->value['nextPage']), $_smarty_tpl);
            ?>
" class="act">Next</a></li>
  		<li><a href="?<?php 
            echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'page' => $_smarty_tpl->tpl_vars['pager']->value['totalPages']), $_smarty_tpl);
            ?>
" class="act">End</a></li>
  <?php 
        } else {
            ?>
 
  		<li><a href="javascript:;" class="dis">Next</a></li>
  		<li><a href="javascript:;" class="dis">End</a></li>
  <?php 
        }
        ?>
 
  

        <li class="single"></li>


  <li><a href="?<?php 
        echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'perPage' => 25), $_smarty_tpl);
        ?>
">25</a></li>
  <li><a href="?<?php 
        echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'perPage' => 50), $_smarty_tpl);
        ?>
">50</a></li>
  <li><a href="?<?php 
        echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'perPage' => 100), $_smarty_tpl);
        ?>
">100</a></li>
  <li><a href="?<?php 
        echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'perPage' => 500), $_smarty_tpl);
        ?>
">500</a></li>
  <?php 
        if ($_smarty_tpl->tpl_vars['pager']->value['totalRows'] > $_smarty_tpl->tpl_vars['pager']->value['displayRows']) {
            ?>
  	<li><a href="?<?php 
            echo smarty_function_query_string(array('listId' => $_smarty_tpl->tpl_vars['pager']->value['listId'], 'perPage' => 'ALL'), $_smarty_tpl);
            ?>
" onclick="return confirm('If you choose to view ALL records on the same page, it could take up to 1 minute for the page to load.  For faster performance, we recommend viewing 500 records at a time.  Do you still want to proceed?')">All</a></li>
  <?php 
        } else {
            ?>
 
  	<li><a href="javascript:;" class="dis">All</a></li> 
  <?php 
        }
        ?>
  
  </ul>


<?php 
    }
    function content_5778b6e574ef07_40190296($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php';
        }
        echo $_smarty_tpl->getSubTemplate('calendar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/controls/date.js'), $_smarty_tpl);
        ?>


<?php 
        if (!$_smarty_tpl->tpl_vars['format']->value) {
            $_smarty_tpl->tpl_vars['format'] = new Smarty_variable('%B %d, %Y', null, 0);
        }
        ?>
<input 
	<?php 
        if (!$_smarty_tpl->tpl_vars['editable']->value) {
            ?>
	readonly <?php 
        }
        ?>
	
	id="f_<?php 
        echo $_smarty_tpl->tpl_vars['name']->value;
        ?>
_1" type="text" 
	 value="<?php 
        echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['value']->value, $_smarty_tpl->tpl_vars['format']->value);
        ?>
" 
	maxlength="10" title="Click to change date" 
	style="width:<?php 
        echo ($tmp = @$_smarty_tpl->tpl_vars['width']->value) === null || $tmp === '' ? '100%' : $tmp;
        ?>
"
	<?php 
        if (!$_smarty_tpl->tpl_vars['disabled']->value) {
            ?>
	onchange="dateCtrlOnchange('<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
');<?php 
            echo $_smarty_tpl->tpl_vars['onchange']->value;
            ?>
"
	<?php 
        }
        ?>
	/>
	<?php 
        if (!$_smarty_tpl->tpl_vars['disabled']->value) {
            ?>
<input name="<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
" type="hidden"  value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value;
            ?>
" />
<?php 
            echo '<script';
            ?>
 type="text/javascript">
    Calendar.setup({
        inputField     :    "f_<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
_1",      
        ifFormat       :    "<?php 
            echo $_smarty_tpl->tpl_vars['format']->value;
            ?>
",
        showsTime      :    false,
        button         :    "f_<?php 
            echo $_smarty_tpl->tpl_vars['name']->value;
            ?>
_1",
        singleClick    :    true,
        step           :    1
    });
<?php 
            echo '</script';
            ?>
>
	<?php 
        }
        ?>
	<?php 
    }
    function content_5778af75b80ee4_55191464($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_block_m')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.m.php';
        }
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<?php 
        echo '<script';
        ?>
 type="text/javascript" src="/js/init.js"><?php 
        echo '</script';
        ?>
>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<TITLE><?php 
        echo $_smarty_tpl->tpl_vars['PAGETITLE']->value;
        ?>
</TITLE>
<?php 
        echo smarty_function_js_include(array('src' => '/css/style.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/corp/style_c.css'), $_smarty_tpl);
        ?>


<?php 
        echo smarty_function_js_include(array('src' => '/js/functions.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-1.9.1.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('startup.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>



<?php 
        echo smarty_function_js_include(array('src' => '/corp/favicon.ico'), $_smarty_tpl);
        ?>


<style>
#LoginButton a:hover img{
	filter: alpha(opacity:70);opacity: 0.7;moz-opacity : 0.7; khtml-opacity : 0.7;
}
#UserName, #Password, #TOS, #LoginButton, #PasswordReset{
	margin-bottom:10px;
}

#LoginButton img{width:127px;height:25px;}

input#loginid, input#password{
	font-size:12pt;
	width:123px;
}

#IPAddress{border-top:solid #999999 1px;padding-top:5px}

</style>
<?php 
        echo '<script';
        ?>
 language="javascript">
function loginClick(){
	if(el('cbAgree') && !el('cbAgree').checked){
		alert('You must agree to TOS first');
		return false;
	}
	document.loginForm.submit();
}
<?php 
        echo '</script';
        ?>
>

<?php 
        echo $_smarty_tpl->getSubTemplate('BodyOnLoad.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<div id="mostOuterDiv">

<table id="mostOuterTable" cellpadding="0" cellspacing="0" border="0">
  
<tr>
  <td>
<DIV class="header2">
<table class="topLinksBar" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
	<td align="left"> CRM Merchant Management Software<a href="/logout.php"></a></td>
	<td align="right">     Leads. Sales. Profits. Success.	 	</td>
	</tr></table>
</DIV>


</td>
</tr>  
  
  
<tr>
	<td>
<div class="divOuterTable">
<TABLE  BORDER=0 CELLSPACING=0 CELLPADDING=0  width="100%">
<?php 
        if (permitted('confShowLogo')) {
            ?>
  <TR valign="top" ALIGN=LEFT>
    <TD style='padding:0px' >
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div align="center"><a href="/home.php"><img class="block" style='' src="/corp/<?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['logo_fname'];
            ?>
" border=0 id="Picture46"></a></div></td>
          </tr>
      </table>
    </TD>
  </TR>
<?php 
        }
        ?>
  
  
  
  
  
  <TR valign="top" ALIGN=LEFT>
    <TD >          
    <DIV id="toplinkscontainer">
    <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
        $_block_repeat = true;
        echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>
Welcome to<?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>
 <?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_DESC'];
        ?>
 
	</DIV>
</TD>
  </TR>
  
  
  <TR valign="top" ALIGN=LEFT> 
    <TD >
      <div align="center">	
    <TABLE class="page_2colTbl" cellspacing="0">
                <col class="pagecol_col1" />
              	<col class="pagecol_col2" />
              	<col class="pagecol_col3" />

        <TR> 
          <TD class="page_col1"> 
          	
            <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('title' => "User Login", 'node' => '', 'class' => "box-gray"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('title' => "User Login", 'node' => '', 'class' => "box-gray"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

          
            <TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
              <TR> 
                <TD ALIGN="CENTER"> 
                  <TABLE ID="Table6" BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
                    <FORM NAME="loginForm" action="/login.php" METHOD=POST>
                      <COLGROUP>
                        <COL WIDTH="100%">
                        </COLGROUP>
                      <TR> 
                        <TD WIDTH="100%" align="center" STYLE="padding: 5px;"> 
                          <div id="UserName">
                            <div class="fldTitle">User Name</div>
                            <input id="loginid" type="text" name="loginid" value="<?php 
            echo $_smarty_tpl->tpl_vars['username']->value;
            ?>
" size=16 maxlength=50>
                            </div>
                          
                          <div id="Password">
                            <div class="fldTitle">Password</div>						  
                            <input id="password" type="password" name="password" autocomplete="on" value="" size=16 
                            onkeyup="if(event.keyCode==13) this.form.submit()"
                            > 
                            </div>	
                          
                          <?php 
            if (!$_smarty_tpl->tpl_vars['loginoptHideTOS']->value) {
                ?>
                          <div id="TOS">
                            <span class="alike"><input type="checkbox" name="cbAgree" id="cbAgree" onClick="el('fLogin').disabled=!this.checked"></span>
                            <a href="javascript:void(0);" onClick="myFooterPopup('footerTerms');return false;">Agree to TOS</a>
                            </div>
                          <?php 
            }
            ?>
					
                          
                          <div id="LoginButton">
                          
                          
                          <input type="button" value="Login" onclick="loginClick()" />
                          <div>
                          
                          <?php 
            if (!$_smarty_tpl->tpl_vars['loginoptHidePwdreset']->value) {
                ?>
                          <div id="PasswordReset">
                            <a href="#" onClick="document.getElementById('pwdreminderTbl').style.display='';return false"><?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
                $_block_repeat = true;
                echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>
Forgot  Password?<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>
</a>
                            </div>
                          <?php 
            }
            ?>
                        
                          
                          </TD>
                        </TR>
                      </FORM>
                    </TABLE>
                  </TD>
                </TR>
              </TABLE>
            
            <TABLE ID="pwdreminderTbl" style='display:none' BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
              <FORM NAME="LAYOUTFORM" action="/login.php" METHOD=POST>
                <COLGROUP>
                  <COL WIDTH="100%">
                  </COLGROUP>
                <TR>
                  <TD WIDTH="100%" STYLE="padding: 5px;">
                    <P STYLE="text-align: center;"><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
            $_block_repeat = true;
            echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Username or Email<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
</P>
                    </TD>
                  </TR>
                <TR>
                  <TD WIDTH="100%" align="center" STYLE="padding: 5px;">
                    <SPAN class="xx-small">
                      <input id="loginid" type="text" name="RecoverString" value="" size=16 maxlength=50>
                      </SPAN>                  </TD>
                  </TR>
                
                <TR>
                  <TD WIDTH="100%" HEIGHT=34 align="center" valign="middle" STYLE="padding: 5px;">
                    <input type="submit" name="RequestPwdButton" value="<?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
            $_block_repeat = true;
            echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Request<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
" >
                    </TD>
                  </TR>
                </FORM>
              </TABLE>
            
            <div id="IPAddress" align="center"><span class="alike"><?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
            $_block_repeat = true;
            echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Your IP Address is:<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
<br><?php 
            echo $_smarty_tpl->tpl_vars['CurrentIP']->value;
            ?>
</span><br />
              <br />
              </div>
            
            
            <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('title' => "User Login", 'node' => '', 'class' => "box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

            
            
            <?php 
        if ($_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']) {
            ?>
            <div style='text-align:center;padding-top:8px;'>
              <a href="<?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK'];
            ?>
" target="_blank"><img src="/corp/ssl_image.gif" border="0"></a>
              </div>
            <?php 
        }
        ?>
			
            
            <?php 
        if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode']) {
            ?>
            <div style='text-align:center;padding-top:8px;'>
              <?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode'];
            ?>

              </div>
            <?php 
        }
        ?>
            
            
            <?php 
        if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode']) {
            ?>
            <div style='text-align:center;padding-top:8px;'>
              <?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode'];
            ?>

              </div>
            <?php 
        }
        ?>
            
            
            </TD>
            
            
            
          <TD class="page_col2" > 
            
           	
                <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('title' => "Welcome", 'node' => '', 'class' => "box-gray"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('title' => "Welcome", 'node' => '', 'class' => "box-gray"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

                    <div style="padding:8px;font-family: Verdana; font-size: 10pt;">
                    
                    <?php 
            if ($_smarty_tpl->tpl_vars['disableLogin']->value) {
                ?>
                    	<div style='color:red;border:red dashed 1px;padding:4px'>
                    		Our CRM system is down for maintenance and will be available soon.  We are sorry for the inconvenience.  Please contact us if you have any questions.
                        </div>
                    <?php 
            } else {
                ?>
                    <SPAN ><?php 
                echo $_smarty_tpl->tpl_vars['LoginPageText']->value;
                ?>
</SPAN>
                    <?php 
            }
            ?>
                    
                    </div>
                <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('title' => "Welcome", 'node' => '', 'class' => "box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>

            
            </TD>
            
            <td class="page_col3">
            	<?php 
        echo $_smarty_tpl->getSubTemplate("box_datetime.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

            </td>
          </TR>
        </TABLE>
        </div>
    </TD>
    </TR>
  
</TABLE>
</div>


</td>
</tr>
<tr>
  <td><DIV class="footer3">
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['CopyrightText'];
        ?>
</div>
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['PoweredBy'];
        ?>
</div>
</DIV>

<DIV class="footer4">
				  <?php 
        echo $_smarty_tpl->getSubTemplate('footerLinksDiv.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</DIV>

</td>
</tr>
</table>


</div>
<?php 
        echo $_smarty_tpl->tpl_vars['speakpipeCode']->value;
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['olarkCode']->value;
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['phpliveCode']->value;
        ?>

<?php 
        echo $_smarty_tpl->tpl_vars['custom_body_end_html']->value;
        ?>

</BODY>
</HTML><?php 
    }
    function content_5778b6e5e4af82_49546527($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        echo smarty_function_js_include(array('src' => '/css/g_tabs.css'), $_smarty_tpl);
        ?>


<div align="center" class="gdhp-main-table" style='text-align:center'>

<div style='display:inline-block'>
<ul  class="g-tabs">
	<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['gtabs']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            ?>
    <li 
    	<?php 
            if (!$_smarty_tpl->tpl_vars['item']->value['isLocked']) {
                ?>
 onClick="window.location.href='<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['url'];
                ?>
'" <?php 
            }
            ?>
 
    	<?php 
            if ($_smarty_tpl->tpl_vars['item']->value['tooltip']) {
                ?>
 onmouseover="tooltip.show('<div style=\'max-width:300px\' class=\'wrap\'><?php 
                echo htmlspecialchars(strtr($_smarty_tpl->tpl_vars['item']->value['tooltip'], array("\\" => "\\\\", "'" => "\\'", "\"" => "\\\"", "\r" => "\\r", "\n" => "\\n", "</" => "<\\/")), ENT_QUOTES, 'UTF-8', true);
                ?>
</div>')" onmouseout="tooltip.hide()" <?php 
            }
            ?>
 
    	class="<?php 
            if ($_smarty_tpl->tpl_vars['item']->value['isActive']) {
                ?>
g-tab-active<?php 
            }
            ?>
 <?php 
            if ($_smarty_tpl->tpl_vars['item']->value['isLocked']) {
                ?>
g-tab-locked<?php 
            }
            ?>
 <?php 
            if ($_smarty_tpl->tpl_vars['item']->value['isCompleted']) {
                ?>
g-tab-completed<?php 
            }
            ?>
 <?php 
            if ($_smarty_tpl->tpl_vars['item']->value['colorClass']) {
                ?>
g-tab-<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['colorClass'];
            }
            ?>
" >
	<span style="<?php 
            if ($_smarty_tpl->tpl_vars['item']->value['tabwidth']) {
                ?>
width:<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['tabwidth'];
                ?>
;<?php 
            }
            ?>
">
		<?php 
            echo $_smarty_tpl->tpl_vars['item']->value['title'];
            ?>

		<?php 
            if (isset($_smarty_tpl->tpl_vars['item']->value['cnt'])) {
                ?>
(<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['cnt'];
                ?>
)<?php 
            }
            ?>
	</span>	
	</li>
	<?php 
        }
        ?>
  </ul>
</div>

</div>


<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['gtabs']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            if ($_smarty_tpl->tpl_vars['item']->value['isActive'] && $_smarty_tpl->tpl_vars['item']->value['links']) {
                ?>
<div style='margin-top:4px;margin-bottom:-4px;'>
<?php 
                echo $_smarty_tpl->getSubTemplate('tab_links.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('tab_links' => $_smarty_tpl->tpl_vars['item']->value['links']), 0);
                ?>

</div>

<?php 
            }
        }
        ?>

<?php 
    }
    function content_5778af8a1aae99_91151934($_smarty_tpl)
    {
        if (!is_callable('smarty_function_func')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.func.php';
        }
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_modifier_money')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.money.php';
        }
        if (!is_callable('smarty_block_m')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.m.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date_format.php';
        }
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        if (!is_callable('smarty_modifier_date')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/modifier.date.php';
        }
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<HEAD>
<?php 
        echo '<script';
        ?>
 type="text/javascript" src="/js/init.js"><?php 
        echo '</script';
        ?>
>
<?php 
        echo smarty_function_func(array('name' => 'TplData', 'var' => 'tpldata'), $_smarty_tpl);
        ?>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<TITLE><?php 
        echo $_smarty_tpl->tpl_vars['PAGETITLE']->value;
        ?>
</TITLE>
<?php 
        echo smarty_function_js_include(array('src' => '/css/style.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/corp/style_c.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/tpl_page_template.css'), $_smarty_tpl);
        ?>


<style>
<?php 
        if (!permitted('ADMIN-RIGHTS')) {
            ?>
  .AdminOnlyVisibility {display:none}
<?php 
        }
        ?>

</style>

<style>



</style>






<?php 
        echo smarty_function_js_include(array('src' => '/js/functions.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/main.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-1.9.1.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.min.js'), $_smarty_tpl);
        ?>


<?php 
        echo smarty_function_js_include(array('src' => '/js/bubble.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/nav.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/mybox.js'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('startup.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>





<?php 
        echo '<script';
        ?>
 language="javascript">
function openViewMerchantApp(){
if(confirm('This Customer App Link is for Customers use only.  If you are a user, and want to submit an Online Customer App to the corporate office, please go to the "Submit Online App" link'))
 	window.open('/merchant.php?agent_id=<?php 
        echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid'];
        ?>
');
}
<?php 
        echo '</script';
        ?>
>
<?php 
        echo smarty_function_js_include(array('src' => '/corp/favicon.ico'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('BodyOnLoad.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>



<?php 
        echo '<script';
        ?>
>
$(document).ready(function(){

	mybox_sortableNavInit();

	var flagSearch=false;
	$('#mainSearch')
		.val('search dba or legal business name...')
		.focus(function(){
			if(flagSearch==false){
				flagSearch=true;
				this.value='';
			}
		});
	$('#mainSearchBtn').click(function(){
		if(flagSearch){
			return true;
		}else{
			return false;
		}
	});
	
});
<?php 
        echo '</script';
        ?>
>


</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>






<div id="page_template">    
<table id="xmostOuterTable" cellpadding="0" cellspacing="0" border="0" width="100%" >
  
<tr>
  <td>
<DIV class="header2">

			

		  <div class="search-bar">
            <form method="get" action="/mainsearch.php">
		    <input type="text" class="search-field" value="" id="mainSearch" name="q" />
	    	<button type="submit" class="search-button" id="mainSearchBtn"><span class="button-content"></span></button>
			</form>
		  </div>


		<div class="toleft">
			<a href="/home.php">Welcome <strong><?php 
        echo $_smarty_tpl->tpl_vars['LoginInfo']->value['FullName'];
        ?>
</strong></a> 
	  		<?php 
        if (permitted('USERS-MyAccount')) {
            ?>
            	| <a href="/user.php?cmd=edit_user&uid=<?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid'];
            ?>
">My Account</a>
            <?php 
        }
        ?>
 
	  		| <a href="/logout.php">Log Out</a>
        </div>
		<div class="toright">
		  
		  <a href="/support/?tab=manual">Help</a>


		  <?php 
        if (permitted('TOPMENU-Support')) {
            ?>
	
		  	| <a href="/support.php">Support</a>
		  <?php 
        }
        ?>
	
	  
		  <?php 
        if (permitted('SUPPORT-About')) {
            ?>
		  	| <a href="javascript:;" onclick="showPopUp('/site_config.php?cmd=show&code=aboutus',700,700)">About</a>
		  <?php 
        }
        ?>
	  
		  <?php 
        if (permitted('SUPPORT-Contact')) {
            ?>
		    | <a href="javascript:;" onclick="showPopUp('/site_config.php?cmd=show&code=contactus',700,700)">Contact</a>
		  <?php 
        }
        ?>
	 	



		  <?php 
        if (permitted('confShowLogo')) {
            ?>
			|
		  	<a href="/home.php?cmd=hidelogo">Hide Logo</a>
		  <?php 
        } else {
            ?>
          	|
		  	<a href="/home.php?cmd=showlogo">View Logo</a>
		  <?php 
        }
        ?>
	


        </div>
    
</DIV>

</td>
</tr>  
  
  
<tr>
	<td>
    
<div class="divOuterTable">
    <TABLE  BORDER=0  CELLSPACING="0" CELLPADDING="0" width="100%">
      
      <?php 
        if (permitted('confShowLogo')) {
            ?>
<tr>
        <td >
        <div align="center">
        <a href="/home.php"><img class="block" style="max-width:840px;max-height:113px" src="/corp/<?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['logo_fname'];
            ?>
" border="0"></a>
        </div>
        </td>

        </tr>		
      <?php 
        }
        ?>
	
      
      <TR >
        <TD>
          <DIV id="tabcontainer">
            <?php 
        echo $_smarty_tpl->getSubTemplate('menu_bar.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

          </DIV>
          </TD>
      </TR>
      
      <TR >
        <TD>
          <DIV id="toplinkscontainer">
				<?php 
        $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('', null, 0);
        ?>

                <?php 
        if (permitted('ONLINEAPPS-AgentApp')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.location.href='/app_manager.php?cmd=add_app&app_id=NEW'">Add Account</a>
                <?php 
        }
        ?>
	

                <?php 
        if (permitted('ONLINEAPPS-AddLead')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.location.href='/leads.php?cmd=add_lead'">Add Lead</a>
                <?php 
        }
        ?>
	
    
                <?php 
        if (permitted('ONLINEAPPS-SubmitNewRef')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.open('/referral_merch.php?agent_id=<?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['uid'];
            ?>
')">Add Referral</a>
                <?php 
        }
        ?>
	


                <?php 
        if (permitted('ONLINEAPPS-ShopCart')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.open('/shoppingcart/')">Shop Cart</a>
                <?php 
        }
        ?>
	


                <?php 
        if (permitted('ONLINEAPPS-PerfChart')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.open('/piechart/')">Perf Charts</a>
                <?php 
        }
        ?>
	
    
                <?php 
        if (permitted('ONLINEAPPS-EmailInbox')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.open('/mailbox.php?cmd=inbox&mailboxfolder=inbox')">Email (<?php 
            echo $_smarty_tpl->tpl_vars['tpldata']->value['cntMails'];
            ?>
)</a>
                <?php 
        }
        ?>
	

                <?php 
        if (permitted('ONLINEAPPS-Calendar')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.open('/calendar.php?cmd=month')">Calendar</a>
                <?php 
        }
        ?>
	


                <?php 
        if (permitted('ONLINEAPPS-Search')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="window.location.href='/search.php'">Search Acct & Leads</a>
                <?php 
        }
        ?>
	
    
                <?php 
        if (permitted('ONLINEAPPS-MerchantApp')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onClick="openViewMerchantApp()">Web Apps</a>
                <?php 
        }
        ?>
	
    
                <?php 
        if (permitted('ONLINEAPPS-Tickets')) {
            ?>
					<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onclick="window.location.href='/tickets.php?cmd=list'">Tickets (<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['tpldata']->value['openTickets'], 0);
            ?>
)</a>
                <?php 
        }
        ?>
	
                
                <?php 
        if (permitted('ONLINEAPPS-News')) {
            ?>
    				<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onclick="window.location.href='/news.php?cmd=view_news'">Unread News (<?php 
            echo smarty_modifier_money($_smarty_tpl->tpl_vars['tpldata']->value['unreadNews'], 0);
            ?>
)</a>
                <?php 
        }
        ?>
	
                
                <?php 
        if (permitted('ONLINEAPPS-Projects')) {
            ?>
    				<?php 
            echo $_smarty_tpl->tpl_vars['s']->value;
            $_smarty_tpl->tpl_vars['s'] = new Smarty_variable('-', null, 0);
            ?>
	                <a href="javascript:;" onclick="window.location.href='/projectboard'">Projects</a>
                <?php 
        }
        ?>
	


			
          </DIV>
          </TD>
      </TR>
      
      <?php 
        if (permitted('confShowLoginInfo')) {
            ?>
      <TR >
        <TD  ><TABLE class="BlueBar" WIDTH="100%" >
          <TR> 
            <TD  ><?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_DESC'];
            ?>
<BR>
              <?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_ISO'];
            ?>
<BR>
              <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
            $_block_repeat = true;
            echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
User Support<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
: <?php 
            echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SUPPORT'];
            ?>
</TD>
            <TD  valign="top"> <P title="Login time: <?php 
            echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['LoginInfo']->value['login_time'], '%x %X');
            ?>
" STYLE="text-align: right;">
              <?php 
            $_smarty_tpl->smarty->_tag_stack[] = array('m', array());
            $_block_repeat = true;
            echo smarty_block_m(array(), null, $_smarty_tpl, $_block_repeat);
            while ($_block_repeat) {
                ob_start();
                ?>
Logged
              in as User ID<?php 
                $_block_content = ob_get_clean();
                $_block_repeat = false;
                echo smarty_block_m(array(), $_block_content, $_smarty_tpl, $_block_repeat);
            }
            array_pop($_smarty_tpl->smarty->_tag_stack);
            ?>
 "<?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['UserName'];
            ?>
" <?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['UserType'];
            ?>
<br>
              <?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['BusinessName'];
            ?>
<br>
              <?php 
            echo $_smarty_tpl->tpl_vars['LoginInfo']->value['FullName'];
            ?>
                 <BR>
              </P></TD>
            </TR>
          </TABLE></TD>
        </TR>
      <?php 
        }
        ?>
		  
      <TR >
        <TD>
		  <div align="center">		
          <?php 
        if ($_smarty_tpl->tpl_vars['contentsWide']->value) {
            ?>
          	<div style="padding-top:12px;">
            <?php 
            echo $_smarty_tpl->tpl_vars['contentsWide']->value;
            ?>

            </div>
          <?php 
        } else {
            ?>
              
              <table class="page_2colTbl" cellspacing="0" border="0">
              	
                <!--col class="pagecol_col1a" />
              	<col class="pagecol_col1" />
              	<col class="pagecol_col2" />
              	<col class="pagecol_col3" />
              	<col class="pagecol_col3a" /-->
                <tr>
                  <td class="page_col1a mySortable navCol" data-navcol="1"></td>
                  <td class="page_col1  mySortable navCol" data-navcol="2"> 
                      
                      <?php 
            if ($_smarty_tpl->tpl_vars['my']->value->lead_alert->isAllowed) {
                ?>
					  	<?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray"));
                $_block_repeat = true;
                echo smarty_block_mybox(array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

                      	<a href="javascript:;" onClick="showPopUp('leads.php?cmd=alert_popup',700,500);">
                        <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td style='padding:4px'><img class="block" src="../assets/images/icon_warning.png" width="48" height="48" border="0"></td>
                          <td align="center" valign="middle"><span style='font-size:9pt'>Tasks/Appointments <br>
                            Are Due Today</span></td>
                          </tr>
                        </table>
                        </a>
						<?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_mybox(array('node' => "LeftPanel_alertsdue", 'title' => "Today's Appts/Tasks", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

                      <?php 
            }
            ?>
                      
                      <?php 
            if ($_smarty_tpl->tpl_vars['my']->value->lead_alert->startPopup) {
                ?>
                      	<?php 
                echo '<script';
                ?>
 type="text/javascript">showPopUp('leads.php?cmd=alert_popup',700,500);<?php 
                echo '</script';
                ?>
>
                      <?php 
            }
            ?>
                      
                      <?php 
            echo smarty_function_func(array('name' => 'PageLinks', 'col' => 1), $_smarty_tpl);
            ?>

                      
                      
                     
                      
                      
                      <?php 
            if ($_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK']) {
                ?>
                      <div style='text-align:center;padding-top:8px;'>
                        <a href="<?php 
                echo $_smarty_tpl->tpl_vars['CONFIG']->value['SYS_SSLLINK'];
                ?>
" target="_blank"><img src="/corp/ssl_image.gif" border="0"></a>			</div>
                      <?php 
            }
            ?>
			
                      
                      <?php 
            if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslCertificateLinkCode']) {
                ?>
                      <div>
                      <iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=sslCertificateLinkCode"
                      OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'">
                      </iframe>
                      </div>
                      <?php 
            }
            ?>
                      
                      
                      <?php 
            if ($_smarty_tpl->tpl_vars['CONFIG']->value['sslPciCertificateLinkCode']) {
                ?>
                      	<div>
                        <iframe scrolling="no" style='text-align:center;padding:4px;width:100%;height:50px;' frameborder="0" src="/linkcodes.php?cmd=sslPciCertificateLinkCode"
                      OnLoad="var h=this.contentWindow.document.body.scrollHeight+0;this.style.height=h+'px'">
                      </iframe>			
                        </div>
                      <?php 
            }
            ?>
                                    
					<?php 
            echo '<script';
            ?>
>
						
						//mybox_sortableInit('.mySortable.c1');
						//mybox_sortableInit('.mySortable.LeftPanel.c2');
						
						<?php 
            echo '</script';
            ?>
>
                  </td>
                  <td class="page_col2">
                  
                    <?php 
            echo $_smarty_tpl->tpl_vars['contents']->value;
            ?>

                  
                  </td>
                  
                  <td class="page_col3   mySortable navCol" data-navcol="3">
                  
                      <?php 
            if (permitted('RIGHTCOLBOX-datetime')) {
                ?>
                      	<?php 
                echo $_smarty_tpl->getSubTemplate("box_datetime.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
                ?>

                      <?php 
            }
            ?>

                      



                      <?php 
            if (permitted('confShowBackup') && permitted('SUPERADMIN-RIGHTS')) {
                ?>
                          <?php 
                $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray"));
                $_block_repeat = true;
                echo smarty_block_mybox(array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat);
                while ($_block_repeat) {
                    ob_start();
                    ?>

                          	<?php 
                    echo smarty_function_func(array('name' => 'BackupBoxData', 'var' => 'BackupBoxData'), $_smarty_tpl);
                    ?>
		
                           
                              <?php 
                    if ($_smarty_tpl->tpl_vars['BackupBoxData']->value['showAlert']) {
                        ?>
                                  <?php 
                        echo smarty_function_js_include(array('src' => '/js/flash_text.js'), $_smarty_tpl);
                        ?>

                                  <div id="flashTable1" ><div style='width:100%;border:none' align="center"
                                  class="RedFlashText" onClick="window.location.href='/update_corp.php?cmd=backup'" title="Database backed up <?php 
                        echo $_smarty_tpl->tpl_vars['BackupBoxData']->value['age'];
                        ?>
 days ago">
                                  <span class='nobr'>DB Backup Past Due</span></div></div >
                              <?php 
                    }
                    ?>

                          	<table class="leftNavTable">
                              <tr class="menuitemsub_k">
                              <td>
                               &nbsp;Last Backup: <div class="toright"><?php 
                    echo smarty_modifier_date($_smarty_tpl->tpl_vars['BackupBoxData']->value['date']);
                    ?>
</div>
                          	</td>
                              </tr>
                              <tr class="menuitemsub_k">
                              <td>
                               &nbsp;Version: <div class="toright"><?php 
                    echo $_smarty_tpl->tpl_vars['BackupBoxData']->value['db_version'];
                    ?>
</div>
                              </td>
                              </tr>
                              <tr class="menuitemsub_k">
                              <td>
                               &nbsp;Perform Backup <div class="toright"><a href="/update_corp.php?cmd=backup">Start</a></div>
                              </td>
                              </tr>
                             	</table>
                          <?php 
                    $_block_content = ob_get_clean();
                    $_block_repeat = false;
                    echo smarty_block_mybox(array('node' => "col3_backup", 'title' => "CRM Backup", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
                }
                array_pop($_smarty_tpl->smarty->_tag_stack);
                ?>

                      <?php 
            }
            ?>

                      <?php 
            echo smarty_function_func(array('name' => 'PageLinks', 'col' => 3), $_smarty_tpl);
            ?>

                  

                  </td>
                  <td class="page_col3a  mySortable navCol" data-navcol="4"></td>
    
                  
                  </tr>
                </table>
              
		   <?php 
        }
        ?>
	              
          </div>
          </TD>
      </TR>
      <TR> 
        
        <TD valign="top" style='width:671px;'></TD>
      </TR>
      </TABLE>    


</div>	
</td>
</tr>
<tr>
  <td><DIV class="footer3">
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['CopyrightText'];
        ?>
</div>
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['PoweredBy'];
        ?>
</div>
</DIV>

<DIV class="footer4">
				  <?php 
        echo $_smarty_tpl->getSubTemplate('footerLinksDiv.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</DIV>

</td>
</tr>
</table>





</div>


<?php 
        echo smarty_function_func(array('name' => 'IMCode'), $_smarty_tpl);
        ?>



</BODY>
</HTML><?php 
    }
    function content_5778bc577a1a79_93645878($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        if (!is_callable('smarty_function_js_data')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_data.php';
        }
        echo smarty_function_js_include(array('src' => '/css/listboxes.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/css/statslots.css'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate("jqChart.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

<?php 
        echo smarty_function_js_data(array('chart1' => $_smarty_tpl->tpl_vars['chart1']->value, 'chart2' => $_smarty_tpl->tpl_vars['chart2']->value), $_smarty_tpl);
        ?>






<?php 
        echo '<script';
        ?>
 language="javascript">

function myInit(){
}

function myFormSubmit(f){
	return true;
}

function onDel(f){
	var dd=document.getElementsByName('sel[]');
	var i;
	var c=0;
	for(i=0;i<dd.length;i++) if(dd[i].checked) c=1;
	if(!c){alert('No items selected');return false;}

	return confirm('Are you sure you want to delete selected items?')
}


$(document).ready(function() {

        var background = {
            type: 'linearGradient',
            x0: 0,
            y0: 0,
            x1: 0,
            y1: 1,
            colorStops: [{offset: 0, color: '#d2e6c9'},
                {offset: 1, color: 'white'}]
        };

        $('#jqChart1').jqChart({
            title: {text: 'Merchant Cash Advance Account Status by Month'},
            border: {strokeStyle: '#6ba851'},
            background: background,
            animation: {duration: 1},
            shadows: {
                enabled: true
            },
            axes: [
                {
                    type: 'linear',
                    location: 'left',
					minimum: 0

                }
            ],
            series: [
                {
                    title: 'Approved',
                    type: 'column',
                    data: [
						[chart1[0].month, chart1[0].a], 
						[chart1[1].month, chart1[1].a], 
						[chart1[2].month, chart1[2].a], 
						[chart1[3].month, chart1[3].a], 
						[chart1[4].month, chart1[4].a], 
						[chart1[5].month, chart1[5].a], 
						[chart1[6].month, chart1[6].a], 
						[chart1[7].month, chart1[7].a], 
						[chart1[8].month, chart1[8].a], 
						[chart1[9].month, chart1[9].a], 
						[chart1[10].month, chart1[10].a], 
						[chart1[11].month, chart1[11].a]
						]
                },
                {
                    title: 'Underwriting',
                    type: 'column',
                    data: [
						[chart1[0].month, chart1[0].u], 
						[chart1[1].month, chart1[1].u], 
						[chart1[2].month, chart1[2].u], 
						[chart1[3].month, chart1[3].u], 
						[chart1[4].month, chart1[4].u], 
						[chart1[5].month, chart1[5].u], 
						[chart1[6].month, chart1[6].u], 
						[chart1[7].month, chart1[7].u], 
						[chart1[8].month, chart1[8].u], 
						[chart1[9].month, chart1[9].u], 
						[chart1[10].month, chart1[10].u], 
						[chart1[11].month, chart1[11].u]
						]
                },
                {
                    title: 'Declined',
                    type: 'column',
                    data: [
						[chart1[0].month, chart1[0].d], 
						[chart1[1].month, chart1[1].d], 
						[chart1[2].month, chart1[2].d], 
						[chart1[3].month, chart1[3].d], 
						[chart1[4].month, chart1[4].d], 
						[chart1[5].month, chart1[5].d], 
						[chart1[6].month, chart1[6].d], 
						[chart1[7].month, chart1[7].d], 
						[chart1[8].month, chart1[8].d], 
						[chart1[9].month, chart1[9].d], 
						[chart1[10].month, chart1[10].d], 
						[chart1[11].month, chart1[11].d]
						]
                }
				
				
            ]
        });
        $('#jqChart2').jqChart({
            title: {text: 'Total Approved Merchant Funding by Month'},
            border: {strokeStyle: '#6ba851'},
            background: background,
            animation: {duration: 1},
            shadows: {
                enabled: true
            },
            axes: [
                {
                    type: 'linear',
                    location: 'left',
					minimum: 0

                }
            ],
            series: [
                {
                    title: 'Funding Amount',
                    type: 'column',
                    data: [
						[chart1[0].month, chart2[0].a], 
						[chart1[1].month, chart2[1].a], 
						[chart1[2].month, chart2[2].a], 
						[chart1[3].month, chart2[3].a], 
						[chart1[4].month, chart2[4].a], 
						[chart1[5].month, chart2[5].a], 
						[chart1[6].month, chart2[6].a], 
						[chart1[7].month, chart2[7].a], 
						[chart1[8].month, chart2[8].a], 
						[chart1[9].month, chart2[9].a], 
						[chart1[10].month, chart2[10].a], 
						[chart1[11].month, chart2[11].a]
						]
                }
				
            ]
        });





});



<?php 
        echo '</script';
        ?>
>
















<div class="TitleRow">
	MCA/Funding Services 
  	  <div class="toright">
		
		
              
        <?php 
        echo $_smarty_tpl->getSubTemplate('status/mca_instr.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

      </div>	  	   
</div>



<div id="jqChart1" style=" height: 220px;margin-bottom:8px"></div>
<div id="jqChart2" style=" height: 220px;margin-bottom:8px"></div>


<TABLE ID="Table9" BORDER="0"  CELLSPACING=0 CELLPADDING=0 WIDTH="100%">
  <TR >
  <TD>
  
  <?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['stat']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            ?>
  <div class="statSlot">
	<?php 
            if ($_smarty_tpl->tpl_vars['item']->value['title']) {
                ?>
	<div class='statBox'>
    	<div class="body body_<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['color'];
                ?>
">
        <?php 
                echo $_smarty_tpl->tpl_vars['item']->value['value'];
                ?>

        </div>
        <div class="boxfooter">
        <?php 
                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                ?>

        </div>
    </div>
    <?php 
            }
            ?>
  </div>
  <?php 
        }
        ?>
  
  </TD>
  </TR>
  <TR >
    <TD><div class="instructions">
    
    All statistics above will show company wide totals for ALL contracts with any of the following statuses:  Approved, Funded, 
Lender Debit, Merchant Credit, Agent Credit, Merchant Daily Debit, Lender Daily Credit, or Completed
    
    </div></TD>
  </TR>
</TABLE>
<?php 
    }
    function content_5778b60fd58bd5_47171458($_smarty_tpl)
    {
        if (!is_callable('smarty_function_js_include')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/function.js_include.php';
        }
        ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<?php 
        echo '<script';
        ?>
 type="text/javascript" src="/js/init.js"><?php 
        echo '</script';
        ?>
>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<META NAME="Generator" CONTENT="NetObjects Fusion 7.5 for Windows">
<TITLE><?php 
        echo $_smarty_tpl->tpl_vars['PAGETITLE']->value;
        ?>
</TITLE>
<?php 
        echo smarty_function_js_include(array('src' => '/css/style.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/corp/style_c.css'), $_smarty_tpl);
        ?>


<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-1.9.1.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.css'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/jquery-ui-1.11.2/jquery-ui.min.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/functions.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/bubble.js'), $_smarty_tpl);
        ?>

<?php 
        echo smarty_function_js_include(array('src' => '/js/nav.js'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('startup.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>


<?php 
        echo smarty_function_js_include(array('src' => '/corp/favicon.ico'), $_smarty_tpl);
        ?>

<?php 
        echo $_smarty_tpl->getSubTemplate('BodyOnLoad.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);
        ?>

</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<div id="mostOuterDiv">
<table id="mostOuterTable" cellpadding="0" cellspacing="0" border="0">
  
<tr>
  <td>
<DIV class="header2">
<table class="topLinksBar" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
	<td align="left">

	<a class="popupHomeLink" href="javascript:;" onclick="myRedirect('/','opener')" title="Back to Home"></a>
	<?php 
        echo ($tmp = @$_smarty_tpl->tpl_vars['tpl_title']->value) === null || $tmp === '' ? 'CRM Merchant Management Software' : $tmp;
        ?>

	

</td>
	<td align="right">
	<?php 
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
        $_from = $_smarty_tpl->tpl_vars['tpl_links']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
            ?>
	 	<?php 
            if ($_smarty_tpl->tpl_vars['key']->value) {
                ?>
 - <?php 
            }
            ?>
	 	<?php 
            if ($_smarty_tpl->tpl_vars['item']->value['url']) {
                ?>
			<a href="javascript:;" onclick="myRedirect('<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['url'];
                ?>
','<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['target'];
                ?>
')"><?php 
                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                ?>
</a>
		<?php 
            } else {
                ?>
			<?php 
                echo $_smarty_tpl->tpl_vars['item']->value['title'];
                ?>

		<?php 
            }
            ?>
	<?php 
        }
        ?>
	</td>
	</tr></table>
</DIV>


</td>
</tr>  
  
  
<tr class="r2">
	<td style="background-color:#ffffff;">
    	<div align="center" class="ResTplContent">
			<table border="0" style="width:<?php 
        echo $_smarty_tpl->tpl_vars['tpl_contents_width']->value;
        ?>
">
			<tr><td style="">
	    	<?php 
        echo $_smarty_tpl->tpl_vars['contents']->value;
        ?>

	        </td></tr>
			</table>
        </div>
	</td>
</tr>
<tr>
  <td>
<DIV class="footer4">
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['CopyrightText'];
        ?>
</div>
                  <div><?php 
        echo $_smarty_tpl->tpl_vars['CONFIG']->value['PoweredBy'];
        ?>
</div>
</DIV>


</td>
</tr>
</table>
</div>



</BODY>
</HTML>
 <?php 
    }