{include file="$gentemplates/_header.tpl" pagetitle="$contentheader"}
{include file="$gentemplates/_navi.tpl" pagetitle="$contentheader"}

<form name="f1" action="index.php" method="POST">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">
<input type="hidden" name="id" value="{$id}">
<input type="hidden" name="mod" value="contact">
<input type="hidden" name="obj" value="crm">
{if $mode eq "new"}
<input type="hidden" name="op" value="create">
{else}
<input type="hidden" name="op" value="edit">
{/if}

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr><td class="lines2" height="2" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="2"></td></tr>						
  <tr align="left">
    <td class="tab" height="20" width="14"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="tab">&nbsp;</td>
    <td class="tab">&nbsp;</td>
  </tr>
  
  <tr><td class="lines2" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_company}</td>
    <td class="tab">{$companysb|smarty:nodefaults}</td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_person}</td>
    <td class="tab"><input type="text" name="person" size="50" maxlength="255" value="{$td.contact_person|escape:"html"}"></td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_userid}</td>
    <td class="tab">{$usersb|smarty:nodefaults}</td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_date}</td>
    <td class="tab">
      {mgw_html_select_date prefix="date" time=$td.contact_date start_year="-2" end_year="+2"}&nbsp;{datepick form="f1" field="dateYear,dateMonth,dateDay"}
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_time}</td>
    <td class="tab">{html_select_time prefix="date" display_seconds=false minute_interval=5}
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_todo}</td>
    <td class="tab"><br /><textarea rows="8" cols="70" name="todo">{$td.contact_todo}</textarea></td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="40"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead">{$contact_comment}</td>
    <td class="tab"><br /><textarea rows="8" cols="70" name="note">{$td.contact_comment}</textarea><br /><br /></td>
  </tr>
  <tr><td class="lines2" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
  <tr align="left">
    <td class="tab" height="25"><img src="{$imgpathmaster}/space.gif" alt="" width="60" height="1"></td>
    <td class="formhead"><a href="index.php?mod=contact&amp;obj=crm&amp;view=detail_list&amp;id={$backid}&amp;{$SESSION}" class="new">{$back}</a></td>
    <td class="tab"><input type="submit" name="{$suname}" value="{$suvalue}" class="{$suclass}"></td>
  </tr>
  <tr><td class="lines" height="1" width="1" colspan="3"><img src="{$imgpathmaster}/space.gif" alt="" width="1"></td></tr>
</table>

</form>

{include file="$gentemplates/_footer.tpl" aktUser=$username}