function content_5778af75d7a564_51361063($_smarty_tpl)
    {
        if (!is_callable('smarty_block_mybox')) {
            include '/homepages/37/d619410358/htdocs/developer/ext/smarty3/plugins/block.mybox.php';
        }
        ?>
                <?php 
        $_smarty_tpl->smarty->_tag_stack[] = array('mybox', array('node' => "col3_123", 'title' => "Today's Date", 'class' => "box-one box-gray"));
        $_block_repeat = true;
        echo smarty_block_mybox(array('node' => "col3_123", 'title' => "Today's Date", 'class' => "box-one box-gray"), null, $_smarty_tpl, $_block_repeat);
        while ($_block_repeat) {
            ob_start();
            ?>

                        <div align="center" style="font-size:10pt;margin:4px;">
                            <p id="myDate">
                            </p>
                            <p id="myTime" style="font-weight:bold">
                            </p>
                        </div>
                        
                        
                        <?php 
            echo '<script';
            ?>
 language="javascript">
							window.setInterval("myTimeShow()", 1000);
							myTimeShow();
							
							
							function myTimeShow(){
								var d = new Date();
   								el('myTime').innerHTML= myDateFormat(d,'time');
   								el('myDate').innerHTML= myDateFormat(d,'date');
   							}
						<?php 
            echo '</script';
            ?>
>
                        
                        
                <?php 
            $_block_content = ob_get_clean();
            $_block_repeat = false;
            echo smarty_block_mybox(array('node' => "col3_123", 'title' => "Today's Date", 'class' => "box-one box-gray"), $_block_content, $_smarty_tpl, $_block_repeat);
        }
        array_pop($_smarty_tpl->smarty->_tag_stack);
        ?>
		
<?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_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_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 
    }