/* 
   This Javascript code was generated by Jemplate, the Javascript
   Template Toolkit. Any changes made to this file will be lost the next
   time the templates are compiled.

   Copyright 2006 - Ingy döt Net - All rights reserved.
*/

if (typeof(Jemplate) == 'undefined')
    throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['gamelist.html'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<table border="0" cellpadding="0" cellspacing="0" width="550">\r\n  <tr>\r\n	<th colspan="10" align="center">Games</th>\r\n  </tr>\r\n  <tr>\r\n	<th>#</th>\r\n	<th>name</th>\r\n	<th>players</th>\r\n	<th>%</th>\r\n	<th>servers</th>\r\n	<th>%</th>\r\n	<th>&nbsp;</th>\r\n  </tr>\r\n  ';
//line 24 "gamelist.html"

// FOREACH 
(function() {
    var list = stash.get('mods');
    list = new Jemplate.Iterator(list);
    var retval = list.get_first();
    var value = retval[0];
    var done = retval[1];
    var oldloop;
    try { oldloop = stash.get('loop') } finally {}
    stash.set('loop', list);
    try {
        while (! done) {
            stash.data['type'] = value;
output += '\r\n  <tr>\r\n	<td>';
//line 16 "gamelist.html"
output += stash.get(['type', 0, 0, 0]);
output += '</td>\r\n	<td><a href="mods.html?g=';
//line 17 "gamelist.html"
output += stash.get(['type', 0, 8, 0]);
output += '">';
//line 17 "gamelist.html"
output += stash.get(['type', 0, 1, 0]);
output += '</a></td>\r\n	<td>';
//line 18 "gamelist.html"
output += stash.get(['type', 0, 2, 0]);
output += '</td>\r\n	<td>';
//line 19 "gamelist.html"
output += stash.get(['type', 0, 3, 0]);
output += '</td>\r\n	<td>';
//line 20 "gamelist.html"
output += stash.get(['type', 0, 4, 0]);
output += '</td>\r\n	<td>';
//line 21 "gamelist.html"
output += stash.get(['type', 0, 5, 0]);
output += '</td>\r\n	<td><img src="http://img.serverspy.net/images/y-shim.gif" width="';
//line 22 "gamelist.html"
output += stash.get(['type', 0, 6, 0]);
output += '" HEIGHT="10"><img src="http://img.serverspy.net/images/3/g-shim.gif" width="';
//line 22 "gamelist.html"
output += stash.get(['type', 0, 7, 0]);
output += '" height="10"></td>\r\n  </tr>\r\n  ';;
            retval = list.get_next();
            var value = retval[0];
            var done = retval[1];
        }
    }
    catch(e) {
        throw(context.set_error(e, output));
    }
    stash.set('loop', oldloop);
})();

output += '\r\n</table>';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['modlist.html'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<table border="0" cellpadding="0" cellspacing="0" width="550">\r\n  <tr>\r\n	<th colspan="10" align="center">';
//line 3 "modlist.html"
output += stash.get('gamename');
output += ' Mods</th>\r\n  </tr>\r\n  <tr>\r\n	<th>#</th>\r\n	<th>name</th>\r\n	<th>players</th>\r\n	<th>%</th>\r\n	<th>servers</th>\r\n	<th>%</th>\r\n	<th>&nbsp;</th>\r\n  </tr>\r\n  ';
//line 24 "modlist.html"

// FOREACH 
(function() {
    var list = stash.get('mods');
    list = new Jemplate.Iterator(list);
    var retval = list.get_first();
    var value = retval[0];
    var done = retval[1];
    var oldloop;
    try { oldloop = stash.get('loop') } finally {}
    stash.set('loop', list);
    try {
        while (! done) {
            stash.data['type'] = value;
output += '\r\n  <tr>\r\n	<td>';
//line 16 "modlist.html"
output += stash.get(['type', 0, 0, 0]);
output += '</td>\r\n	<td><a href="modstats.html?g=';
//line 17 "modlist.html"
output += stash.get('gameid');
output += '&mod=';
//line 17 "modlist.html"
output += stash.get(['type', 0, 1, 0]);
output += '">';
//line 17 "modlist.html"
output += stash.get(['type', 0, 1, 0]);
output += '</a></td>\r\n	<td>';
//line 18 "modlist.html"
output += stash.get(['type', 0, 2, 0]);
output += '</td>\r\n	<td>';
//line 19 "modlist.html"
output += stash.get(['type', 0, 3, 0]);
output += '</td>\r\n	<td>';
//line 20 "modlist.html"
output += stash.get(['type', 0, 4, 0]);
output += '</td>\r\n	<td>';
//line 21 "modlist.html"
output += stash.get(['type', 0, 5, 0]);
output += '</td>\r\n	<td><img src="http://img.serverspy.net/images/y-shim.gif" width="';
//line 22 "modlist.html"
output += stash.get(['type', 0, 6, 0]);
output += '" HEIGHT="10"><img src="http://img.serverspy.net/images/3/g-shim.gif" width="';
//line 22 "modlist.html"
output += stash.get(['type', 0, 7, 0]);
output += '" height="10"></td>\r\n  </tr>\r\n  ';;
            retval = list.get_next();
            var value = retval[0];
            var done = retval[1];
        }
    }
    catch(e) {
        throw(context.set_error(e, output));
    }
    stash.set('loop', oldloop);
})();

output += '\r\n</table>';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

