<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
    <head>
        <title>{$reportTitle}</title>
		<meta http-equiv="X-UA-Compatible" content="IE=7">
        {BEGIN style_block}
		<link type="text/css" href="styles/default.css" rel="stylesheet">
		<link type="text/css" href="styles/BoldAqua/style.css" rel="stylesheet">
		<!--[if IE]>
			<link REL="stylesheet" href="styles/defaultIE.css" type="text/css">
			<link REL="stylesheet" href="styles/BoldAqua/styleIE.css" type="text/css">
		<![endif]-->
        <style>
			.report	{font-size:11px}
            .report-title		{font:bold 12px arial, verdana, sans serif, helvetica;}
            table.report		{border-collapse: collapse; border: solid 2px #000;}
				table.report td	{padding: 2px; border: solid 1px #ccc;}
            .groupsummary		{border-bottom: solid 1px #000;}
            td.pagesummary		{background: #ffffbb;}
            td.globalsummary	{background: #ffe0b0;}
			.page-summary		{border-top: 4px double #333;}
			select.apply-style	{line-height: 1.4em; width: 90%;}
			.buttonborder 		{margin-right: 10px;}
			#wnd_header			{cursor: move;}
            {BEGIN group_field_colors}
            td.group_{$iteration},
            td.nbgroup_{$iteration}		{background: #{$color1};}
            td.header_{$iteration}		{background: #{$color2};}
            {END group_field_colors}			
            {$styleStr}
        </style>
		{$includes}
        {END style_block}
		
    </head>
	
    <body {$onload} class="BoldAqua">
{$header}
<div class="runner-s-grid BoldAqua">
        {BEGIN grid_block}
<table class="runner-b-report" style="margin:10px" width=95%>			
		<tr class="runner-toprow style1">
			<td class="runner-cl">
				<img src="images/spacer.gif">
			</td>
			<td class="runner-cc"></td>
			<td class="runner-cr">
			<img src="images/spacer.gif">
			</td>
		</tr>
		
		<tr class="runner-row style1">
			<td class="runner-cl"></td>
		{BEGIN data_block}
			<td class="runner-cc">
        <table class="report runner-b-report" width="100%" cellpadding="1" cellspacing="2" align="center" id="legend" {BEGIN legend_disp}style="display: none;"{END legend_disp}>
        {BEGIN grid_row}
        {BEGIN group}
        <!-- group headers -->
        {BEGIN newgroup}
        {BEGIN first_group_block}
	        <tr>
                {$first_group_html}
            </tr>
		{END first_group_block}
            <tr>
                {BEGIN group_headers}
                {BEGIN groups_equal_block}
                <td colspan="{$head_colspan}" groupname="{$groupId}" class="header_{$group_order} class{$groupId}g0f0u class{$groupId}g">
                    <font style="font-weight:900">{$grval}</font>
                </td>	
                {END groups_equal_block}
                {BEGIN groups_order_block}
                <td class="nbgroup_{$fieldId} class{$groupId}g class{$fieldId}f class{$groupId}g{$fieldId}f{$group_in_uniq}u" groupname="{$groupId}" fieldname="{$fieldId}" uniqe="{$group_in_uniq}" style="border-style:none;border-left:1px solid #cccccc;border-right:1px solid black;">&nbsp;</td>
                {END groups_order_block}
                {END group_headers}
            </tr>
            {END newgroup}
            <!--end group headers-->
            {END group}
            
            {BEGIN details_summary_block}
            <!-- data -->
            {BEGIN row_data}
            <tr>
                {BEGIN group}
                {BEGIN group_level}
                <td class="group_{$iteration} class{$groupIdCo}g class{$iteration}f class{$groupIdCo}g{$iteration}f0u" groupname="{$groupIdCo}" fieldname="{$iteration}" {$editattrs} style="border-top:none;border-bottom:none;border-right:solid 1px black;">{$group_field_value}</td>
				<!--
				Deprecated. 07.06.09 AGS.
				{BEGIN right_border}border-right:solid 1px black;{END right_border}
				-->				
                {END group_level}
                {BEGIN default_level}
                <td class="nbgroup_{$iteration} class{$groupIdCo}g class{$iteration}f class{$groupIdCo}g{$iteration}f{$group_in_uniq}u" groupname="{$groupIdCo}" fieldname="{$iteration}" uniqe="{$group_in_uniq}" {$editattrs} style="border-top:none;border-bottom:none;{BEGIN right_border}border-right:solid 1px black;{END right_border}{BEGIN left_border}border-left:solid 1px #cccccc;border-right:solid 1px black;{END left_border}">&nbsp;</td>
                {END default_level}
                {END group}
                
                {BEGIN not_group_fields_values}
                <td class="data class25g class{$fieldNum}f class25g{$fieldNum}f0u" groupname="25" fieldname="{$fieldNum}">{$field_value}</td>
                {END not_group_fields_values}
            </tr>
            {END row_data}
            <!--end data-->
            {END details_summary_block}
            
            {BEGIN group_summary_block}
            <!-- group summary -->
            <tr>
                {$td_columns}
                {BEGIN group_summary_totals}
                <td class="nbgroup_{$group_order} class{$groupIdSummary}g class{$groupIdSummary}g0f0u" groupname="{$groupIdSummary}" style="font-weight: bold; border-top: none;{BEGIN left_border}border-left:1px solid #000;{END left_border}" colspan={$colspan_expr}>
                    Resumen de {$label} {$grval} - {$total_cnt} Registros totales
                </td>
                {END group_summary_totals}
            </tr>
            <!--group sum-->
            {BEGIN sum_aggregation_block}
            <tr>
                {BEGIN group_summary_fields_sum}
                {BEGIN group_field_flag}
                <td class="group_{$group_order} class{$groupIdSum}g class{$iteration}f class{$groupIdSum}g{$iteration}f0u" groupname="{$groupIdSum}" fieldname="{$iteration}" style="border-top: none;{$left_border}">Sum</td>
                {END group_field_flag}
                {BEGIN sum_field_flag}
                <td class="group_{$group_order} class{$groupIdSum}g class{$iteration}f class{$groupIdSum}g{$iteration}f0u"  groupname="{$groupIdSum}" fieldname="{$iteration}">{$group_total_sum_value}</td>
                {END sum_field_flag}
                {BEGIN border_flag}
                <td class="group_{$iteration} class{$groupIdSum}g class{$iteration}f class{$groupIdSum}g{$iteration}f{$group_in_uniq}u" groupname="{$groupIdSum}" fieldname="{$iteration}" uniqe="{$group_in_uniq}" style="border-style:none;{$left_border}">&nbsp;</td>
                {END border_flag}
                {BEGIN default_flag}
                <td class="group_{$group_order} class{$groupIdSum}g class{$iteration}f class{$groupIdSum}g{$iteration}f0u" groupname="{$groupIdSum}" fieldname="{$iteration}">&nbsp;</td>
                {END default_flag}
                {END group_summary_fields_sum}
            </tr>
            {END sum_aggregation_block}
            <!--group avg-->
            {BEGIN avg_aggregation_block}
            <tr>
                {BEGIN group_summary_fields_avg}
                {BEGIN group_field_flag}
                <td class="group_{$group_order} class{$groupIdAvg}g class{$iteration}f class{$groupIdAvg}g{$iteration}f0u" groupname="{$groupIdAvg}" fieldname="{$iteration}" style="border-top: none;{$left_border}">Average</td>
                {END group_field_flag}
                {BEGIN avg_field_flag}
                <td class="group_{$group_order} class{$groupIdAvg}g class{$iteration}f class{$groupIdAvg}g{$iteration}f0u" groupname="{$groupIdAvg}" fieldname="{$iteration}">{$group_total_avg_value}</td>
                {END avg_field_flag}
                {BEGIN border_flag}
                <td class="group_{$iteration} class{$groupIdAvg}g class{$iteration}f class{$groupIdAvg}g{$iteration}f{$group_in_uniq}u" groupname="{$groupIdAvg}" fieldname="{$iteration}" uniqe="{$group_in_uniq}" style="border-style:none;{$left_border}">&nbsp;</td>
                {END border_flag}
                {BEGIN default_flag}
                <td class="group_{$group_order} class{$groupIdAvg}g class{$iteration}f class{$groupIdAvg}g{$iteration}f0u" groupname="{$groupIdAvg}" fieldname="{$iteration}">&nbsp;</td>
                {END default_flag}
                {END group_summary_fields_avg}
            </tr>
            {END avg_aggregation_block}
            <!--group min-->
            {BEGIN min_aggregation_block}
            <tr>
                {BEGIN group_summary_fields_min}
                {BEGIN group_field_flag}
                <td class="group_{$group_order} class{$groupIdMin}g class{$iteration}f class{$groupIdMin}g{$iteration}f0u" groupname="{$groupIdMin}" fieldname="{$iteration}" style="border-top: none;{$left_border}">Min</td>
                {END group_field_flag}
                {BEGIN min_field_flag}
                <td class="group_{$group_order} class{$groupIdMin}g class{$iteration}f class{$groupIdMin}g{$iteration}f0u" groupname="{$groupIdMin}" fieldname="{$iteration}">{$group_total_min_value}</td>
                {END min_field_flag}
                {BEGIN border_flag}
                <td class="group_{$iteration} class{$groupIdMin}g class{$iteration}f class{$groupIdMin}g{$iteration}f{$group_in_uniq}u" groupname="{$groupIdMin}" fieldname="{$iteration}" uniqe="{$group_in_uniq}" style="border-style:none;{$left_border}">&nbsp;</td>
                {END border_flag}
                {BEGIN default_flag}
                <td class="group_{$group_order} class{$groupIdMin}g class{$iteration}f class{$groupIdMin}g{$iteration}f0u" groupname="{$groupIdMin}" fieldname="{$iteration}">&nbsp;</td>
                {END default_flag}
                {END group_summary_fields_min}
            </tr>
            {END min_aggregation_block}
            <!--group max-->
            {BEGIN max_aggregation_block}
            <tr>
                {BEGIN group_summary_fields_max}
                {BEGIN group_field_flag}
                <td class="group_{$group_order} class{$groupIdMax}g class{$iteration}f class{$groupIdMax}g{$iteration}f0u" groupname="{$groupIdMax}" fieldname="{$iteration}" style="border-top: none;{$left_border}">Max</td>
                {END group_field_flag}
                {BEGIN max_field_flag}
                <td class="group_{$group_order} class{$groupIdMax}g class{$iteration}f class{$groupIdMax}g{$iteration}f0u" groupname="{$groupIdMax}" fieldname="{$iteration}">{$group_total_max_value}</td>
                {END max_field_flag}
                {BEGIN border_flag}
                <td class="group_{$iteration} class{$groupIdMax}g class{$iteration}f class{$groupIdMax}g{$iteration}f{$group_in_uniq}u" groupname="{$groupIdMax}" fieldname="{$iteration}" uniqe="{$group_in_uniq}" style="border-style:none;{$left_border}">&nbsp;</td>
                {END border_flag}
                {BEGIN default_flag}
                <td class="group_{$group_order} class{$groupIdMax}g class{$iteration}f class{$groupIdMax}g{$iteration}f0u" groupname="{$groupIdMax}" fieldname="{$iteration}">&nbsp;</td>
                {END default_flag}
                {END group_summary_fields_max}
            </tr>
            {END max_aggregation_block}
            <!--end group summary-->
            {END group_summary_block}
            <!--end grid row-->
            {END grid_row}
            
            {BEGIN summary_footer}
            <tr class="page-summary">
                {BEGIN page_order_fields}
                {BEGIN show}
                <td class="blackshade class40g class{$fieldId}f class40g{$fieldId}f0u" fieldname="{$fieldId}" groupname="40">{$label}</td>
                {END show}
                {END page_order_fields}
            </tr>
            {END summary_footer}
            
            {BEGIN page_summary_block}
            <!--page summary-->
            <tr>
                <td groupname="26" class="pagesummary class26g class26g0f0u" colspan={$testAgr}>Resumen de la pagina {$page_total_cnt} - Registros totales</td>
            </tr>
            <!--  sum -->
            {BEGIN sum_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_sum}
                {BEGIN first_field_flag}
                <td class="pagesummary class29g class1f class29g1f0u" groupname="29" fieldname="1">Sum</td>
                {END first_field_flag}
                {BEGIN sum_field_flag}
                <td class="pagesummary class29g class{$fieldId}f class29g{$fieldId}f0u" groupname="29" fieldname="{$fieldId}">{$page_total_sum}</td>
                {END sum_field_flag}
                {BEGIN default_flag}
                <td class="pagesummary class29g class{$fieldId}f class29g{$fieldId}f0u" groupname="29" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_sum}
            </tr>
            {END sum_aggregation_block}
            <!--  avg -->
            {BEGIN avg_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_avg}
                {BEGIN first_field_flag}
                <td class="pagesummary class30g class1f class30g1f0u" groupname="30" fieldname="1">Promedio</td>
                {END first_field_flag}
                {BEGIN avg_field_flag}
                <td class="pagesummary class30g class{$fieldId}f class30g{$fieldId}f0u" groupname="30" fieldname="{$fieldId}">{$page_total_avg}</td>
                {END avg_field_flag}
                {BEGIN default_flag}
                <td class="pagesummary class30g class{$fieldId}f class30g{$fieldId}f0u" groupname="30" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_avg}
            </tr>
            {END avg_aggregation_block}
            <!--  min -->
            {BEGIN min_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_min}
                {BEGIN first_field_flag}
                <td class="pagesummary class27g class1f class27g1f0u" groupname="27" fieldname="1">Min</td>
                {END first_field_flag}
                {BEGIN min_field_flag}
                <td class="pagesummary class27g class{$fieldId}f class27g{$fieldId}f0u" groupname="27" fieldname="{$fieldId}">{$page_total_min}</td>
                {END min_field_flag}
                {BEGIN default_flag}
                <td class="pagesummary class27g class{$fieldId}f class27g{$fieldId}f0u" groupname="27" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_min}
            </tr>
            {END min_aggregation_block}
            <!--  max -->
            {BEGIN max_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_max}
                {BEGIN first_field_flag}
                <td class="pagesummary class28g class1f class28g{$fieldId}f0u" groupname="28" fieldname="1">Max</td>
                {END first_field_flag}
                {BEGIN max_field_flag}
                <td class="pagesummary class28g class{$fieldId}f class28g{$fieldId}f0u" groupname="28" fieldname="{$fieldId}">{$page_total_max}</td>
                {END max_field_flag}
                {BEGIN default_flag}
                <td class="pagesummary class28g class{$fieldId}f class28g{$fieldId}f0u" groupname="28" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_max}
            </tr>
            {END max_aggregation_block}
            <!--end page summary-->
            {END page_summary_block}
            
            {BEGIN global_summary_block}
            <!--------------------------------------global summary-------------------------------------------->
            <tr>
                <td class="globalsummary class31g class31g0f0u" groupname="31" colspan={$testAgr}>Resumen global {$global_total_cnt} - Registros totales</td>
            </tr>
            <!-- sum -->
            {BEGIN sum_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_sum}
                {BEGIN first_field_flag}
                <td class="globalsummary class34g class1f class34g1f0u" groupname="34" fieldname="1">Sum</td>
                {END first_field_flag}
                {BEGIN sum_field_flag}
                <td class="globalsummary class34g class{$fieldId}f class34g{$fieldId}f0u" groupname="34" fieldname="{$fieldId}">{$global_total_sum}</td>
                {END sum_field_flag}
                {BEGIN default_flag}
                <td class="globalsummary class34g class{$fieldId}f class34g{$fieldId}f0u" groupname="34" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_sum}
            </tr>
            {END sum_aggregation_block}
            <!-- avg -->
            {BEGIN avg_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_avg}
                {BEGIN first_field_flag}
                <td class="globalsummary class35g class1f class35g1f0u" groupname="35" fieldname="1">Promedio</td>
                {END first_field_flag}
                {BEGIN avg_field_flag}
                <td class="globalsummary class35g class{$fieldId}f class35g{$fieldId}f0u" groupname="35" fieldname="{$fieldId}">{$global_total_avg}</td>
                {END avg_field_flag}
                {BEGIN default_flag}
                <td class="globalsummary class35g class{$fieldId}f class35g{$fieldId}f0u" groupname="35" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_avg}
            </tr>
            {END avg_aggregation_block}
            <!-- min -->
            {BEGIN min_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_min}
                {BEGIN first_field_flag}
                <td class="globalsummary class32g class1f class32g1f0u" groupname="32" fieldname="1">Min</td>
                {END first_field_flag}
                {BEGIN min_field_flag}
                <td class="globalsummary class32g class{$fieldId}f class32g{$fieldId}f0u" groupname="32" fieldname="{$fieldId}">{$global_total_min}</td>
                {END min_field_flag}
                {BEGIN default_flag}
                <td class="globalsummary class32g class{$fieldId}f class32g{$fieldId}f0u" groupname="32" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_min}
            </tr>
            {END min_aggregation_block}
            <!-- max -->
            {BEGIN max_aggregation_block}
            <tr>
                {BEGIN page_summary_fields_max}
                {BEGIN first_field_flag}
                <td class="globalsummary class33g class1f class33g1f0u" groupname="33" fieldname="1">Max</td>
                {END first_field_flag}
                {BEGIN max_field_flag}
                <td class="globalsummary class33g class{$fieldId}f class33g{$fieldId}f0u" groupname="33" fieldname="{$fieldId}">{$global_total_max}</td>
                {END max_field_flag}
                {BEGIN default_flag}
                <td class="globalsummary class33g class{$fieldId}f class33g{$fieldId}f0u" groupname="33" fieldname="{$fieldId}">&nbsp;</td>
                {END default_flag}
                {END page_summary_fields_max}
            </tr>
            {END max_aggregation_block}
            <!--end global summary-->
            {END global_summary_block}
       </table>
			</td>
			{END data_block}
			{BEGIN message_block}
			<td class="runner-cc" style="text-align:center"><span><div class="runner-message">{$message}</div></span>
			</td>
			{END message_block}
			<td class="runner-cr"></td>
		</tr>
		<tr class="runner-bottomrow style1">
			<td class="runner-cl">
				<img src="images/spacer.gif">
			</td>
			<td class="runner-cc"></td>
			<td class="runner-cr">
			<img src="images/spacer.gif">
			</td>
		</tr>
</table>		
		</div>        
		<div id="location" src={$reportName} style="display: none;"></div>
        {END grid_block}
        
	</div>	
{$footer}	
</body>
</html>