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

{literal}
<script language="javascript">
function openSelector(id, sid){
  selectorUrl = "contact_comp.php?action=details&id="+id+"&"+sid;
  selector = open(selectorUrl,"selectorWindow","width=450,height=230,screenX=0,screenY=0");
  selector.focus();
}
</script>
{/literal}

<form action="index.php" method="POST">
<input type="hidden" name="mod" value="contact">
<input type="hidden" name="obj" value="crm">
<input type="hidden" name="op" value="qsearch">
<table>
  <tr>
    <td valign="top">{$at|smarty:nodefaults}</td>
    <td valign="top" class="stand">
      &nbsp; {$quicksearch}: <input type="text" size="20" name="searchterm">
      &nbsp;<input type="submit" value="{$search}" name="suchen" class="{$suclass}">
    </td>
  </tr>
</table>
</form>

{if $hascreaterights}
&nbsp;
{if $iconmode}
<a href="index.php?mod=contact&amp;obj=crm&amp;view=newform&amp;{$SESSION}" class="new"><img src="{$imgpathgeneral}/new_{$iconid}.gif" border="0"></a>
{else}
<a href="index.php?mod=contact&amp;obj=crm&amp;view=newform&amp;{$SESSION}" class="new">{$new}</a>
{/if}
{/if}

<table width="100%" class="contentback" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      {* TABLE START *}
      {include file="$gentemplates/_th5.tpl" r1=$company r2=$last_contact_date r3=$last_contact_person r4=$internalcontact r5=$action}
      {section name=inhalt1 loop=$td}
      {include file="$gentemplates/_tr5.tpl" r1=$td[inhalt1].name1 r2=$td[inhalt1].contact_date|mgw_date r3=$td[inhalt1].contact_person r4=$td[inhalt1].last_contact_internal r5=$urls[inhalt1]|smarty:nodefaults}
      {/section}
      {include file="$gentemplates/_tfx.tpl"}
      {* TABLE END *}

      <br />
      {if $hascreaterights}
      &nbsp;
      {if $iconmode}
      <a href="index.php?mod=contact&amp;obj=crm&amp;view=newform&amp;{$SESSION}" class="new"><img src="{$imgpathgeneral}/new_{$iconid}.gif" border="0"></a>
      {else}
      <a href="index.php?mod=contact&amp;obj=crm&amp;view=newform&amp;{$SESSION}" class="new">{$new}</a>
      {/if}
      {/if}
    </td>
  </tr>
</table>

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