<!-- BEGIN DYNAMIC BLOCK: viewArchivedLink -->
<div style="text-align:right">
    <a href="javascript:viewAllNotes({clientId})">[l]View Archived[/l]</a>
</div>
<!-- END DYNAMIC BLOCK: viewArchivedLink -->
<div id="divstaffnotes" style="display:">
	<div id="clientNotes">

		<!-- BEGIN DYNAMIC BLOCK: customerNote -->
		<div style="width:348px; margin:5px 0; border:1px solid #bbb; background-color:#FFFAEF;">
			<table width="100%">
				<tr>
					<td>
						{authorAndDate}:
						<!-- BEGIN DYNAMIC BLOCK: assocTicketTypes -->
						<div>({assocTicketTypesList})</div>
						<!-- END DYNAMIC BLOCK: assocTicketTypes -->
					</td>
					<!-- BEGIN DYNAMIC BLOCK: visibleByCustomer -->
					<td align="right" style="color:#008000; font-weight:bold">
						[l]Visible by customer[/l]
					</td>
					<!-- END DYNAMIC BLOCK: visibleByCustomer -->
				</tr>
			</table>
			<div style="margin-bottom:10px"><br />{noteContents}</div>
			<!-- BEGIN DYNAMIC BLOCK: deleteNote -->
			<div style="text-align:right; margin:5px">
				<a href="#" onclick="deleteNote({noteId},'client')">[l]delete[/l]</a>
			</div>
			<!-- END DYNAMIC BLOCK: deleteNote -->
		</div>
		<!-- END DYNAMIC BLOCK: customerNote -->
		<!-- BEGIN DYNAMIC BLOCK: addNote -->
		<div style="margin:5px 0; position:relative" name="expandedmenu">
			<input type="button" onclick="jsPopup('index.php?fuse=clients&view=AddEditNote&customerGroup={customerGroup}')" class="button_large" value="[l]Add note[/l]" />
			<!-- BEGIN DYNAMIC BLOCK: archiveNotes -->
			<input type="button" onclick="archiveNotes({clientId})" class="button_large" style="position:absolute; right:0" value="[l]Archive notes[/l]" />
			<!-- END DYNAMIC BLOCK: archiveNotes -->
		</div>
		<!-- END DYNAMIC BLOCK: addNote -->
		{groupNotes}
	</div> <!-- clientNotes -->
</div> <!-- divstaffnotes -->
<div style="margin:5px 0; display:none;" id="collapsedmenu">
	<input type="button" onclick="jsPopup('index.php?fuse=clients&view=AddEditNote&customerGroup={customerGroup}')" class="button_large" value="[l]Add note[/l]" />
</div>

<script language="JavaScript" type="text/javascript">
    if (get_cookie("staffnotes")=="collapse"){
	    $('divstaffnotes').style.display = "";
        $('collapsedmenu').style.display = "none";	    
        $('togglestaffnotes').src="{RELATIVE_PATH}images/collapse.gif";
    }else{
		$('divstaffnotes').style.display = "none";
		$('collapsedmenu').style.display = "";
        $('togglestaffnotes').src="{RELATIVE_PATH}images/expand.gif";
    }
</script>
