
<script type="text/javascript">
<!--
var secs = 5;
var wait = secs * 1000;
for(i=1;i<=secs;i++) {ldelim} window.setTimeout("update(" + i + ")", i * 1000); {rdelim}

window.setTimeout("timer()", wait);

function update(num) {ldelim}
 if(num == (wait/1000)) {ldelim}
  window.location.href = 'index.php?do=dl&p=downloadfile&area={$area}&fileid={$smarty.request.fileid}&action=dl';
  {rdelim}
 else {ldelim}
  printnr = (wait/1000)-num;
  document.wait.sect.value = "" + printnr + "";
 {rdelim}
{rdelim}
//-->
</script> 

<table width="100%"  border="0" cellpadding="4" cellspacing="1" class="outer_boxborder">
  <tr>
    <td class="box_innerhead"><div align="center" class="title">{$lang.download_thefile}{$row->title|escape:"htmlall"}</div></td>
  </tr>
  <tr>
    <td><form name="wait" id="wait"> 
      <div align="center">{$lang.downloadstarts_in}
          <input class="waitfield" type="text" id="sect" value="" /> 
          {$lang.seconds}<br />
          <br />
          <input onclick="window.close();" type="button" class="button" value="{$lang.winclose}" />
      </div>
    </form>  </td>
  </tr>
</table>

