{include file="_header_print.tpl"}
<table>
<tr>
<td>
<table width="100%" border="0" class="contentback" cellspacing="0" cellpadding="0" height="300">
  <tr>
    <td valign="top">
      {* TABLE START *}
      {include file="_calendar_week_h_a5.tpl" r1="$calweek $weekno" r2=$d2|smarty:nodefaults r3=$d3|smarty:nodefaults r4=$d4|smarty:nodefaults r5=$d5|smarty:nodefaults r6=$d6|smarty:nodefaults r7=$d7|smarty:nodefaults r8=$d8|smarty:nodefaults
	  h_klass2=$cw_header.h_klass2 h_klass3=$cw_header.h_klass3 h_klass4=$cw_header.h_klass4 h_klass5=$cw_header.h_klass5
	  h_klass6=$cw_header.h_klass6 h_klass7=$cw_header.h_klass7 h_klass8=$cw_header.h_klass8
	  }
	  
	  {assign var="r2_first" value="true"}
	  {assign var="r3_first" value="true"}
	  {assign var="r4_first" value="true"}
	  {assign var="r5_first" value="true"}
	  {assign var="r6_first" value="true"}
	  {assign var="r7_first" value="true"}
	  {assign var="r8_first" value="true"}
	  
	  
   	  {php}
	  $this->assign("idline",0);
	  {/php}
	  
	  {section name=inhalt1 loop=$cw}
      
		<tr class="tab">
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>	
		  
		  {if $cw[inhalt1].mon|smarty:nodefaults==""}
		  {assign var="r2_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>	
		  {else}
		  	{if $r2_first=="true"  || (r2_first!="true" and $cw[inhalt1].id_mon!=$old_r2)}
	  		  {assign var="r2_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>	
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass2};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r2" value=$cw[inhalt1].id_mon}
		  
		  {if $cw[inhalt1].tue|smarty:nodefaults==""}
		  {assign var="r3_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r3_first=="true"  || (r3_first!="true" and $cw[inhalt1].id_tue!=$old_r3)}
	  		  {assign var="r3_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass3};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r3" value=$cw[inhalt1].id_tue}
		  
		  {if $cw[inhalt1].wed|smarty:nodefaults==""}
		  {assign var="r4_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r4_first=="true" || (r4_first!="true" and $cw[inhalt1].id_wed!=$old_r4)}
	  		  {assign var="r4_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass4};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r4" value=$cw[inhalt1].id_wed}
		  
		  {if $cw[inhalt1].thu|smarty:nodefaults==""}
		  {assign var="r5_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r5_first=="true" || (r5_first!="true" and $cw[inhalt1].id_thu!=$old_r5)}
	  		  {assign var="r5_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass5};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r5" value=$cw[inhalt1].id_thu}
		  
		  {if $cw[inhalt1].fri|smarty:nodefaults==""}
		  {assign var="r6_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r6_first=="true"  || (r6_first!="true" and $cw[inhalt1].id_fri!=$old_r6)}
	  		  {assign var="r6_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass6};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r6" value=$cw[inhalt1].id_fri}
		  
		  {if $cw[inhalt1].sat|smarty:nodefaults==""}
		  {assign var="r7_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r7_first=="true"  || (r7_first!="true" and $cw[inhalt1].id_sat!=$old_r7)}
	  		  {assign var="r7_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass7};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}
		  {assign var="old_r7" value=$cw[inhalt1].id_sat}
		  
		  {if $cw[inhalt1].sun|smarty:nodefaults==""}
		  {assign var="r8_first" value="true"}
		  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
		  {else}
		  	{if $r8_first=="true" || (r8_first!="true" and $cw[inhalt1].id_sun!=$old_r8)}
	  		  {assign var="r8_first" value="false"}
			  <td colspan="2" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			{else}
			  <td class="tab"  width="90" height="1" align="center" STYLE="background-color:{$cw[inhalt1].bg_klass8};"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1" /></td>	
			  <td width="1" class="lines"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td>
			 {/if}
		  {/if}  
		  {assign var="old_r8" value=$cw[inhalt1].id_sun}
		</tr>

	  
	  {include file="_calendar_week_row_a5.tpl" 
      r1=$cw[inhalt1].von|smarty:nodefaults r2=$cw[inhalt1].mon|smarty:nodefaults r3=$cw[inhalt1].tue|smarty:nodefaults r4=$cw[inhalt1].wed|smarty:nodefaults 
      r5=$cw[inhalt1].thu|smarty:nodefaults r6=$cw[inhalt1].fri|smarty:nodefaults r7=$cw[inhalt1].sat|smarty:nodefaults r8=$cw[inhalt1].sun|smarty:nodefaults
      klass2=$cw[inhalt1].klass2 klass3=$cw[inhalt1].klass3 klass4=$cw[inhalt1].klass4 
      klass5=$cw[inhalt1].klass5 klass6=$cw[inhalt1].klass6 klass7=$cw[inhalt1].klass7 
      klass8=$cw[inhalt1].klass8 
	  bg_klass2=$cw[inhalt1].bg_klass2 bg_klass3=$cw[inhalt1].bg_klass3 bg_klass4=$cw[inhalt1].bg_klass4
	  bg_klass5=$cw[inhalt1].bg_klass5 bg_klass6=$cw[inhalt1].bg_klass6 bg_klass7=$cw[inhalt1].bg_klass7
	  bg_klass8=$cw[inhalt1].bg_klass8
	  idline=$idline
      }
	  	
	  {php}
	  $idline++;
	  $this->assign("idline",$idline);
	  {/php}
      {/section}
	  
	  <tr><td class="lines" height="1" width="100%" colspan="16"><img src="{$imgpath}/black.gif" alt="" width="100%" height="1" /></td></tr>
      
	  {include file="$gentemplates/_tfx.tpl"}
      {* TABLE END *}	
    </td>
    
	<!--
	<td width="220" valign="top" align="center">
      
      <table border="0" cellpadding="0" cellspacing="0" width="180">
	<tr>
	  <td>{include file="_actual_calendar_owner.tpl"}</td>
	</tr> 
	<tr align="left"><td class="stand"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="10" /></td></tr>	
	<tr>
	  <td>{include file="_select_calendar_owner.tpl"}</td>
	</tr> 
	<tr align="left"><td class="stand"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="10" /></td></tr>	
	<tr>
	  <td>{$kalender|smarty:nodefaults}</td>
	</tr> 
	<tr align="left" heigth="10"><td class="stand"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="10" /></td></tr>	
	<tr>
	  <td>{include file="jump_to.tpl"}</td>
	</tr> 
	<tr align="left"><td class="stand"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="10" /></td></tr>	
	<tr>
	  <td>{include file="calendar_legend.tpl"}</td>
	</tr> 
      </table>
    </td>
	-->
  </tr>
</table>
</td>
</tr>
</table>

<script langage="javascript">
//header img height (for ie6)
_h_img1.height = h_1['clientHeight'];
_h_img2.height = h_2['clientHeight'];
_h_img3.height = h_3['clientHeight'];
_h_img4.height = h_4['clientHeight'];
_h_img5.height = h_5['clientHeight'];
_h_img6.height = h_6['clientHeight'];
_h_img7.height = h_7['clientHeight'];
_h_img8.height = h_8['clientHeight'];

//tab img height (for ie6)
{php}
for($i=0;$i<$idline;$i++)
	for ($j=1;$j<=8;$j++) echo "_".$i."_img".$j.".height = _".$i."_".$j."['clientHeight'];\n";
{/php}

window.print();
</script>


</body>
</html>