<script type="text/javascript">
    var customerid={userId};
</script>
<div id="profile-header-username" style="padding-top:5px;padding-bottom:24px;">
    <div style="float:left;padding-right:10px;padding-bottom:10px;">
        <span style="font-size:24px;padding-left:10px;">
            {userName}&nbsp;({userId})
        </span>
    </div>
    <!-- BEGIN DYNAMIC BLOCK: customerStatus -->
    <div id="profile-status" class="{profilestatusclass}" style="float:left;">
        <select id="dropdown_customerstatus" name="dropdown_customerstatus" size="10" style="display:none">
            <!-- BEGIN DYNAMIC BLOCK: pendingStatus -->
            <option value="0" {pendingSelected} >[l]Pending[/l]</option>
            <!-- END DYNAMIC BLOCK: pendingStatus -->
            <!-- BEGIN DYNAMIC BLOCK: activeStatus -->
            <option value="1" {activeSelected} >[l]Active[/l]</option>
            <!-- END DYNAMIC BLOCK: activeStatus -->
            <!-- BEGIN DYNAMIC BLOCK: inactiveStatus -->
            <option value="-1" {inactiveSelected} >[l]Inactive[/l]</option>
            <!-- END DYNAMIC BLOCK: inactiveStatus -->
            <!-- BEGIN DYNAMIC BLOCK: cancelledStatus -->
            <option value="-2" {cancelledSelected} >[l]Cancelled[/l]</option>
            <!-- END DYNAMIC BLOCK: cancelledStatus -->
            <!-- BEGIN DYNAMIC BLOCK: fraudStatus -->
            <option value="-3" {fraudSelected} >[l]Fraud[/l]</option>
            <!-- END DYNAMIC BLOCK: fraudStatus -->
        </select>
        <span id="label_customerstatus" style="text-transform:capitalize;display:''"><a href="javascript:ToggleStatus();"><span id="label_customerstatus_text">{statusname}</span></a></span>
    </div>
    <!-- END DYNAMIC BLOCK: customerStatus -->
</div>

<div id="profileheader" style="clear:both;">
    <table border="0" cellpadding="0" cellspacing="10">
    <tr>
    <td valign="top">
            <img src="{profileurl}" width="45" height="45" style="border:4px solid #D9D9D9;" alt="" />
    </td>
    <td  valign="top">

            <!-- BEGIN DYNAMIC BLOCK: customerGroups -->
            <div id="profile-header-group" class="profile-header-item">
                <label style="float:left;padding-right:10px;">[l]Group[/l]:</label>
                    <div id="profile-group">
	                <select id="dropdown_customerGroup" name="dropdown_customerGroup" style="display:none">
                        <!-- BEGIN DYNAMIC BLOCK: groupOption -->
                            <option value="{groupValue}" {groupSelected} >{groupLabel}</option>
                        <!-- END DYNAMIC BLOCK: groupOption -->
                        </select>
                        <span id="profile-group-label" >
                        <a href="javascript:ToggleGroup();"style="display:">{assignedgroup}</a>
                        </span>
                    </div>
            </div>
            <!-- END DYNAMIC BLOCK: customerGroups -->
            
            <div id="profile-header-datecreated" style="clear:both;" class="profile-header-item">
                <label>[l]Created[/l]:</label>
                {dateActivated}&nbsp;&nbsp;/&nbsp;&nbsp;
                <label>[l]Last Seen[/l]:</label>
                {lastSeenPretty}
            </div>

            <!-- BEGIN DYNAMIC BLOCK: headerBalance -->
            <div id="profile-header-balance" class="profile-header-item">
                <label>[l]Credit[/l]:</label> <span id='profile-header-credit-value'>{balance}</span>&nbsp;&nbsp;/&nbsp;&nbsp;
                <label>[l]Total Paid[/l]:</label> <span id='profile-header-totalpaid-value'>{totalPaid}</span>&nbsp;&nbsp;/&nbsp;&nbsp;
                <label>[l]Total Un-Paid[/l]:</label> <span id='profile-header-totalunpaid-value'>{totalUnPaid}</span>&nbsp;&nbsp;/&nbsp;&nbsp;
                <label>[l]Un-Invoiced Work[/l]:</label> <span id='profile-header-uninvoiced-value'><a href="index.php?fuse=clients&amp;view=Admin_Profile_UnInvoiced">{uninvoiced}</a></span>
            </div>
            <!-- END DYNAMIC BLOCK: headerBalance -->

            <!--
            <div id="profile-header-tickets" class="profile-header-item">
                <label>[l]Open Tickets[/l]:</label> {openTickets}&nbsp;&nbsp;/&nbsp;&nbsp;
                <label>[l]Total Opened[/l]:</label> {totalTickets}
            </div>
            -->

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

<div style="clear:both;">
    <ul class="tabs tabs-with-summary">
    <li class="{contacttabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Contact"><span>[l]Contact[/l]</span></a></li>
    <li class="{productstabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Products"><span>[l]Products[/l]</span></a></li>
    <li class="{billingtabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Billing"><span>[l]Billing[/l]</span></a></li>
    <li class="{recurringchargestabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_RecurringCharges"><span>[l]Recurring[/l]</span></a></li>
    <li class="{invoicestabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Invoices"><span>[l]Invoices[/l]</span></a></li>
    <li class="{accountstabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Accounts"><span>[l]Alt. Accounts[/l]</span></a></li>
    <li class="{notestabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Notes"><span>[l]Notes[/l] {NotesCount}</span></a></li>
    <li class="{passwordtabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Password"><span>[l]Password[/l]</span></a></li>
    <li class="{eventstabclass}"><a href="index.php?fuse=clients&amp;view=Admin_Profile_Events"><span>[l]Events[/l]</span></a></li>
    </ul>
</div>

<script type="text/javascript">
    var haspackages = {haspackages};
    var oldstatus = {oldstatus};
    var hasplugin = {packageWithPlugin};
</script>
