<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>{$title}{$hashmap.setup} {$hashmap.step} {$var_step} {$hashmap.of} {$var_steps}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}">
<link rel="stylesheet" type="text/css" href="./templates/default/css/setup.css">
<script type="text/javascript" type="text/javascript">
{if $js_errors eq 1 and $jserrorarray}
    var alertArray = new Array();
    {assign var="i" value=0}
    {foreach from=$jserrorarray item=curr_id}
    alertArray[{$i}] = "{$curr_id}";
    {assign var="i" value=$i+1}
    {/foreach}

    var alertStr = "{$hashmap.errornote}:\n";

    for (var i=0; i<alertArray.length; i++ ) alertStr += "- "+alertArray[i]+"\n";

    {literal}
    function alertErrors() {
        alert(alertStr);
        return true;
    }
    {/literal}
{/if}

    {literal}
    function setCheckboxes(do_check) {
        var elts      = document.forms['setupform'].elements['modules[]'];
        var elts_cnt  = (typeof(elts.length) != 'undefined')
                      ? elts.length
                      : 0;

        if (elts_cnt) {
            for (var i = 0; i < elts_cnt; i++) {
                elts[i].checked = do_check;
            } // end for
        } else {
            elts.checked        = do_check;
        } // end if... else

        return true;
    } // end of the 'setCheckboxes()' function

    {/literal}
</script>
</head>
<body{if $js_errors eq 1 and $jserrorarray} onload="alertErrors();"{/if}>

<form name="setupform" action="index.php" method="POST">
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}" />
<br />
<table border="0" cellpadding="0" cellspacing="0" width="640" align="center">
  <tr>
    <td width="19"><img src="{$imgpathmaster}/space.gif" alt="" width="19" height="1"></td>
    <td>
      <table border="0" cellpadding="1" cellspacing="0" class="border" width="100%">
	<tr>
	  <td class="user">
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
	      <tr>
		<td>
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		    <tr valign="center" class="title">
		      <td align="left">&nbsp;{$hashmap.version} {$mgwversion} {$hashmap.setup}</td>
		      <td align="right">{$hashmap.step} {$var_step} {$hashmap.of} {$var_steps}&nbsp;</td>
		    </tr>
		  </table>
		</td>
	      </tr>
	      <tr>
		<td class="border"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td>
	      </tr>
	      <tr>
		<td class="content" align="left">
            {if $js_errors neq 1 and $jserrorarray}
		<br />
                <table border="0" cellpadding="8" cellspacing="0" width="95%" align="center"><tr><td class="error">
                {$hashmap.errornote}:<br />
                {foreach from=$jserrorarray item=curr_id}
                - {$curr_id}<br />
                {/foreach}
                </td></tr></table>
            {/if}
		    {include file=$step_template}
		</td>
	      </tr>
	      <tr>
		<td class="content">
		  <table border="0" cellpadding="10" cellspacing="0" width="100%">
		    <tr>
		      <td align="left">
			<table border="0" cellpadding="0" cellspacing="0">
			  <tr>
			    {section name=snid loop=$subnav}
			    {if $subnav[snid].2 == 0}
			    <td><input type="submit" name="{$subnav[snid].0}" value="{$subnav[snid].1}" class="submit" disabled="disabled" /></td>
			    {else}
			    <td><input type="submit" name="{$subnav[snid].0}" value="{$subnav[snid].1}" class="submit" /></td>
			    {/if}
			    {/section}
			  </tr>
			</table>                                            	
		      </td>
		      <td align="right">
			<table border="0" cellpadding="10" cellspacing="0">
			  <tr>
			    {section name=id loop=$nav}
			    {if $nav[id].2 == 0}
			    <td><input type="submit" name="{$nav[id].0}" value="{$nav[id].1}" class="submit" disabled="disabled" /></td>
			    {else}
			    <td><input type="submit" name="{$nav[id].0}" value="{$nav[id].1}" class="submit" /></td>
			    {/if}
			    {/section}
			  </tr>
			</table>
		      </td>
		    </tr>
		  </table>
		</td>
	      </tr>
	      <tr>
		<td class="border"><img src="{$imgpathmaster}/space.gif" alt="" width="1" height="1"></td>
	      </tr>
	      <tr>
		<td align="center">
		  <table border="0" cellpadding="8" cellspacing="0">
		    <tr>
		      <td><a style="border:none;" href="http://www.moregroupware.org/" target="_blank"><img src="{$imgpathmaster}mgw_logo.gif" alt="" border="0"></a></td>
		    </tr>
		  </table>
		</td>
	      </tr>
	    </table>
	  </td>
	</tr>
      </table>
    </td>
    <td width="19" valign="bottom"></td>
  </tr>
</table>
<br />
</form>
</body>
</html>
