<tr class="tab" align="left">
  <td  class="{$class}" width="5" height="20" style="background-color:{$r0.color|smarty:nodefaults};"></td>
  
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  
  <td CLASS="{$class}" WIDTH="310" COLSPAN="3">
	<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
		  {if $initusername!=""}
		  <TR class="tab">
		  	<TD class="{$class}" COLSPAN="5" WIDTH="310"><B>{$initusername}&nbsp;{$he_subject}&nbsp;:</B></TD>
		  </TR>
		  <TR class="tab">
		  	<TD class="{$class}" COLSPAN="5" WIDTH="310" HEIGHT="1"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></TD>
		  </TR>
		  <TR class="tab">
		  {/if}
		  <!-- day -->
		  <td  class="{$class}" width="80">{$r1|smarty:nodefaults}</td>
		  
		  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="3" height="1" />&nbsp;</td>
		  <!-- hours -->
		  <td  class="{$class}" width="80">{$r2|smarty:nodefaults}</td>
		   
		  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="5" height="1" />&nbsp;</td>
		  
		  <!-- description -->
		  <td  class="{$class}" width="150" STYLE="background-color:{$r4_color};"><B>{$r4_type}</B><BR>{$r4|smarty:nodefaults}&nbsp;</td>
		  </TR>
  	</TABLE>
  </TD>
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  
  <!-- private -->
  <td  class="{$class}"  VALIGN="center" >
  {if $r4_1=="1"} {* 1 => private *} 
	  <a href="javascript:void(0);" onmouseover="return overlib('{$gentemp_private}',FGCOLOR,'#FFFFDF',STATUS,' ');" onmouseout="return nd();">
	  {include file="$gentemplates/_img_png.tpl" localimgsrc="$localimgpath/private.png" imgsrc="$imgpath/private.png"}
	  </a> 
  {else}
  	  &nbsp;
  {/if}
  </td>
  <!-- <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  -->
  <!-- availaibility -->
  <td  class="{$class}"  VALIGN="middle">
  {if $r4_21=="1" && $r4_22!=""} {* available and a telephone number  *}
	  <a href="javascript:void(0);" onmouseover="return overlib('{$gentemp_can_be_disturbed}<br>{$gentemp_telephone} : {$r4_22}',FGCOLOR,'#FFFFDF',STATUS,' ');" onmouseout="return nd();">
	  {include file="$gentemplates/_img_png.tpl" localimgsrc="$localimgpath/avail.png" imgsrc="$imgpath/avail.png"}
	  </a>
  {else}
  	{if $r4_21=="1" && $r4_22==""} {* available but no telephone number*}
	  	<a href="javascript:void(0);" onmouseover="return overlib('{$gentemp_can_be_disturbed}',FGCOLOR,'#FFFFDF',STATUS,' ');" onmouseout="return nd();">
	  	{include file="$gentemplates/_img_png.tpl" localimgsrc="$localimgpath/avail.png" imgsrc="$imgpath/avail.png"}
	  	</a>
  	{else}
  		{if $r4_21=="0"} {* => not available *}
	  		<a href="javascript:void(0);" onmouseover="return overlib('{$gentemp_can_not_be_disturbed|smarty:nodefaults}',FGCOLOR,'#FFFFDF',STATUS,' ');" onmouseout="return nd();">
		  	{include file="$gentemplates/_img_png.tpl" localimgsrc="$localimgpath/not_avail.png" imgsrc="$imgpath/not_avail.png"}
		  	</a>
  		{else}
			&nbsp;
		{/if}
 	{/if}
  {/if}
  </td>
  <!-- <td  class="{$class}" width="5" VALIGN="middle"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  -->
  <!-- participants -->
  <td class="{$class}"  VALIGN="middle" WIDTH="150">
  {if $r4_3!=""}
	  <table border="0" cellpadding="0" cellspacing="5" WIDTH="100%">
	  {section name=part loop=$r4_3}
	  <tr>
	  	<td WIDTH="100%">{if $r4_3[part].id==$r4_3[part].inituserid}<B>{$r4_3[part].name}</B>{else}{$r4_3[part].name}{/if}</td>
	  </tr>
	  {/section}
	  </table>
  {else}
  	&nbsp;
  {/if}
  </td>
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  <!-- answers -->   
  <td  class="{$class}" width="150">
  	<table border="0" cellpadding="0" cellspacing="5" WIDTH="100%">
	  {section name=ans loop=$r7}
	  <tr>
	  	<td WIDTH="100%" style="background-color:{$r7[ans].color};">{$r7[ans].text}</td>
	  </tr>
	  {/section}
	  </table>
  </td>
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  <!-- city -->
  <td  class="{$class}" width="100"><B>{$r5_type}</B><BR>{$r5|smarty:nodefaults}&nbsp;</td>
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
  <!-- action -->
  <td  class="{$class}" width="150">{$r6|smarty:nodefaults}&nbsp;</td>
  <td  class="{$class}" width="5"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" />&nbsp;</td>
</tr>
<tr>
	<td height="1" width="1" class="lines"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td>
	<td height="1" width="1" class="lines2" colspan="20"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td>
</tr>
