skip navigation
Gallaudet

Gallaudet

Apprentice

Sat, Sep. 21, 2019 1:00 PM EDT

Live statistics will be available at the start of the event in:


Overview

Gallaudet

Team Record Conf. Record Last Game
0-1 0-0 L, 20-14 vs. Alvernia

Apprentice

Team Record Conf. Record Last Game
1-0 0-0 W, 23-8 vs. Greensboro

Team Comparison

Gallaudet
based on 1 games

Total Offensive Yards

266.0

90.0
Pass
176.0
Rush

Total Yards Allowed

307.0

140.0
Pass
167.0
Rush

Apprentice
based on 1 games

Total Offensive Yards

460.0

358.0
Pass
102.0
Rush

Total Yards Allowed

308.0

222.0
Pass
86.0
Rush


14.0PPG23.0
20.0PPGA8.0

Key Contributors


passing leaders

There was a problem with a Velocity script
Pagestatcrew-fbxml-template
ErrorError invoking method 'get(java.lang.Integer)' in java.util.ArrayList at statcrew-fbxml-template[line 448, column 88]
Page source:
1: ## FOOTBAL BOX SCORE
2: ##
3: #if ($stats.view == "pt")
4:     ## CONFIGURATION
5:     $website.include("options")
6:     #set ($options = $request.getAttribute("options"))
7:     #set ($locale = "en_us")
8:     #set ($locale = $options.get("locale"))
9:     #set ($pregame = $stats.pregame)
10:     #set ($startTime = $document.getRootElement().valueOf("network/@startTime"))
11:     #if ($document.getRootElement().valueOf("network/@tba") == 'Y')
12:         #set ($tba = true)
13:     #else
14:         #set ($tba = false)
15:     #end
16:     #set ($location = $document.getRootElement().valueOf("network/@location"))
17:     #set ($localDate = $document.getRootElement().valueOf("network/@localDate"))
18:     #set ($localTime = $document.getRootElement().valueOf("network/@localTime"))
19:     #if ($location != '')
20:         #set ($neutral = true)
21:     #else
22:         #set ($neutral = false)
23:     #end
24:     #if ($request.getParameter("paused") == 'y')
25:         #set ($paused = true)
26:     #else
27:         #set ($paused = false)
28:     #end
29: 
30:     #if ($pregame)
31:         #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
32:         #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
33: 
34:         #if ($!options.get("primetime_preview_hide").equalsIgnoreCase("hide"))
35:             #set ($shouldStatsShow = false)
36:         #else
37:             #set ($shouldStatsShow = $preview.shouldStatsShow($homeTeamId,$visitorTeamId))
38:         #end
39:     #end
40: 
41:     <head>
42:     
43:     <script type="text/javascript" src='$website.cdn("/info/jquery-2.1.1.js")'></script>
44:     <script type="text/javascript" src='$website.cdn("/info/notifications/jquery.noty.packaged.min.js")'></script>
45:     <script type="text/javascript" src='$website.cdn("/info/dataTables/js/jquery.dataTables.js")'></script>
46:     <script type="text/javascript" src='$website.cdn("/info/momentjs/moment.js")'></script>
47:     <script type="text/javascript" src='$website.cdn("/info/primetime3/js/full_screen_api.js")'></script>
48:     <script type="text/javascript" src='$website.cdn("/info/primetime3/js/flipclock.min.js")'></script>
49: 
50:     $website.addCss($website.cdn("/info/dataTables/css/jquery.dataTables.css"))
51:     $website.addCss($website.cdn("/info/primetime3/css/flipclock.css"))
52: 
53:     <script type="text/javascript" src="/info/primetime3/js/pt3-embed.js"></script>
54: 
55:     <script type="text/javascript">var jQuery_2_1 = $.noConflict(true);</script>
56:     <script type="text/javascript" src="/info/primetime3/js/add-ons.js"></script>
57:     <script type="text/javascript" src="/info/primetime3/js/pt3-util.js"></script>
58: 
59:     <script src="/info/primetime3/js/highcharts-custom.js"></script>
60: 
61:     <script type="text/javascript" src="/info/primetime3/js/pt3-preview-charts.js"></script>
62: 
63:     $website.addCss("/info/primetime3/css/pt3-styles.css")
64:     $website.addCss("/info/primetime3/css/pt3-responsive.css")
65: 
66:     <script type="text/javascript" src="/info/primetime3/js/restive.js"></script>
67:     <script type="text/javascript" src="/info/primetime3/js/pt3-restive.js"></script>
68: 
69:         <script type="text/javascript">
70:             var conf = new Object();
71:             conf.locale = '${locale}';
72:             conf.videoProvider = '${videoProvider}';
73:             conf.videoId = '${videoId}';
74:             conf.eventId = '$document.valueOf("fbgame/network/@eventId")';
75:             conf.eventIdHashCode = '$eventIdHashCode';
76:             conf.statusFinal = '$stats.final';
77:             conf.startTime = '$startTime';
78:             conf.pregame = $pregame;
79:             conf.tba = $tba;
80:             conf.localDate = '$localDate';
81:             conf.localTime = '$localTime';
82: 			conf.visitor = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='V']/@name"))}';
83: 			conf.home = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='H']/@name"))}';
84:             conf.visitorTeamLogo = '$stats.visitorTeamLogo';
85:             conf.homeTeamLogo = '$stats.homeTeamLogo';
86:             conf.visitorTeamColor = '#121212';
87:             conf.homeTeamColor = '#6D6D6D';
88:             conf.currentDate = new Date();
89:             conf.neutral = $neutral;
90:             conf.paused = $paused;
91: 
92:             conf.visitorTeamLighterColor = $.fn.increase_brightness(conf.visitorTeamColor, 30);
93:             conf.homeTeamLighterColor = $.fn.increase_brightness(conf.homeTeamColor, 30);
94:         </script>
95: 
96:         <script type="text/javascript" src="/info/primetime3/js/pt3-boxscore-client.js"></script>
97:         <script type="text/javascript" src="/info/primetime3/js/pt3-fball-template.js"></script>    
98:     </head>
99: 
100:     #if ($pregame && !$shouldStatsShow)
101:     <div id="primetime-wrapper" class="primetime-pre-game clearfix">
102:         <div class="primetime-overflow clearfix">
103:             <div id="primetime-header" class="grid-row">
104:                 <div class="grid-col grid-col-hdr">
105: 
106:                     <div class="pt-header clearfix">
107:                         <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
108:                             <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
109:                             <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
110:                         </div>
111: 
112:                         <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
113:                             <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
114:                             <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
115:                         </div>
116: 
117:                         <div class="pt-match-scoreboard clearfix">
118:                             <div class="pt-mtach-info pt-pregame">
119:                                 <center>
120:                                     <div>
121:                                         $localDate <br>
122:                                         #if ($tba)
123:                                             TBA
124:                                         #else
125:                                             $localTime
126:                                         #end
127:                                     </div>
128:                                 </center>
129:                             </div>
130:                         </div>
131:                     </div>
132:                 </div>
133:             </div>
134:             <div class="grid-row-container clearfix">
135:                 <div class="grid-row">
136:                     <div class="content">
137:                         <div class="pt-last-play clearfix" style="display: none">
138:                                         <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
139:                                             This event doesn't have a set start time, but PrimeTime will be available once the event begins.
140:                                         </span>
141:                         </div>
142:                         <div class="text">
143:                             <h3>
144:                                 Live statistics will be available at the start of the event in:
145:                             </h3>
146:                             <center>
147:                                 <div class="clock"></div><br/>
148:                                 #if ($tba)
149:                                     Days
150:                                 #end
151:                             </center>
152:                         </div>
153:                     </div>
154:                 </div>
155:                 <div class="pt-game-info grid-row clearfix">
156:                     <div class="pt-tabs-panes clearfix">
157:                         <div id="stats-tabs" class="pt-tabs-pane clearfix">
158:                             <div id="divGameInformation" class="grid-row">
159:                                 <div class="grid-col grid-col-gi grid-col1">
160:                                     <h3 class="grid-title">
161:                                         Game Information
162:                                     </h3>
163:                                     <div class="grid-content clearfix">
164:                                         <div class="pt-game-information clearfix">
165:                                             <div class="pt-row clearfix">
166:                                                 <center>
167:                                                     <div class="game-location pt-col">
168:                                                                 <span class="date">
169:                                                                     $localDate<br />
170:                                                                     #if ($tba)
171:                                                                         TBA
172:                                                                     #else
173:                                                                         $localTime
174:                                                                     #end
175:                                                                 </span>
176:                                                         <h3>Date & Time</h3>
177:                                                     </div>
178:                                                     #if ($location != '')
179:                                                         <div class="game-venue pt-col">
180:                                                                 <span class="venue">
181:                                                                     $location<br />
182:                                                                     (Neutral)
183:                                                                 </span>
184:                                                             <h3>Location</h3>
185:                                                         </div>
186:                                                     #end
187:                                                 </center>
188:                                             </div>
189:                                         </div>
190:                                     </div>
191:                                 </div>
192:                             </div>
193:                         </div>
194:                     </div>
195:                 </div>
196:             </div>
197: 
198:             <div id="primetime-footer" class="grid-row">
199:                 <div class="grid-col grid-col-ftr">
200:                     <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
201:                 </div>
202:             </div>
203:         </div>
204:     ## GENERAL INFORMATION
205:     </div>
206:     #elseif ($pregame && $shouldStatsShow)
207:         #set ($teamStats = ["ppg", "ptspgopp", "ydpg", "pypg", "rypg", "ypgopp", "pygopp", "rygopp", "pyd", "ryd", "wyd"])
208:         #set ($topStats = ["pyd", "ryd", "wyd"])
209:         
210:         #set ($visitorStats = $preview.getTeam($visitorTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
211:         #set ($homeStats = $preview.getTeam($homeTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
212:         
213:         <div id="primetime-wrapper" class="primetime-pre-game primetime-football clearfix">
214:             <div class="primetime-overflow clearfix">
215:                 <div id="primetime-header" class="grid-row">
216:                     <div class="grid-col grid-col-hdr">
217: 
218:                         <div class="pt-header clearfix">
219:                             <div class="pt-team pt-team-away
220:                             visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
221:                                 <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
222:                                 <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
223:                             </div>
224: 
225:                             <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
226:                                 <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
227:                                 <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
228:                             </div>
229: 
230:                             <div class="pt-match-scoreboard clearfix">
231:                                 <div class="pt-mtach-info pt-pregame">
232:                                     <center>
233:                                         <div>
234:                                             $localDate
235:                                             #if ($tba)
236:                                                 TBA
237:                                             #else
238:                                                 $localTime
239:                                             #end
240:                                         </div>
241:                                     </center>
242:                                 </div>
243:                             </div>
244:                         </div>
245:                     </div>
246:                 </div>
247:                 <div class="grid-row-container clearfix">
248:                     <div class="grid-row preview">
249:                         <div class="content grid-col grid-col-e">
250:                             <div class="pt-last-play clearfix" style="display: none">
251:                                     <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
252:                                         This event doesn't have a set start time, but PrimeTime will be available once the event begins.
253:                                     </span>
254:                             </div>
255:                             <div class="text">
256:                                 <h3>
257:                                     Live statistics will be available at the start of the event in:
258:                                 </h3>
259:                                 <center>
260:                                     <div class="clock"></div><br/>
261:                                     #if ($tba)
262:                                         Days
263:                                     #end
264:                                 </center>
265:                             </div>
266:                         </div>
267:                     </div>
268: 
269:                     <!-- Team Overview -->
270:                     <div class="grid-row pt-overview">
271:                         <h2>Overview</h2>
272:                         <div class="grid-col grid-col-e grid-col2 background-black">
273:                             <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
274:                             <div class="container clearfix pt-live-action">
275:                                 <table>
276:                                     <thead>
277:                                     <tr>
278:                                         <th>Team Record</th>
279:                                         <th>Conf. Record</th>
280:                                         <th>Last Game</th>
281:                                     </tr>
282:                                     </thead>
283:                                     <tbody>
284:                                     <tr>
285:                                         <td>${visitorStats.overallRecord}</td>
286:                                         <td>${visitorStats.conferenceRecord}</td>
287:                                         <td style="text-align: center">
288:                                             ${visitorStats.lastGame.APResult}
289:                                             <span>
290:                                                 #if ($visitorStats.lastGame.neutralSite.length() > 0 || $visitorStats.lastGame.home)
291:                                                     vs.
292:                                                 #else
293:                                                     at
294:                                                 #end
295:                                                 ${visitorStats.lastGame.opponent.name}
296:                                             </span>
297:                                         </td>
298:                                     </tr>
299:                                     </tbody>
300:                                 </table>
301:                             </div>
302:                             <br />
303:                         </div>
304:                         <div class="grid-col grid-col-e grid-col2
305:                         background-gray">
306:                             <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
307:                             <div class="pt-live-action">
308:                                 <table>
309:                                     <thead>
310:                                     <tr>
311:                                         <th>Team Record</th>
312:                                         <th>Conf. Record</th>
313:                                         <th>Last Game</th>
314:                                     </tr>
315:                                     </thead>
316:                                     <tbody>
317:                                     <tr>
318:                                         <td>${homeStats.overallRecord}</td>
319:                                         <td>${homeStats.conferenceRecord}</td>
320:                                         <td style="text-align: center">
321:                                             ${homeStats.lastGame.APResult}
322:                                             <span>
323:                                                 #if ($homeStats.lastGame.neutralSite.length() > 0 || $homeStats.lastGame.home)
324:                                                     vs.
325:                                                 #else
326:                                                     at
327:                                                 #end
328:                                                 ${homeStats.lastGame.opponent.name}
329:                                             </span>
330:                                         </td>
331:                                     </tr>
332:                                     </tbody>
333:                                 </table>
334:                             </div>
335:                             <br />
336:                         </div>
337:                     </div>
338: 
339: 
340:                     <!-- Team Comaprison -->
341:                     <div class="grid-row">
342:                         <div class="grid-col team-compare">
343:                             <h2>Team Comparison</h2>
344:                             <div class="grid-col">
345:                                 <div class="grid-col-e left">
346:                                     <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")<br/><small>based on ${visitorStats.gamesPlayed} games</small></h3>
347:                                     <div class="chart-container">
348:                                         <h3>Total Offensive Yards</h3>
349:                                         <h3 class="stat-total-value">${formatter.formatNumber($visitorStats.teamStats['ydpg'], $formats.get('ydpg'))}</h3>
350:                                         <div class="stats-chart ts-voff"></div>
351:                                         <div class="stats-values">
352:                                             <div class="stats-value visitor light">
353:                                                 ${formatter.formatNumber($visitorStats.teamStats['pypg'], $formats.get('pypg'))}<br />
354:                                                 <span class="stats-label">Pass</span>
355:                                             </div>
356:                                             <div class="stats-value visitor">
357:                                                 ${formatter.formatNumber($visitorStats.teamStats['rypg'], $formats.get('rypg'))}<br />
358:                                                 <span class="stats-label">Rush</span>
359:                                             </div>
360:                                         </div>
361:                                     </div>
362:                                     <div class="chart-container">
363:                                         <h3>Total Yards Allowed</h3>
364:                                         <h3 class="stat-total-value">${formatter.formatNumber($visitorStats.teamStats['ypgopp'], $formats.get('ypgopp'))}</h3>
365:                                         <div class="stats-chart ts-vdef"></div>
366:                                         <div class="stats-values">
367:                                             <div class="stats-value visitor light">
368:                                                 ${formatter.formatNumber($visitorStats.teamStats['pygopp'], $formats.get('pygopp'))}<br />
369:                                                 <span class="stats-label">Pass</span>
370:                                             </div>
371:                                             <div class="stats-value visitor">
372:                                                 ${formatter.formatNumber($visitorStats.teamStats['rygopp'], $formats.get('rygopp'))}<br />
373:                                                 <span class="stats-label">Rush</span>
374:                                             </div>
375:                                         </div>
376:                                     </div>
377:                                 </div>
378:                                 <div class="grid-col-e right">
379:                                 <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")<br/><small>based on ${homeStats.gamesPlayed} games</small></h3>
380:                                 <div class="chart-container">
381:                                     <h3>Total Offensive Yards</h3>
382:                                     <h3 class="stat-total-value">${formatter.formatNumber($homeStats.teamStats['ydpg'], $formats.get('ydpg'))}
383:                                     </h3>
384:                                     <div class="stats-chart ts-hoff"></div>
385:                                     <div class="stats-values">
386:                                         <div class="stats-value home light">
387:                                             ${formatter.formatNumber($homeStats.teamStats['pypg'], $formats.get('pypg'))}<br />
388:                                             <span class="stats-label">Pass</span>
389:                                         </div>
390:                                         <div class="stats-value home">
391:                                             ${formatter.formatNumber($homeStats.teamStats['rypg'], $formats.get('rypg'))}<br />
392:                                             <span class="stats-label">Rush</span>
393:                                         </div>
394:                                     </div>
395:                                 </div>
396:                                 <div class="chart-container">
397:                                     <h3>Total Yards Allowed</h3>
398:                                     <h3 class="stat-total-value">${formatter.formatNumber($homeStats.teamStats['ypgopp'], $formats.get('ypgopp'))}</h3>
399:                                     <div class="stats-chart ts-hdef"></div>
400:                                     <div class="stats-values">
401:                                         <div class="stats-value home light">
402:                                             ${formatter.formatNumber($homeStats.teamStats['pygopp'], $formats.get('pygopp'))}<br />
403:                                             <span class="stats-label">Pass</span>
404:                                         </div>
405:                                         <div class="stats-value home">
406:                                             ${formatter.formatNumber($homeStats.teamStats['rygopp'], $formats.get('rygopp'))}<br />
407:                                             <span class="stats-label">Rush</span>
408:                                         </div>
409:                                     </div>
410:                                 </div>
411:                             </div>
412:                             </div>
413:                             <div class="clearfix"></div>
414:                             <br /><br />
415: 
416:                             <div class="game-leaders">
417:                                 <div class="top">
418:                                     <div class="charts">
419:                                         <div class="chart">
420:                                             <div class="stats-chart visitor points-per-game"></div>
421:                                             <div class="label"><span>${formatter.formatNumber($visitorStats.teamStats['ppg'], $formats.get('ppg'))}</span><span class="title">PPG</span><span>${formatter.formatNumber($homeStats.teamStats['ppg'], $formats.get('ppg'))}</span></div>
422:                                             <div class="stats-chart home points-per-game"></div>
423:                                         </div>
424:                                         <div class="chart">
425:                                             <div class="stats-chart visitor points-allowed-per-game"></div>
426:                                             <div class="label"><span>${formatter.formatNumber($visitorStats.teamStats['ptspgopp'], $formats.get('ptspgopp'))}</span><span class="title">PPGA</span><span>${formatter.formatNumber($homeStats.teamStats['ptspgopp'], $formats.get('ptspgopp'))}</span></div>
427:                                             <div class="stats-chart home points-allowed-per-game"></div>
428:                                         </div>
429:                                     </div>
430:                                 </div>
431:                             </div>
432:                         </div>
433:                     </div>
434: 
435:                     <!-- Key Contributors -->
436: 
437:                     <div class="grid-row">
438:                         <div class="grid-col grid-col1 game-leaders grid-col">
439:                             <h2>Key Contributors</h2>
440:                                 #macro (gameLeaders $category $label $visitorPlayers $homePlayers)
441:                                     <div class="game-leaders">
442:                                         <br/>
443:                                         <h3>$label</h3>
444:                                         <div class="grid-col top1">
445:                                             <div class="grid-col charts">
446:                                                 #foreach ($i in [0..1])
447:                                                     #set ($visitorTopPlayer = $visitorPlayers[$i])
448:                                                     #set ($homeTopPlayer = $homePlayers[$i])
449:                                                     <div class="grid-col chart">
450:                                                         <div class="stats-player visitor">
451:                                                             <div class="player-name">${visitorTopPlayer.firstName} ${visitorTopPlayer.lastName}</div>
452:                                                             <div class="stats-chart visitor ${category}-top${i}"></div>
453:                                                         </div>
454:                                                         <!-- Using the format '#' directly since the wyg has set 0.0 as format on the stats metadata object -->
455:                                                         <div class="label"><span>${formatter.formatNumber($visitorTopPlayer.stats[$category],'#')}</span><span class="title"></span><span>${formatter.formatNumber($homeTopPlayer.stats[$category], '#')}</span></div>
456:                                                         <div class="stats-player home">
457:                                                             <div class="player-name">${homeTopPlayer.firstName} ${homeTopPlayer.lastName}</div>
458:                                                             <div class="stats-chart home ${category}-top${i}"></div>
459:                                                         </div>
460:                                                     </div>
461:                                                 #end
462:                                             </div>
463:                                         </div>
464:                                     </div>
465:                                 #end
466: 
467:                                 #gameLeaders('pyd' 'passing leaders' $visitorStats.topStats['pyd'] $homeStats.topStats['pyd'])
468:                                 #gameLeaders('ryd' 'rushing leaders' $visitorStats.topStats['ryd'] $homeStats.topStats['ryd'])
469:                                 #gameLeaders('wyd' 'receiving leaders' $visitorStats.topStats['wyd'] $homeStats.topStats['wyd'])
470:                             </div>
471: 
472:                             <div class="legend grid-col clearfix">
473:                                 <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
474:                                 <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
475:                             </div>
476:                         </div>
477:                     </div>
478: 
479: 
480:                     <div class="pt-game-info grid-row clearfix">
481:                         <div class="pt-tabs-panes clearfix">
482:                             <div id="stats-tabs" class="pt-tabs-pane clearfix">
483:                                 <div id="divGameInformation" class="grid-row">
484:                                     <div class="grid-col grid-col-gi grid-col1">
485:                                         <h2 class="grid-title">
486:                                             Game Information
487:                                         </h2>
488:                                         <div class="grid-content clearfix">
489:                                             <div class="pt-game-information clearfix">
490:                                                 <div class="pt-row clearfix">
491:                                                     <center>
492:                                                         <div class="game-location pt-col">
493:                                                             <span class="date">
494:                                                                 $localDate<br />
495:                                                                 #if ($tba)
496:                                                                     TBA
497:                                                                 #else
498:                                                                     $localTime
499:                                                                 #end
500:                                                             </span>
501:                                                             <h3>Date & Time</h3>
502:                                                         </div>
503:                                                         #if ($location != '')
504:                                                             <div class="game-venue pt-col">
505:                                                             <span class="venue">
506:                                                                 $location<br />
507:                                                                 (Neutral)
508:                                                             </span>
509:                                                                 <h3>Location</h3>
510:                                                             </div>
511:                                                         #end
512:                                                     </center>
513:                                                 </div>
514:                                             </div>
515:                                         </div>
516:                                     </div>
517:                                 </div>
518:                             </div>
519:                         </div>
520:                     </div>
521:                 </div>
522: 
523:                 <div id="primetime-footer" class="grid-row">
524:                     <div class="grid-col grid-col-ftr">
525:                         <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
526:                     </div>
527:                 </div>
528:             </div>
529: 
530:             <script type="text/javascript">
531:                 (function($) {
532:                     $(document).ready(function() {
533:                         Highcharts.setOptions({
534:                             colors: [conf.visitorTeamColor, conf.visitorTeamLighterColor]
535:                         });
536:                         $.fn.buildDonutChart('.stats-chart.ts-voff', ${visitorStats.teamStats['pypg']}, ${visitorStats.teamStats['rypg']}, conf.visitorTeamLighterColor);
537:                         $.fn.buildDonutChart('.stats-chart.ts-vdef', ${visitorStats.teamStats['pygopp']}, ${visitorStats.teamStats['rygopp']}, conf.visitorTeamLighterColor);
538: 
539:                         Highcharts.setOptions({
540:                             colors: [conf.homeTeamColor, conf.homeTeamLighterColor]
541:                         });
542:                         $.fn.buildDonutChart('.stats-chart.ts-hoff', ${homeStats.teamStats['pypg']}, ${homeStats.teamStats['rypg']}, conf.homeTeamLighterColor);
543:                         $.fn.buildDonutChart('.stats-chart.ts-hdef', ${homeStats.teamStats['pygopp']}, ${homeStats.teamStats['rygopp']}, conf.homeTeamLighterColor);
544: 
545:                         Highcharts.setOptions({
546:                             colors: [conf.homeTeamColor, conf.visitorTeamColor]
547:                         });
548: 
549:                         $.fn.buildVisitorBarChart('.top .visitor.points-per-game', ${visitorStats.teamStats['ppg']}, 40.0, conf.visitorTeamLighterColor);
550:                         $.fn.buildHomeBarChart('.top .home.points-per-game', ${homeStats.teamStats['ppg']}, 40.0, conf.homeTeamLighterColor);
551: 
552:                         $.fn.buildVisitorBarChart('.top .visitor.points-allowed-per-game', ${visitorStats.teamStats['ptspgopp']}, 40.0, conf.visitorTeamLighterColor);
553:                         $.fn.buildHomeBarChart('.top .home.points-allowed-per-game', ${homeStats.teamStats['ptspgopp']}, 40.0, conf.homeTeamLighterColor);
554: 
555:                         #macro (playerStatsScript $category $visitorPlayers $homePlayers $visitorLimit $homeLimit)
556:                             #foreach ($i in [0..1])
557:                                 #set ($visitorTopPlayer = $visitorPlayers[$i])
558:                                 #set ($homeTopPlayer = $homePlayers[$i])
559:                                 $.fn.buildVisitorBarChart('.${category}-top${i}.visitor', ${visitorTopPlayer.stats[$category]}, $visitorLimit, conf.visitorTeamLighterColor);
560:                                 $.fn.buildHomeBarChart('.${category}-top${i}.home', ${homeTopPlayer.stats[$category]}, $homeLimit, conf.homeTeamLighterColor);
561:                             #end
562:                         #end
563: 
564:                         #playerStatsScript('pyd' $visitorStats.topStats['pyd'] $homeStats.topStats['pyd'] $visitorStats.teamStats['pyd'] $homeStats.teamStats['pyd'])
565:                         #playerStatsScript('ryd' $visitorStats.topStats['ryd'] $homeStats.topStats['ryd'] $visitorStats.teamStats['ryd'] $homeStats.teamStats['ryd'])
566:                         #playerStatsScript('wyd' $visitorStats.topStats['wyd'] $homeStats.topStats['wyd'] $visitorStats.teamStats['wyd'] $homeStats.teamStats['wyd'])
567: 
568: 
569:                         $('.stats-value.visitor').css("background-color", conf.visitorTeamColor);
570:                         $('.stats-value.visitor.light').css("background-color", conf.visitorTeamLighterColor);
571:                         $('.stats-value.home').css("background-color", conf.homeTeamColor);
572:                         $('.stats-value.home.light').css("background-color", conf.homeTeamLighterColor);
573: 
574:                         if(${visitorStats.teamStats['ydpg']} < 250) {
575:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 0.75);
576:                             $('.stats-chart.ts-voff').css('margin-bottom', '-15px');
577:                             $('.stats-chart.ts-voff').css('margin-top', '30px');
578:                         } else if(${visitorStats.teamStats['ydpg']} >= 250 && ${visitorStats.teamStats['ydpg']} < 300) {
579:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 0.8);
580:                             $('.stats-chart.ts-voff').css('margin-bottom', '-12px');
581:                             $('.stats-chart.ts-voff').css('margin-top', '27px');
582:                         } else if(${visitorStats.teamStats['ydpg']} >= 250 && ${visitorStats.teamStats['ydpg']} < 300) {
583:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 0.85);
584:                             $('.stats-chart.ts-voff').css('margin-bottom', '-9px');
585:                             $('.stats-chart.ts-voff').css('margin-top', '24px');
586:                         } else if(${visitorStats.teamStats['ydpg']} >= 300 && ${visitorStats.teamStats['ydpg']} < 350) {
587:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 0.9);
588:                             $('.stats-chart.ts-voff').css('margin-bottom', '-6px');
589:                             $('.stats-chart.ts-voff').css('margin-top', '21px');
590:                         } else if(${visitorStats.teamStats['ydpg']} >= 350 && ${visitorStats.teamStats['ydpg']} < 400) {
591:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 0.95);
592:                             $('.stats-chart.ts-voff').css('margin-bottom', '-3px');
593:                             $('.stats-chart.ts-voff').css('margin-top', '18px');
594:                         } else if(${visitorStats.teamStats['ydpg']} >= 400) {
595:                             $('.stats-chart.ts-voff .highcharts-container').css('zoom', 1.0);
596:                         }
597: 
598: 
599:                         if(${visitorStats.teamStats['ypgopp']} < 250) {
600:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 0.75);
601:                             $('.stats-chart.ts-vdef').css('margin-bottom', '-15px');
602:                             $('.stats-chart.ts-vdef').css('margin-top', '30px');
603:                         } else if(${visitorStats.teamStats['ypgopp']} >= 250 && ${visitorStats.teamStats['ypgopp']} < 300) {
604:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 0.8);
605:                             $('.stats-chart.ts-vdef').css('margin-bottom', '-12px');
606:                             $('.stats-chart.ts-vdef').css('margin-top', '27px');
607:                         } else if(${visitorStats.teamStats['ypgopp']} >= 250 && ${visitorStats.teamStats['ypgopp']} < 300) {
608:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 0.85);
609:                             $('.stats-chart.ts-vdef').css('margin-bottom', '-9px');
610:                             $('.stats-chart.ts-vdef').css('margin-top', '24px');
611:                         } else if(${visitorStats.teamStats['ypgopp']} >= 300 && ${visitorStats.teamStats['ypgopp']} < 350) {
612:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 0.9);
613:                             $('.stats-chart.ts-vdef').css('margin-bottom', '-6px');
614:                             $('.stats-chart.ts-vdef').css('margin-top', '21px');
615:                         } else if(${visitorStats.teamStats['ypgopp']} >= 350 && ${visitorStats.teamStats['ypgopp']} < 400) {
616:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 0.95);
617:                             $('.stats-chart.ts-vdef').css('margin-bottom', '-3px');
618:                             $('.stats-chart.ts-vdef').css('margin-top', '18px');
619:                         } else if(${visitorStats.teamStats['ypgopp']} > 400) {
620:                             $('.stats-chart.ts-vdef .highcharts-container').css('zoom', 1);
621:                         }
622: 
623: 
624:                         if(${homeStats.teamStats['ydpg']} < 250) {
625:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 0.75);
626:                             $('.stats-chart.ts-hoff').css('margin-bottom', '-15px');
627:                             $('.stats-chart.ts-hoff').css('margin-top', '30px');
628:                         } else if(${homeStats.teamStats['ydpg']} >= 250 && ${homeStats.teamStats['ydpg']} < 300) {
629:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 0.8);
630:                             $('.stats-chart.ts-hoff').css('margin-bottom', '-12px');
631:                             $('.stats-chart.ts-hoff').css('margin-top', '27px');
632:                         } else if(${homeStats.teamStats['ydpg']} >= 250 && ${homeStats.teamStats['ydpg']} < 300) {
633:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 0.85);
634:                             $('.stats-chart.ts-hoff').css('margin-bottom', '-9px');
635:                             $('.stats-chart.ts-hoff').css('margin-top', '24px');
636:                         } else if(${homeStats.teamStats['ydpg']} >= 300 && ${homeStats.teamStats['ydpg']} < 350) {
637:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 0.9);
638:                             $('.stats-chart.ts-hoff').css('margin-bottom', '-6px');
639:                             $('.stats-chart.ts-hoff').css('margin-top', '21px');
640:                         } else if(${homeStats.teamStats['ydpg']} >= 350 && ${homeStats.teamStats['ydpg']} < 400) {
641:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 0.95);
642:                             $('.stats-chart.ts-hoff').css('margin-bottom', '-3px');
643:                             $('.stats-chart.ts-hoff').css('margin-top', '18px');
644:                         } else if(${homeStats.teamStats['ydpg']} > 400) {
645:                             $('.stats-chart.ts-hoff .highcharts-container').css('zoom', 1);
646:                         }
647: 
648: 
649:                         if(${homeStats.teamStats['ypgopp']} < 250) {
650:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 0.75);
651:                             $('.stats-chart.ts-hdef').css('margin-bottom', '-15px');
652:                             $('.stats-chart.ts-hdef').css('margin-top', '30px');
653:                         } else if(${homeStats.teamStats['ypgopp']} >= 250 && ${homeStats.teamStats['ypgopp']} < 300) {
654:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 0.8);
655:                             $('.stats-chart.ts-hdef').css('margin-bottom', '-12px');
656:                             $('.stats-chart.ts-hdef').css('margin-top', '27px');
657:                         } else if(${homeStats.teamStats['ypgopp']} >= 250 && ${homeStats.teamStats['ypgopp']} < 300) {
658:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 0.85);
659:                             $('.stats-chart.ts-hdef').css('margin-bottom', '-9px');
660:                             $('.stats-chart.ts-hdef').css('margin-top', '24px');
661:                         } else if(${homeStats.teamStats['ypgopp']} >= 300 && ${homeStats.teamStats['ypgopp']} < 350) {
662:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 0.9);
663:                             $('.stats-chart.ts-hdef').css('margin-bottom', '-6px');
664:                             $('.stats-chart.ts-hdef').css('margin-top', '21px');
665:                         } else if(${homeStats.teamStats['ypgopp']} >= 350 && ${homeStats.teamStats['ypgopp']} < 400) {
666:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 0.95);
667:                             $('.stats-chart.ts-hdef').css('margin-bottom', '-3px');
668:                             $('.stats-chart.ts-hdef').css('margin-top', '18px');
669:                         } else if(${homeStats.teamStats['ypgopp']} > 400) {
670:                             $('.stats-chart.ts-hdef .highcharts-container').css('zoom', 1.0);
671:                         }
672: 
673: 
674:                         setTimeout(function() {
675:                             $(window).resize();
676:                         }, 500);
677:                     });
678:                 })(jQuery);
679:             </script>
680:         ## GENERAL INFORMATION
681:         </div>
682:     #else
683:         <div id="primetime-wrapper" class="primetime-wrapper pt-fball">
684:         <div class="primetime-overflow clearfix">
685:     
686:             ## HEADER
687:             <div id="primetime-header" class="grid-row">
688:                 <div class="grid-col grid-col-hdr">
689: 
690:                     <div class="primetime-screen-controls clearfix">
691:                         <a href="#" class="full-screen-button pt-icon-resize-full"><span class="text">Switch</span></a>
692:                         <a href="#" class="normal-screen-button pt-icon-resize-small"><span class="text">Switch</span></a>
693:                         <a href="#" class="expand-button pt-icon-link-ext"><span class="text">Switch</span></a>
694:                     </div>
695:     
696:                     <div class="pt-header clearfix">
697:     
698:                         <div class="pt-team pt-team-away visitor-team-color">
699:                             <img src="" alt=""
700:                                 class="team-logo visitor-team-logo" /><span
701:                                 class="team-record visitor-team-record"></span>
702:                             <h3 class="team-name visitor-team-name"></h3>
703:                         </div>
704:     
705:                         <div class="pt-team pt-team-home home-team-color">
706:                             <span class="team-record home-team-record"></span><img
707:                                 src="" alt=""
708:                                 class="team-logo home-team-logo" />
709:                             <h3 class="team-name home-team-name"></h3>
710:                         </div>
711:     
712:                         <div class="pt-match-scoreboard clearfix">
713:                             <p class="team-score visitor-team-score"></p>
714:                             <p class="team-score home-team-score"></p>
715:     
716:                             <div class="pt-mtach-info">
717:                                 <span class="time scoreboard-time"></span> <span
718:                                     class="period scoreboard-period"></span>
719:                                 <div class="pt-timeout clearfix">
720:                                     <div class="timeout-qtr visitor-timeout-qtr">
721:                                         <h3 class="timeout-label">Timeout</h3>
722:                                         
723:                                     </div>
724:                                     <div class="timeout-qtr home-timeout-qtr">
725:                                         <h3 class="timeout-label">Timeout</h3>
726:                                         
727:                                     </div>
728:                                 </div>
729:                             </div>
730:                         </div>
731: 
732:                         <div id="pt-page-nav" class="pt-page-nav">
733:                             <a href="#" class="pt-menu">Menu</a>
734:                             <ul class="clearfix">
735:                                 <li><a href="#live-action-title" data-stroke="1" data-id="#live-action-title">Live Action</a></li>
736:                                 <li><a href="#line-score-title" data-stroke="2" data-id="#line-score-title">Line Score</a></li>
737:                                 <li><a href="#scoring-plays-title" data-stroke="3" data-id="#scoring-plays-title" data-tab-id="#stats-tabs">Scoring Plays</a></li>
738:                                 <li><a href="#team-comparison-title" data-stroke="4" data-id="#team-comparison-title" data-tab-id="#stats-tabs">Team Comparison</a></li>
739:                                 <li><a href="#individual-stats-title" data-stroke="5" data-id="#individual-stats-title" data-tab-id="#stats-tabs">Individual Stats</a></li>
740:                                 <li><a href="#game-info-title" data-stroke="6" data-id="#game-info-title" data-tab-id="#stats-tabs">Game Information</a></li>
741:                                 <li><a href="#play-by-play-title" data-stroke="7" data-id="#play-by-play-title" data-tab-id="#pbp-tabs">Play by Play</a></li>
742:                             </ul>
743:                         </div>
744:                     </div>
745:     
746:                 </div>
747:             </div>
748:             ## PRIMETIME HEADER ## GRID ROW
749:             <div class="grid-row-container clearfix">
750:             <div class="grid-row">
751:     
752:                 <div id="video-container" class="grid-col grid-col-v grid-col1" style="display: none">
753:                     <h3 id="live-action-title" class="grid-title">Broadcast<span class="close">x</span>
754:                     </h3>
755:                     <div id="topContent" class="grid-content clearfix">
756:                         <div class='embed-container'>
757:                             
758:                         </div>
759:                     </div>
760:                     ## GRID CONTENT
761:                 </div>
762: 
763:                 <div id="live-action-container" class="grid-col grid-col-v grid-col1" style="display: none">
764:                     <h3 id="live-action-title" class="grid-title">
765:                         Live Action<span class="close">x</span>
766:                     </h3>
767:                     <div class="grid-content clearfix">
768:                         <div class="clearfix">
769:                             <div class="container clearfix pt-live-action">
770:                                 <table>
771:                                     <thead>
772:                                         <tr>
773:                                             <th>Down & Distance</th>
774:                                             <th>Play Detail</th>
775:                                             #if ($document.valueOf("fbgame/venue/rules/@field") == 100)
776:                                             <th class="ball-position-header">
777:                                                 <div class="pt-ball-position">
778:                                                     <div class="yard-container">
779:                                                         <div class="yard">
780:                                                             <div class="number">G</div>
781:                                                         </div>
782:                                                         <div class="yard">
783:                                                             <div class="number">10</div>
784:                                                         </div>
785:                                                         <div class="yard">
786:                                                             <div class="number">20</div>
787:                                                         </div>
788:                                                         <div class="yard">
789:                                                             <div class="number">30</div>
790:                                                         </div>
791:                                                         <div class="yard">
792:                                                             <div class="number">40</div>
793:                                                         </div>
794:                                                         <div class="yard">
795:                                                             <div class="number">50</div>
796:                                                         </div>
797:                                                         <div class="yard">
798:                                                             <div class="number">40</div>
799:                                                         </div>
800:                                                         <div class="yard">
801:                                                             <div class="number">30</div>
802:                                                         </div>
803:                                                         <div class="yard">
804:                                                             <div class="number">20</div>
805:                                                         </div>
806:                                                         <div class="yard">
807:                                                             <div class="number">10</div>
808:                                                         </div>
809:                                                         <div class="yard">
810:                                                             <div class="number">G</div>
811:                                                         </div>
812:                                                     </div>
813:                                                 </div>
814:                                             </th>
815:                                             #end
816:                                         </tr>
817:                                     </thead>
818:                                     <tbody>
819:                                     </tbody>
820:                                 </table>
821:                             </div>
822:                         </div>
823:                     </div>
824:                 </div>
825:                 ## VIDEO COL
826:     
827:                 <div class="grid-col grid-col-cd grid-col2">
828:                     <h3 class="grid-title">
829:                         Current Drive<span class="close">x</span>
830:                     </h3>
831:                     <div class="grid-content clearfix">
832:                         <div class="pt-current-drive clearfix">
833:                             <div class="container-fluid clearfix">
834:                                 <h4>
835:                                     Team Drive From The <span id="currentDriveFromThe" class="position"></span>
836:                                 </h4>
837:                                 <center>
838:                                     <div class="pt-row clearfix">
839:                                         <span class="pt-col">
840:                                             <span id="currentDriveDownAndDistance" class="pt-data"></span>
841:                                             <span class="pt-label">Down & Distance</span>
842:                                         </span>
843:                                         <span class="pt-col">
844:                                             <span id="currentDriveBallOn" class="pt-data"></span>
845:                                             <span class="pt-label">Ball On</span>
846:                                         </span>
847: 
848:                                     </div>
849: 
850:                                     <div class="pt-row clearfix">
851: 
852:                                         <span class="pt-col">
853:                                             <span id="currentDriveNumberOfPlays" class="pt-data"></span>
854:                                             <span class="pt-label"># of <br /> Plays
855:                                         </span>
856:                                         </span> <span class="pt-col">
857:                                             <span id="currentDriveYardsGained" class="pt-data"></span>
858:                                             <span class="pt-label">Yards <br /> Gained
859:                                         </span>
860:                                         </span>
861:                                          <span class="pt-col">
862:                                             <span id="currentDriveDriveStart" class="pt-data"></span>
863:                                             <span class="pt-label">Drive Start</span>
864:                                         </span>
865: 
866:                                     </div>
867:                                 </center>
868:                             </div>
869:                         </div>
870:                     </div>
871:                     ## GRID CONTENT
872:                 </div>
873:                 ## CURRET DRIVE
874:             </div>
875:             ## GRID ROW ## GRID ROW
876:             <div class="grid-row">
877:                 <div class="grid-col grid-col-lp grid-col3">
878:                     <h3 class="grid-title">
879:                         Last Play<span class="close">x</span>
880:                     </h3>
881:                     <div class="grid-content clearfix">
882:                         <div class="pt-last-play clearfix">
883:     
884:                             <img id="lastPlayLogo" src="" alt=""
885:                                 class="team-logo visitor-team-logo" /> 
886:                                 <span class="pt-label">Last Play :</span> 
887:                                 <span id="lastPlayText" class="pt-match-play"></span>
888:                             </p>
889:     
890:                         </div>
891:                     </div>
892:                     ## GRID CONTENT
893:                 </div>
894:                 ## LAST PLAY
895:             </div>
896:             ## GRID ROW ## GRID ROW
897:             <div class="grid-row">
898:                 <div class="grid-col grid-col4">
899:                     <h3 id="line-score-title" class="grid-title">
900:                         Line score<span class="close">x</span>
901:                     </h3>
902:                     <div class="grid-content clearfix">
903:                         <div class="pt-line-score clearfix">
904:     
905:                             <table id="scoreByPeriod">
906:                                 <tr>
907:                                     <th>&nbsp;</th>
908:                                     <th>1</th>
909:                                     <th>2</th>
910:                                     <th>3</th>
911:                                     <th>4</th>
912:                                     <th class="scoreboard-ot">OT</th>
913:                                     <th id="scoreByPeriodLastColumnLabel"></th>
914:                                 </tr>
915:                                 <tr>
916:                                     <td><img src="" alt=""
917:                                         class="team-logo visitor-team-small-logo" />
918:                                         <span class="team-name visitor-team-name"></span></td>
919:                                     <td>-</td>
920:                                     <td>-</td>
921:                                     <td>-</td>
922:                                     <td>-</td>
923:                                     <td class="scoreboard-ot">-</td>
924:                                     <td></td>
925:                                 </tr>
926:                                 <tr>
927:                                     <td><img src="" alt=""
928:                                         class="team-logo home-team-small-logo" />
929:                                         <span class="team-name home-team-name"></span></td>
930:                                     <td>-</td>
931:                                     <td>-</td>
932:                                     <td>-</td>
933:                                     <td>-</td>
934:                                     <td class="scoreboard-ot">-</td>
935:                                     <td></td>
936:                                 </tr>
937:                             </table>
938:     
939:                         </div>
940:                     </div>
941:                     ## GRID CONTENT
942:                 </div>
943: 
944:             </div>
945:             ## GRID ROW ## TABS
946:             <div class="pt-game-info grid-row clearfix">
947:     
948:                 <ul class="pt-tabs clearfix">
949:                     <li id="statisticsTab" class="current"><a href="#stats-tabs">Statistics</a></li>
950:                     <li id="playByPlayTab"><a href="#pbp-tabs">Play By Play</a></li>
951:                 </ul>
952:     
953:                 <div class="pt-tabs-panes clearfix">
954:                     <div id="stats-tabs" class="pt-tabs-pane clearfix">
955:     
956:                         ## GRID ROW
957:                         <div id="divScoring" class="grid-row">
958:                             <div class="grid-col grid-col-sp grid-col6">
959:                                 <h3 id="scoring-plays-title" class="grid-title">
960:                                     Scoring Plays<span class="close">x</span>
961:                                 </h3>
962:                                 <div class="grid-content clearfix">
963:                                     <div id="scoringPlayList" class="pt-scoring-plays clearfix">
964:     
965:                                     </div>
966:                                 </div>
967:                                 ## GRID CONTENT
968:     
969:                             </div>
970:                             ## SCRING PLAY
971:                         </div>
972:                         ## GRID ROW ##GRID ROW
973:                         <div id="divTeamComparison" class="grid-row">
974:                             <div class="grid-col grid-col-tc grid-col7">
975:                                 <h3 id="team-comparison-title" class="grid-title">
976:                                     Team Compare<span class="close">x</span>
977:                                 </h3>
978:                                 <div class="grid-content clearfix">
979:                                     <div class="pt-team-compare clearfix">
980:                                         <table id="teamCompare">
981:     
982:                                             <thead>
983:                                                 <tr>
984:                                                     <th><img src="" alt=""
985:                                                         class="team-logo visitor-team-logo" /><br /> <span
986:                                                         class="team-name visitor-team-name">Team 1</span></th>
987:                                                     <th>Team Comparison <span>Statistics</span></th>
988:                                                     <th><img src="" alt=""
989:                                                         class="team-logo home-team-logo" /><br /> <span
990:                                                         class="team-name home-team-name">Team 2</span></th>
991:                                                 </tr>
992:                                             </thead>
993:     
994:                                             <tbody>
995:                                                 <tr>
996:                                                     <td></td>
997:                                                     <td class="stats-cat">FIRST DOWNS</td>
998:                                                     <td></td>
999:                                                 </tr>
1000:     
1001:                                                 <tr>
1002:                                                     <td></td>
1003:                                                     <td class="stats-cat">Passing</td>
1004:                                                     <td></td>
1005:                                                 </tr>
1006:     
1007:                                                 <tr>
1008:                                                     <td></td>
1009:                                                     <td class="stats-cat">Rushing</td>
1010:                                                     <td></td>
1011:                                                 </tr>
1012:     
1013:                                                 <tr>
1014:                                                     <td></td>
1015:                                                     <td class="stats-cat">Penalty</td>
1016:                                                     <td></td>
1017:                                                 </tr>
1018:     
1019:                                                 <tr>
1020:                                                     <td></td>
1021:                                                     <td class="stats-cat">THIRD DOWN EFFICIENCY</td>
1022:                                                     <td></td>
1023:                                                 </tr>
1024:     
1025:                                                 <tr>
1026:                                                     <td></td>
1027:                                                     <td class="stats-cat">FOURTH DOWN EFFICIENCY</td>
1028:                                                     <td></td>
1029:                                                 </tr>
1030: 
1031:                                                 <tr>
1032:                                                     <td></td>
1033:                                                     <td class="stats-cat">TOTAL PLAYS</td>
1034:                                                     <td></td>
1035:                                                 </tr>
1036: 
1037:                                                 <tr>
1038:                                                     <td></td>
1039:                                                     <td class="stats-cat">TOTAL YARDS</td>
1040:                                                     <td></td>
1041:                                                 </tr>
1042: 
1043:                                                 <tr>
1044:                                                     <td></td>
1045:                                                     <td class="stats-cat">AVG YDS/PLAY</td>
1046:                                                     <td></td>
1047:                                                 </tr>
1048:     
1049:                                                 <tr>
1050:                                                     <td></td>
1051:                                                     <td class="stats-cat">NET YARDS PASSING</td>
1052:                                                     <td></td>
1053:                                                 </tr>
1054:     
1055:                                                 <tr>
1056:                                                     <td></td>
1057:                                                     <td class="stats-cat">Completions-Attempts</td>
1058:                                                     <td></td>
1059:                                                 </tr>
1060:     
1061:     
1062:                                                 <tr>
1063:                                                     <td></td>
1064:                                                     <td class="stats-cat">Net yards per pass play</td>
1065:                                                     <td></td>
1066:                                                 </tr>
1067:     
1068:                                                 <tr>
1069:                                                     <td></td>
1070:                                                     <td class="stats-cat">Sacked: Number-Yards</td>
1071:                                                     <td></td>
1072:                                                 </tr>
1073:     
1074:                                                 <tr>
1075:                                                     <td></td>
1076:                                                     <td class="stats-cat">Had intercepted</td>
1077:                                                     <td></td>
1078:                                                 </tr>
1079:     
1080:                                                 <tr>
1081:                                                     <td></td>
1082:                                                     <td class="stats-cat">NET YARDS RUSHING</td>
1083:                                                     <td></td>
1084:                                                 </tr>
1085:     
1086:                                                 <tr>
1087:                                                     <td></td>
1088:                                                     <td class="stats-cat">Rushing Attempts</td>
1089:                                                     <td></td>
1090:                                                 </tr>
1091:     
1092:                                                 <tr>
1093:                                                     <td></td>
1094:                                                     <td class="stats-cat">Average gain per rush</td>
1095:                                                     <td></td>
1096:                                                 </tr>
1097:     
1098:                                                 <tr>
1099:                                                     <td></td>
1100:                                                     <td class="stats-cat">PUNTS: Number-Yards</td>
1101:                                                     <td></td>
1102:                                                 </tr>
1103:     
1104:                                                 <tr>
1105:                                                     <td></td>
1106:                                                     <td class="stats-cat">Average</td>
1107:                                                     <td></td>
1108:                                                 </tr>
1109:     
1110:                                                 <tr>
1111:                                                     <td></td>
1112:                                                     <td class="stats-cat">TOTAL RETURN YARDS</td>
1113:                                                     <td></td>
1114:                                                 </tr>
1115:     
1116:                                                 <tr>
1117:                                                     <td></td>
1118:                                                     <td class="stats-cat">Punt Returns: Number-Yards</td>
1119:                                                     <td></td>
1120:                                                 </tr>
1121:     
1122:                                                 <tr>
1123:                                                     <td></td>
1124:                                                     <td class="stats-cat">Kickoff Returns: Number-Yards</td>
1125:                                                     <td></td>
1126:                                                 </tr>
1127:     
1128:                                                 <tr>
1129:                                                     <td></td>
1130:                                                     <td class="stats-cat">Interception Returns:
1131:                                                         Number-Yards</td>
1132:                                                     <td></td>
1133:                                                 </tr>
1134:     
1135:                                                 <tr>
1136:                                                     <td></td>
1137:                                                     <td class="stats-cat">PENALTIES: Number-Yards</td>
1138:                                                     <td></td>
1139:                                                 </tr>
1140:     
1141:                                                 <tr>
1142:                                                     <td></td>
1143:                                                     <td class="stats-cat">FUMBLES: Number-Lost</td>
1144:                                                     <td></td>
1145:                                                 </tr>
1146:     
1147:                                                 <tr>
1148:                                                     <td></td>
1149:                                                     <td class="stats-cat">TIME OF POSSESSION</td>
1150:                                                     <td></td>
1151:                                                 </tr>
1152:                                             </tbody>
1153:     
1154:                                         </table>
1155:                                     </div>
1156:                                 </div>
1157:                                 ## GRID CONTENT
1158:                             </div>
1159:                             ## TEAM COMOARE
1160:                         </div>
1161:                         ## GRID ROW ## GRID ROW
1162:                         <div id="divIndividualStats" class="grid-row">
1163:                             <div class="grid-col grid-col-is grid-col8">
1164:                                 <h3 id="individual-stats-title" class="grid-title">
1165:                                     Individual Stats<span class="close">x</span>
1166:                                 </h3>
1167:                                 <div class="grid-content clearfix">
1168:                                     <div class="pt-team-stats clearfix">
1169:     
1170:                                         <div id="visitorTeamIndividualStats"
1171:                                             class="pt-team-col pt-stats-team active clearfix">
1172:     
1173:                                             <div class="pt-team clearfix">
1174:                                                 <img src="" alt=""
1175:                                                     class="team-logo visitor-team-logo active" />
1176:                                                 <h3 class="team-name visitor-team-name"></h3>
1177:                                             </div>
1178:     
1179:                                             <div class="pt-stats-tabs clearfix">
1180:     
1181:                                                 <ul class="pt-tabs clearfix">
1182:                                                     <li class="current"><a id="aVisitorOffenseTabHeader" data-id="vOffenseTab">Offense</a></li>
1183:                                                     <li><a id="aVisitorDefenseTabHeader" data-id="vDefenseTab">Defense</a></li>
1184:                                                     <li><a id="aVisitorSpecialTabHeader" data-id="vSpecialTab">Special Teams</a></li>
1185:                                                 </ul>
1186:     
1187:                                                 <div class="pt-panes clearfix">
1188:                                                     <div id="vOffenseTab" class="pt-pane pt-pane1 clearfix">
1189:     
1190:                                                         <div class="pt-row">
1191:                                                             <table class="passingStats display">
1192:                                                                 <thead>
1193:                                                                     <tr>
1194:                                                                         <th>#</th>
1195:                                                                         <th>Passing</th>
1196:                                                                         <th>C-A</th>
1197:                                                                         <th>YDS</th>
1198:                                                                         <th>TD</th>
1199:                                                                         <th>INT</th>
1200:                                                                     </tr>
1201:                                                                 </thead>
1202:                                                                 <tbody>
1203:                                                                     
1204:                                                                 </tbody>
1205:                                                             </table>
1206:                                                         </div>
1207:     
1208:                                                         <div class="pt-row">
1209:                                                             <table class="rushingStats display">
1210:                                                                 <thead>
1211:                                                                     <tr>
1212:                                                                         <th>#</th>
1213:                                                                         <th>Rushing</th>
1214:                                                                         <th>ATT</th>
1215:                                                                         <th>YDS</th>
1216:                                                                         <th>AVG</th>
1217:                                                                         <th>LG</th>
1218:                                                                         <th>TD</th>
1219:                                                                     </tr>
1220:                                                                 </thead>
1221:                                                                 <tbody>
1222:     
1223:                                                                 </tbody>
1224:                                                             </table>
1225:                                                         </div>
1226:                                                         <div class="pt-row">
1227:                                                             <table class="receivingStats display">
1228:                                                                 <thead>
1229:                                                                     <tr>
1230:                                                                         <th>#</th>
1231:                                                                         <th>Receive</th>
1232:                                                                         <th>REC</th>
1233:                                                                         <th>YDS</th>
1234:                                                                         <th>AVG</th>
1235:                                                                         <th>LG</th>
1236:                                                                         <th>TD</th>
1237:                                                                     </tr>
1238:                                                                 </thead>
1239:                                                                 <tbody>
1240:     
1241:                                                                 </tbody>
1242:                                                             </table>
1243:                                                         </div>
1244:                                                         <div class="pt-row">
1245:                                                             <table class="fumbleStats display">
1246:                                                                 <thead>
1247:                                                                     <tr>
1248:                                                                         <th>#</th>
1249:                                                                         <th>Fumbles</th>
1250:                                                                         <th>NO</th>
1251:                                                                         <th>LOST</th>
1252:                                                                     </tr>
1253:                                                                 </thead>
1254:                                                                 <tbody>
1255:                                                                     
1256:                                                                 </tbody>
1257:                                                             </table>
1258:                                                         </div>
1259:     
1260:                                                     </div>
1261:                                                     <div id="vDefenseTab" class="pt-pane pt-pane1 clearfix">
1262:                                                         <div class="pt-row">
1263:                                                             <table class="tackleStats display">
1264:                                                                 <thead>
1265:                                                                     <tr>
1266:                                                                         <th>#</th>
1267:                                                                         <th>Tackles</th>
1268:                                                                         <th>TOTAL</th>
1269:                                                                         <th>SOLO</th>
1270:                                                                         <th>AST</th>
1271:                                                                         <th>TFL</th>
1272:                                                                         <th>YDS</th>
1273:                                                                     </tr>
1274:                                                                 </thead>
1275:                                                                 <tbody>
1276:                                                                     
1277:                                                                 </tbody>
1278:                                                             </table>
1279:                                                         </div>
1280:                                                         <div class="pt-row">
1281:                                                             <table class="sackStats display">
1282:                                                                 <thead>
1283:                                                                     <tr>
1284:                                                                         <th>#</th>
1285:                                                                         <th>Sacks</th>
1286:                                                                         <th>NO</th>
1287:                                                                         <th>YDS</th>
1288:                                                                     </tr>
1289:                                                                 </thead>
1290:                                                                 <tbody>
1291:                                                                     
1292:                                                                 </tbody>
1293:                                                             </table>
1294:                                                         </div>
1295:                                                         <div class="pt-row">
1296:                                                             <table class="passDefenseStats display">
1297:                                                                 <thead>
1298:                                                                     <tr>
1299:                                                                         <th>#</th>
1300:                                                                         <th>Pass Defense</th>
1301:                                                                         <th>INT</th>
1302:                                                                         <th>YDS</th>
1303:                                                                         <th>BRUP</th>
1304:                                                                         <th>BLKS</th>
1305:                                                                         <th>QBH</th>
1306:                                                                     </tr>
1307:                                                                 </thead>
1308:                                                                 <tbody>
1309:                                                                     
1310:                                                                 </tbody>
1311:                                                             </table>
1312:                                                         </div>
1313:                                                         <div class="pt-row">
1314:                                                             <table class="fumbleDefenseStats display">
1315:                                                                 <thead>
1316:                                                                     <tr>
1317:                                                                         <th>#</th>
1318:                                                                         <th>Fumbles</th>
1319:                                                                         <th>FF</th>
1320:                                                                         <th>FR</th>
1321:                                                                         <th>YDS</th>
1322:                                                                     </tr>
1323:                                                                 </thead>
1324:                                                                 <tbody>
1325:                                                                     
1326:                                                                 </tbody>
1327:                                                             </table>
1328:                                                         </div>
1329:                                                     </div>
1330:                                                     <div id="vSpecialTab" class="pt-pane pt-pane1 clearfix">
1331:                                                         <div class="pt-row">
1332:                                                             <table class="kickingStats display">
1333:                                                                 <thead>
1334:                                                                     <tr>
1335:                                                                         <th>#</th>
1336:                                                                         <th>Kicking</th>
1337:                                                                         <th>FGM-A</th>
1338:                                                                         <th>LG</th>
1339:                                                                         <th>XPM-A</th>
1340:                                                                         <th>PTS</th>
1341:                                                                         <th class="rougeColumn">Rouge</th>
1342:                                                                     </tr>
1343:                                                                 </thead>
1344:                                                                 <tbody>
1345:                                                                     
1346:                                                                 </tbody>
1347:                                                             </table>
1348:                                                         </div>
1349:                                                         <div class="pt-row">
1350:                                                             <table class="kickoffStats display">
1351:                                                                 <thead>
1352:                                                                     <tr>
1353:                                                                         <th>#</th>
1354:                                                                         <th>Kickoffs</th>
1355:                                                                         <th>NO</th>
1356:                                                                         <th>YDS</th>
1357:                                                                         <th>AVG</th>
1358:                                                                         <th>TB</th>
1359:                                                                         <th>OB</th>
1360:                                                                     </tr>
1361:                                                                 </thead>
1362:                                                                 <tbody>
1363:                                                                     
1364:                                                                 </tbody>
1365:                                                             </table>
1366:                                                         </div>
1367:                                                         <div class="pt-row">
1368:                                                             <table class="puntingStats display">
1369:                                                                 <thead>
1370:                                                                     <tr>
1371:                                                                         <th>#</th>
1372:                                                                         <th>Punting</th>
1373:                                                                         <th>NO</th>
1374:                                                                         <th>YDS</th>
1375:                                                                         <th>AVG</th>
1376:                                                                         <th>LG</th>
1377:                                                                         <th>TB</th>
1378:                                                                         <th>I20</th>
1379:                                                                         <th>50+</th>
1380:                                                                     </tr>
1381:                                                                 </thead>
1382:                                                                 <tbody>
1383:                                                                     
1384:                                                                 </tbody>
1385:                                                             </table>
1386:                                                         </div>
1387:                                                         <div class="pt-row">
1388:                                                             <table class="kickoffReturnStats display">
1389:                                                                 <thead>
1390:                                                                     <tr>
1391:                                                                         <th>#</th>
1392:                                                                         <th>Kickoff Returns</th>
1393:                                                                         <th>NO</th>
1394:                                                                         <th>YDS</th>
1395:                                                                         <th>AVG</th>
1396:                                                                         <th>LG</th>
1397:                                                                         <th>TD</th>
1398:                                                                     </tr>
1399:                                                                 </thead>
1400:                                                                 <tbody>
1401:                                                                     
1402:                                                                 </tbody>
1403:                                                             </table>
1404:                                                         </div>
1405:                                                         <div class="pt-row">
1406:                                                             <table class="puntReturnStats display">
1407:                                                                 <thead>
1408:                                                                     <tr>
1409:                                                                         <th>#</th>
1410:                                                                         <th>Punt Returns</th>
1411:                                                                         <th>NO</th>
1412:                                                                         <th>YDS</th>
1413:                                                                         <th>AVG</th>
1414:                                                                         <th>LG</th>
1415:                                                                         <th>TD</th>
1416:                                                                     </tr>
1417:                                                                 </thead>
1418:                                                                 <tbody>
1419:                                                                     
1420:                                                                 </tbody>
1421:                                                             </table>
1422:                                                         </div>
1423:                                                         <div class="pt-row">
1424:                                                             <table class="allPurposeStats display">
1425:                                                                 <thead>
1426:                                                                     <tr>
1427:                                                                         <th>#</th>
1428:                                                                         <th>All Purpose</th>
1429:                                                                         <th>TOT</th>
1430:                                                                         <th>RUSH</th>
1431:                                                                         <th>REC</th>
1432:                                                                         <th>RET</th>
1433:                                                                         <th>TDS</th>
1434:                                                                     </tr>
1435:                                                                 </thead>
1436:                                                                 <tbody>
1437:                                                                     
1438:                                                                 </tbody>
1439:                                                             </table>
1440:                                                         </div>
1441:                                                     </div>
1442:                                                 </div>
1443:                                             </div>
1444:                                         </div>
1445:     
1446:                                         <div id="homeTeamIndividualStats" class="pt-team-col pt-stats-team clearfix">
1447:     
1448:                                             <div class="pt-team clearfix">
1449:                                                 <img src="" alt=""
1450:                                                     class="team-logo home-team-logo active" />
1451:                                                 <h3 class="team-name home-team-name"></h3>
1452:                                             </div>
1453:     
1454:                                             <div class="pt-stats-tabs clearfix">
1455:     
1456:                                                 <ul class="pt-tabs clearfix">
1457:                                                     <li class="current"><a id="aHomeOffenseTabHeader" data-id="hOffenseTab">Offense</a></li>
1458:                                                     <li><a id="aHomeDefenseTabHeader" data-id="hDefenseTab">Defense</a></li>
1459:                                                     <li><a id="aHomeSpecialTabHeader" data-id="hSpecialTab">Special Teams</a></li>
1460:                                                 </ul>
1461:     
1462:                                                 <div class="pt-panes clearfix">
1463:                                                     <div id="hOffenseTab" class="pt-pane pt-pane1 clearfix">
1464:     
1465:                                                         <div class="pt-row">
1466:                                                             <table class="passingStats display">
1467:                                                                 <thead>
1468:                                                                     <tr>
1469:                                                                         <th>#</th>
1470:                                                                         <th>Passing</th>
1471:                                                                         <th>C-A</th>
1472:                                                                         <th>YDS</th>
1473:                                                                         <th>TD</th>
1474:                                                                         <th>INT</th>
1475:                                                                     </tr>
1476:                                                                 </thead>
1477:                                                                 <tbody>
1478:                                                                     
1479:                                                                 </tbody>
1480:                                                             </table>
1481:                                                         </div>
1482:     
1483:                                                         <div class="pt-row">
1484:                                                             <table class="rushingStats display">
1485:                                                                 <thead>
1486:                                                                     <tr>
1487:                                                                         <th>#</th>
1488:                                                                         <th>Rushing</th>
1489:                                                                         <th>ATT</th>
1490:                                                                         <th>YDS</th>
1491:                                                                         <th>AVG</th>
1492:                                                                         <th>LG</th>
1493:                                                                         <th>TD</th>
1494:                                                                     </tr>
1495:                                                                 </thead>
1496:                                                                 <tbody>
1497:     
1498:                                                                 </tbody>
1499:                                                             </table>
1500:                                                         </div>
1501:                                                         <div class="pt-row">
1502:                                                             <table class="receivingStats display">
1503:                                                                 <thead>
1504:                                                                     <tr>
1505:                                                                         <th>#</th>
1506:                                                                         <th>Receive</th>
1507:                                                                         <th>REC</th>
1508:                                                                         <th>YDS</th>
1509:                                                                         <th>AVG</th>
1510:                                                                         <th>LG</th>
1511:                                                                         <th>TD</th>
1512:                                                                     </tr>
1513:                                                                 </thead>
1514:                                                                 <tbody>
1515:     
1516:                                                                 </tbody>
1517:                                                             </table>
1518:                                                         </div>
1519:                                                         <div class="pt-row">
1520:                                                             <table class="fumbleStats display">
1521:                                                                 <thead>
1522:                                                                     <tr>
1523:                                                                         <th>#</th>
1524:                                                                         <th>Fumbles</th>
1525:                                                                         <th>NO</th>
1526:                                                                         <th>LOST</th>
1527:                                                                     </tr>
1528:                                                                 </thead>
1529:                                                                 <tbody>
1530:                                                                     
1531:                                                                 </tbody>
1532:                                                             </table>
1533:                                                         </div>
1534:     
1535:                                                     </div>
1536:                                                     <div id="hDefenseTab" class="pt-pane pt-pane1 clearfix">
1537:                                                         <div class="pt-row">
1538:                                                             <table class="tackleStats display">
1539:                                                                 <thead>
1540:                                                                     <tr>
1541:                                                                         <th>#</th>
1542:                                                                         <th>Tackles</th>
1543:                                                                         <th>TOTAL</th>
1544:                                                                         <th>SOLO</th>
1545:                                                                         <th>AST</th>
1546:                                                                         <th>TFL</th>
1547:                                                                         <th>YDS</th>
1548:                                                                     </tr>
1549:                                                                 </thead>
1550:                                                                 <tbody>
1551:                                                                     
1552:                                                                 </tbody>
1553:                                                             </table>
1554:                                                         </div>
1555:                                                         <div class="pt-row">
1556:                                                             <table class="sackStats display">
1557:                                                                 <thead>
1558:                                                                     <tr>
1559:                                                                         <th>#</th>
1560:                                                                         <th>Sacks</th>
1561:                                                                         <th>NO</th>
1562:                                                                         <th>YDS</th>
1563:                                                                     </tr>
1564:                                                                 </thead>
1565:                                                                 <tbody>
1566:                                                                     
1567:                                                                 </tbody>
1568:                                                             </table>
1569:                                                         </div>
1570:                                                         <div class="pt-row">
1571:                                                             <table class="passDefenseStats display">
1572:                                                                 <thead>
1573:                                                                     <tr>
1574:                                                                         <th>#</th>
1575:                                                                         <th>Pass Defense</th>
1576:                                                                         <th>INT</th>
1577:                                                                         <th>YDS</th>
1578:                                                                         <th>BRUP</th>
1579:                                                                         <th>BLKS</th>
1580:                                                                         <th>QBH</th>
1581:                                                                     </tr>
1582:                                                                 </thead>
1583:                                                                 <tbody>
1584:                                                                     
1585:                                                                 </tbody>
1586:                                                             </table>
1587:                                                         </div>
1588:                                                         <div class="pt-row">
1589:                                                             <table class="fumbleDefenseStats display">
1590:                                                                 <thead>
1591:                                                                     <tr>
1592:                                                                         <th>#</th>
1593:                                                                         <th>Fumbles</th>
1594:                                                                         <th>FF</th>
1595:                                                                         <th>FR</th>
1596:                                                                         <th>YDS</th>
1597:                                                                     </tr>
1598:                                                                 </thead>
1599:                                                                 <tbody>
1600:                                                                     
1601:                                                                 </tbody>
1602:                                                             </table>
1603:                                                         </div>
1604:                                                     </div>
1605:                                                     <div id="hSpecialTab" class="pt-pane pt-pane1 clearfix">
1606:                                                         <div class="pt-row">
1607:                                                             <table class="kickingStats display">
1608:                                                                 <thead>
1609:                                                                     <tr>
1610:                                                                         <th>#</th>
1611:                                                                         <th>Kicking</th>
1612:                                                                         <th>FGM-A</th>
1613:                                                                         <th>LG</th>
1614:                                                                         <th>XPM-A</th>
1615:                                                                         <th>PTS</th>
1616:                                                                         <th class="rougeColumn" style="display:none;">Rouge</th>
1617:                                                                     </tr>
1618:                                                                 </thead>
1619:                                                                 <tbody>
1620:                                                                     
1621:                                                                 </tbody>
1622:                                                             </table>
1623:                                                         </div>
1624:                                                         <div class="pt-row">
1625:                                                             <table class="kickoffStats display">
1626:                                                                 <thead>
1627:                                                                     <tr>
1628:                                                                         <th>#</th>
1629:                                                                         <th>Kickoffs</th>
1630:                                                                         <th>NO</th>
1631:                                                                         <th>YDS</th>
1632:                                                                         <th>AVG</th>
1633:                                                                         <th>TB</th>
1634:                                                                         <th>OB</th>
1635:                                                                     </tr>
1636:                                                                 </thead>
1637:                                                                 <tbody>
1638:                                                                     
1639:                                                                 </tbody>
1640:                                                             </table>
1641:                                                         </div>
1642:                                                         <div class="pt-row">
1643:                                                             <table class="puntingStats display">
1644:                                                                 <thead>
1645:                                                                     <tr>
1646:                                                                         <th>#</th>
1647:                                                                         <th>Punting</th>
1648:                                                                         <th>NO</th>
1649:                                                                         <th>YDS</th>
1650:                                                                         <th>AVG</th>
1651:                                                                         <th>LG</th>
1652:                                                                         <th>TB</th>
1653:                                                                         <th>I20</th>
1654:                                                                         <th>50+</th>
1655:                                                                     </tr>
1656:                                                                 </thead>
1657:                                                                 <tbody>
1658:                                                                     
1659:                                                                 </tbody>
1660:                                                             </table>
1661:                                                         </div>
1662:                                                         <div class="pt-row">
1663:                                                             <table class="kickoffReturnStats display">
1664:                                                                 <thead>
1665:                                                                     <tr>
1666:                                                                         <th>#</th>
1667:                                                                         <th>Kickoff Returns</th>
1668:                                                                         <th>NO</th>
1669:                                                                         <th>YDS</th>
1670:                                                                         <th>AVG</th>
1671:                                                                         <th>LG</th>
1672:                                                                         <th>TD</th>
1673:                                                                     </tr>
1674:                                                                 </thead>
1675:                                                                 <tbody>
1676:                                                                     
1677:                                                                 </tbody>
1678:                                                             </table>
1679:                                                         </div>
1680:                                                         <div class="pt-row">
1681:                                                             <table class="puntReturnStats display">
1682:                                                                 <thead>
1683:                                                                     <tr>
1684:                                                                         <th>#</th>
1685:                                                                         <th>Punt Returns</th>
1686:                                                                         <th>NO</th>
1687:                                                                         <th>YDS</th>
1688:                                                                         <th>AVG</th>
1689:                                                                         <th>LG</th>
1690:                                                                         <th>TD</th>
1691:                                                                     </tr>
1692:                                                                 </thead>
1693:                                                                 <tbody>
1694:                                                                     
1695:                                                                 </tbody>
1696:                                                             </table>
1697:                                                         </div>
1698:                                                         <div class="pt-row">
1699:                                                             <table class="allPurposeStats display">
1700:                                                                 <thead>
1701:                                                                     <tr>
1702:                                                                         <th>#</th>
1703:                                                                         <th>All Purpose</th>
1704:                                                                         <th>TOT</th>
1705:                                                                         <th>RUSH</th>
1706:                                                                         <th>REC</th>
1707:                                                                         <th>RET</th>
1708:                                                                         <th>TDS</th>
1709:                                                                     </tr>
1710:                                                                 </thead>
1711:                                                                 <tbody>
1712:                                                                     
1713:                                                                 </tbody>
1714:                                                             </table>
1715:                                                         </div>
1716:                                                     </div>
1717:                                                 </div>
1718:                                             </div>
1719:                                         </div>
1720:     
1721:                                     </div>
1722:                                 </div>
1723:                                 ## GRID CONTENT
1724:                             </div>
1725:                             ## INDIVISUAL STATS
1726:                         </div>
1727:                         ## GRID ROW ## GRID ROW
1728:                         <div id="divGameInformation" class="grid-row">
1729:                             <div class="grid-col grid-col-gi grid-col9">
1730:                                 <h3 id="game-info-title" class="grid-title">
1731:                                     Game Information<span class="close">x</span>
1732:                                 </h3>
1733:                                 <div class="grid-content clearfix">
1734:                                     <div class="pt-game-information clearfix">
1735:     
1736:                                         <div class="pt-row clearfix">
1737:                                             <center>
1738:                                                 <div class="date-time pt-col">
1739:                                                     <span id="gameInformationDate" class="date"></span>
1740:                                                     <span id="gameInformationTime" class="time"></span>
1741:                                                     <h3>Date & Time</h3>
1742:                                                 </div>
1743: 
1744:                                                 <div class="game-location pt-col">
1745:                                                     <span id="gameInformationLocation" class="location"></span>
1746:                                                     <h3>Location</h3>
1747:                                                 </div>
1748: 
1749:                                                 <div class="game-venue pt-col">
1750:                                                     <span id="gameInformationVenue" class="venue"></span>
1751:                                                     <h3>Venue</h3>
1752:                                                 </div>
1753: 
1754:                                                 <div class="weather pt-col">
1755: 
1756:                                                     <div class="weather-condition">
1757:                                                         <span id="gameInformationTemperature"
1758:                                                             class="temp"></span>
1759:                                                         <span id="gameInformationCondition" class="condition"></span>
1760:                                                     </div>
1761:                                                     <h3>Weather</h3>
1762:                                                 </div>
1763:                                             </center>
1764:                                         </div>
1765:                                         
1766:                                     </div>
1767:                                 </div>
1768:                                 ## GRID CONTENT
1769:                             </div>
1770:                             ## GENERAL INFORMATION
1771:                         </div>
1772:                         ## GRID ROW
1773:     
1774:                     </div>
1775:     
1776:                     ## PLAY BY PLAY TABS
1777:                     <div id="pbp-tabs" class="pt-tabs-pane clearfix">
1778:     
1779:                         ## GRID ROW
1780:                         <div id="divPlayByPlay" class="grid-row">
1781:                             <div class="grid-col grid-col-ds grid-col10">
1782:                                 <h3 id="play-by-play-title" class="grid-title">
1783:                                     Drive Summary<span class="close">x</span>
1784:                                 </h3>
1785:                                 <div class="grid-content clearfix">
1786:                                     <div id="divDriveSummaryFilter" class="clearfix" style="display: none">
1787:                                         <select id="selFilterPeriod" class="dropdownFilter">
1788:                                             <option value="" selected>ALL PERIODS</option>
1789:                                         </select>
1790:                                         <select id="selFilterTeam" class="dropdownFilter">
1791:                                             <option value="" selected>BOTH TEAMS</option>
1792:                                             <option value="teamFilterV" class="team-name visitor-team-name"></option>
1793:                                             <option value="teamFilterH" class="team-name home-team-name"></option>
1794:                                         </select>
1795:                                         <select id="selFilterPlayType" class="dropdownFilter">
1796:                                             <option value="" selected>ALL PLAYS</option>
1797:                                             <option value="playTypeFilterK">Kick</option>
1798:                                             <option value="playTypeFilterP">Pass</option>
1799:                                             <option value="playTypeFilterR">Rush</option>
1800:                                             <option value="playTypeFilterE">Penalty</option>
1801:                                             <option value="playTypeFilterU">Punt</option>
1802:                                             <option value="playTypeFilterF">Field Goal</option>
1803:                                             <option value="playTypeFilterX">Extra Point</option>
1804:                                         </select>
1805:                                         <select id="selFilterDown" class="dropdownFilter">
1806:                                             <option value="" selected>DOWN</option>
1807:                                             <option value="downFilter1st">1st Q</option>
1808:                                             <option value="downFilter2nd">2nd Q</option>
1809:                                             <option value="downFilter3rd">3rd Q</option>
1810:                                             <option value="downFilter4th">4th Q</option>
1811:                                         </select>
1812:                                         <select id="selFilterToGo" class="dropdownFilter">
1813:                                             <option value="" selected>TOGO</option>
1814:                                             <option value="toGoFilter0-5">0-5</option>
1815:                                             <option value="toGoFilter6-10">6-10</option>
1816:                                             <option value="toGoFilter11plus">11+</option>
1817:                                         </select>
1818:                                         <select id="selFilterSpot" class="dropdownFilter">
1819:                                             <option value="" selected>SPOT</option>
1820:                                             <option value="spotFilterRedZone">Red Zone</option>
1821:                                             <option value="spotFilterOppHalf">Opp Half</option>
1822:                                             <option value="spotFilterTeamHalf">Team Half</option>
1823:                                         </select>
1824:                                     </div>
1825:                                     <div id="driveSummaryList" class="pt-drive-summary clearfix">
1826:     
1827:                                         <div class="match-play">
1828:                                             <img src="" alt=""
1829:                                                 class="team-logo visitor-team-logo" />
1830:     
1831:                                             <div class="play-details">
1832:                                                 <span class="trigger"></span> <span
1833:                                                     class="team-name visitor-team-name">Team 1</span>
1834:                                                 <div class="play-info clearfix">
1835:                                                     <span class="play-qtr">1ST QTR</span> <span
1836:                                                         class="play-move">5 Plays</span> <span class="play-time">12:11</span>
1837:                                                     <span class="play-run">40 Yard</span>
1838:                                                 </div>
1839:                                                 <div class="play-result">
1840:                                                     <span>From The Har 35</span> <span>Time Of Poss: 2:10
1841:                                                     </span> <span>Ends In Punt</span>
1842:                                                 </div>
1843:                                             </div>
1844:     
1845:                                             <div class="play-expanded-detail">
1846:                                                 <div class="play-expanded-title">
1847:                                                     <span>Down & Distance</span><span>Play Detail</span>
1848:                                                 </div>
1849:                                                 <div class="play-expanded-info">
1850:                                                     <p>
1851:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1852:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1853:                                                     </p>
1854:                                                     <p>
1855:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1856:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1857:                                                     </p>
1858:                                                     <p>
1859:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1860:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1861:                                                     </p>
1862:                                                     <p>
1863:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1864:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1865:                                                     </p>
1866:                                                 </div>
1867:                                             </div>
1868:     
1869:                                         </div>
1870:     
1871:                                         <div class="match-play">
1872:                                             <img src="" alt=""
1873:                                                 class="team-logo home-team-logo" />
1874:     
1875:                                             <div class="play-details">
1876:                                                 <span class="trigger"></span> <span
1877:                                                     class="team-name home-team-name">Team 2</span>
1878:                                                 <div class="play-info clearfix">
1879:                                                     <span class="play-qtr">1ST QTR</span> <span
1880:                                                         class="play-move">5 Plays</span> <span class="play-time">12:11</span>
1881:                                                     <span class="play-run">40 Yard</span>
1882:                                                 </div>
1883:                                                 <div class="play-result">
1884:                                                     <span>From The Har 35</span> <span>Time Of Poss: 2:10
1885:                                                     </span> <span>Ends In Punt</span>
1886:                                                 </div>
1887:                                             </div>
1888:     
1889:                                             <div class="play-expanded-detail">
1890:                                                 <div class="play-expanded-title">
1891:                                                     <span>Down & Distance</span><span>Play Detail</span>
1892:                                                 </div>
1893:                                                 <div class="play-expanded-info">
1894:                                                     <p>
1895:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1896:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1897:                                                     </p>
1898:                                                     <p>
1899:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1900:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1901:                                                     </p>
1902:                                                     <p>
1903:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1904:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1905:                                                     </p>
1906:                                                     <p>
1907:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1908:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1909:                                                     </p>
1910:                                                 </div>
1911:                                             </div>
1912:     
1913:                                         </div>
1914:     
1915:                                         <div class="match-play">
1916:                                             <img src="" alt=""
1917:                                                 class="team-logo visitor-team-logo" />
1918:     
1919:                                             <div class="play-details">
1920:                                                 <span class="trigger"></span> <span
1921:                                                     class="team-name home-team-name">Team 2</span>
1922:                                                 <div class="play-info clearfix">
1923:                                                     <span class="play-qtr">1ST QTR</span> <span
1924:                                                         class="play-move">5 Plays</span> <span class="play-time">12:11</span>
1925:                                                     <span class="play-run">40 Yard</span>
1926:                                                 </div>
1927:                                                 <div class="play-result">
1928:                                                     <span>From The Har 35</span> <span>Time Of Poss: 2:10
1929:                                                     </span> <span>Ends In Punt</span>
1930:                                                 </div>
1931:                                             </div>
1932:     
1933:                                             <div class="play-expanded-detail">
1934:                                                 <div class="play-expanded-title">
1935:                                                     <span>Down & Distance</span><span>Play Detail</span>
1936:                                                 </div>
1937:                                                 <div class="play-expanded-info">
1938:                                                     <p>
1939:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1940:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1941:                                                     </p>
1942:                                                     <p>
1943:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1944:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1945:                                                     </p>
1946:                                                     <p>
1947:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1948:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1949:                                                     </p>
1950:                                                     <p>
1951:                                                         <span>3rd and 5 at HAR 57</span><span>M.Pruneau
1952:                                                             complete to S.Miller for 22 yards. TOUCHDOWN</span>
1953:                                                     </p>
1954:                                                 </div>
1955:                                             </div>
1956:     
1957:                                         </div>
1958:     
1959:                                     </div>
1960:                                 </div>
1961:                                 ## GRID CONTENT
1962:                             </div>
1963:                             ## DRIVE SUMMARY
1964:                         </div>
1965:                         ## GRID ROW
1966:     
1967:                     </div>
1968:                     ## PLAY BY PLAY TABS
1969:                 </div>
1970:                 ## PT TABS PANES
1971:                 
1972:             </div>
1973:             ## PRIME TIME GAME INFO 
1974:             </div>
1975:             ## GRID ROW CONTAINER
1976:             ## FOOTER
1977:             <div id="primetime-footer" class="grid-row">
1978:                 <div class="grid-col grid-col-ftr">
1979:                     <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
1980:                 </div>
1981:             </div>
1982:     
1983:         </div>
1984:         ## PRIME TIME OVERFLOW
1985:     </div>
1986:         ## PRIME TIME WRAPPER
1987:     #end
1988:     
1989:     #set ($showWiki = true)
1990:     #set ($showWiki = $showWikiVar)
1991:     #if ($showWiki == true)
1992:         $wiki.su 
1993:     #end
1994:     ## END OF PRIMETIME     
1995: 
1996: #else
1997: 
1998: ##COMMON FUNCTIONS
1999: #macro (changeViewScript)
2000: ## CORRECT WRONG VIEW WITH REPLACESTATE
2001: <script type="text/javascript">
2002:     $(function () {
2003:         if (!$('.stats-tabs li.active').length) {
2004:             if (history.replaceState) {
2005:                 history.replaceState({}, '', '?view=' + $('.stats-tabs li:first').addClass('active').children('a').data('view'));
2006:             } else {
2007:                 $('.stats-tabs li:first').addClass('active');
2008:             }
2009:         }
2010:     })
2011: </script>
2012: #end
2013: 
2014: #macro (printPdfHeader $title)
2015: <div class="stats-fullbox clearfix">
2016:     <table>
2017:         <tr>
2018:             <td class="align-center"><h4>$title</h4></td>
2019:         </tr>
2020:     </table>
2021: </div>
2022: #end
2023: ##
2024: #set ($visname = $document.valueOf("fbgame/venue/@visname"))
2025: #set ($homename =$document.valueOf("fbgame/venue/@homename"))
2026: #set ($homeNode = $document.selectSingleNode("fbgame/team[@vh='H']"))
2027: #set ($visitorNode = $document.selectSingleNode("fbgame/team[@vh='V']"))
2028: #set ($home = $homeNode.valueOf("@name"))
2029: #set ($visitor = $visitorNode.valueOf("@name"))
2030: #set ($homeTotals = $homeNode.selectSingleNode("totals"))
2031: #set ($visitorTotals = $visitorNode.selectSingleNode("totals"))
2032: #set ($homeID = $homeNode.valueOf("@id"))
2033: #set ($visitorID = $visitorNode.valueOf("@id"))
2034: #set ($isNeutralGame = $document.valueOf("bbgame/venue/@neutralgame"))
2035: #if ($isNeutralGame.length() > 0 && $isNeutralGame.equals("Y"))
2036:     #set ($isNeutralGame = true)
2037: #else
2038:     #set ($isNeutralGame = false)
2039: #end
2040: 
2041: #set ($linkPlayers = $stats.linkPlayers)
2042: #set ($linkPlayersBase = $stats.linkPlayersBase)
2043: #set ($linkTeams = $stats.linkTeams)
2044: #set ($linkTeamsBase = $stats.linkTeamsBase)
2045: 
2046: #set ($qtrsRule = 4)
2047: #if ($document.valueOf("fbgame/venue/rules/@qtrs").length() > 0)
2048:  #set ($qtrsRule = $tool.math.toInteger($document.valueOf("fbgame/venue/rules/@qtrs")))
2049: #end
2050: #set ($quartersPlayed = $document.selectNodes("fbgame/team[1]/linescore/lineprd").size())
2051: #set ($hasPlayByPlay = false)
2052: #if ($document.selectNodes("fbgame/plays/qtr/play").size() > 0)
2053:   #set ($hasPlayByPlay = true)
2054: #end
2055: #set ($hasScoringSummaryText = false)
2056: #if ($document.selectNodes("fbgame/scores/score/@text").size() > 0)
2057:     #set ($hasScoringSummaryText = true)
2058: #end
2059: #set ($hasDriveSummary = false)
2060: #if ($document.selectNodes("fbgame/drives/drive[@start_qtr]").size() > 0)
2061:   #set ($hasDriveSummary = true)
2062: #end
2063: 
2064: #set ($hasBall = false)
2065: #set ($hasBall = $document.valueOf("fbgame/plays/downtogo/@hasball"))
2066: 
2067: #if ($stats.pageUrl.length() > 0 && !$stats.pageUrl.contains("?"))
2068:     #set ($paramSep = "?")
2069: #else
2070:     #set ($paramSep = "&")
2071: #end
2072: 
2073: #if ($homeNode.selectNodes("player[@gs='1']").size() > 0 || $visitorNode.selectNodes("player[@gs='1']").size() > 0)
2074:   #set ($hasStarters = true)
2075: #end
2076: 
2077: #set ($arenaRules = false)
2078: 
2079: #if ($document.valueOf("fbgame/venue/rules/@field") == 100)
2080:   #set ($americanRules = true)
2081: #elseif ($document.valueOf("fbgame/venue/rules/@field") == 50)
2082:   #set ($americanRules = false)
2083:   #set ($arenaRules = true)
2084: #else
2085:   #set ($americanRules = false)
2086: #end
2087: 
2088: #set ($date = $document.valueOf("fbgame/venue/@date"))
2089: #set ($time = $document.valueOf("fbgame/venue/@start"))
2090: #set ($location = $document.valueOf("fbgame/venue/@location"))
2091: #set ($stadium = $document.valueOf("fbgame/venue/@stadium"))
2092: #set ($attend = $document.valueOf("fbgame/venue/@attend"))
2093: #set ($duration = $document.valueOf("fbgame/venue/@duration"))
2094: #set ($weather = $document.valueOf("fbgame/venue/@weather"))
2095: #set ($temp = $document.valueOf("fbgame/venue/@temp"))
2096: #set ($wind = $document.valueOf("fbgame/venue/@wind"))
2097: 
2098: #macro (avg $att $yds)
2099: #set ($peratt = $tool.math.div($yds, $att))
2100: $!formatter.formatNumber($peratt, "0.0")
2101: #end
2102: 
2103: #macro (foratt $att $yds)
2104: #if ($att.length() > 0)${att}#else 0 #end#if ($yds.length() > 0)-${yds}#else 0 #end
2105: #end
2106: 
2107: #macro (att $att $yds)
2108: #if ($att.length() > 0)$att#else 0#end
2109: -#if ($yds.length() > 0)$yds#else 0#end
2110: #end
2111: 
2112: #macro (fraction $comp $att)
2113: #set ($success = 0)
2114: #set ($success = $tool.math.div($comp, $att))
2115: #set ($success = $tool.math.mul($success, 100))
2116: ${formatter.formatNumber($success, 0)}%
2117: ($comp of $att)
2118: #end
2119: 
2120: #macro (returnYds $team)
2121: #set ($yds = 0)
2122: #set ($yds = $tool.math.add($yds, $team.valueOf("kr/@yds")))
2123: #set ($yds = $tool.math.add($yds, $team.valueOf("pr/@yds")))
2124: #set ($yds = $tool.math.add($yds, $team.valueOf("ir/@yds")))
2125: $yds
2126: #end 
2127: 
2128: #macro (printQuarter $q)
2129: #set($q = $tool.math.toInteger($q))
2130:   #if ($q > $qtrsRule)
2131:     #if ($tool.math.sub($q, $qtrsRule) == 1)OT
2132:     #else ${tool.math.sub($q, $qtrsRule)}OT
2133:     #end
2134:   #else
2135:     #if ($q == 1)1st
2136:     #elseif ($q == 2)2nd
2137:     #elseif ($q == 3)3rd
2138:     #else ${q}th 
2139:     #end
2140:   #end
2141: #end
2142: 
2143: #macro (formatQuarterCount $i $extended)
2144:     #if ($browser.getIphone() || $browser.getMobile()) 
2145:         #if ($i > $qtrsRule)
2146:             #if ($tool.math.sub($i, $qtrsRule) == 1)
2147:                 OT
2148:             #else
2149:                 ${tool.math.sub($i, $qtrsRule)}OT
2150:             #end
2151:         #else
2152:             ##  ${i} QTR
2153:             #printQuarter(${i}) QTR
2154:         #end
2155:     #else
2156:         #if ($i > $qtrsRule)
2157:             #if ($tool.math.sub($i, $qtrsRule) == 1)
2158:                 OT
2159:             #else
2160:                 ${tool.math.sub($i, $qtrsRule)}OT
2161:             #end
2162:         #else
2163:             #if ($extended)
2164:                 #printQuarter(${i}) QTR
2165:             #else
2166:                 ${i}
2167:             #end
2168:         #end
2169:     #end
2170: #end
2171: 
2172: #set ($sortedNodes = [])
2173: #macro (sortNodes $nodes $prop)
2174: $sortedNodes.clear()
2175: #set ($error = false)
2176: #set ($processedNodes = {})
2177: #if ($nodes.size() > 0)
2178:  #foreach ($i in [1..$nodes.size()])
2179:   #if (! $error)
2180:    #set ($maxValue = "undefined")
2181:    #set ($nodeIndex = -1)
2182:    #foreach ($node in $nodes)
2183:     #if (!$processedNodes.containsKey($velocityCount))
2184:      #if ($maxValue == "undefined")
2185:       #set ($maxValue = $tool.math.toInteger($node.valueOf("@${prop}")))
2186:       #set ($nodeIndex = $velocityCount)
2187:      #end
2188:      #set ($compValue = $tool.math.toInteger($node.valueOf("@${prop}")))
2189:      #if ($maxValue < $compValue)
2190:       #set ($maxValue = $compValue)
2191:       #set ($nodeIndex = $velocityCount)
2192:      #end
2193:     #end
2194:    #end
2195:    $!processedNodes.put($nodeIndex, $maxValue)
2196:    #if (! $sortedNodes.add($nodes.get($tool.math.sub($nodeIndex, 1))))
2197:     #set ($error = true)
2198:     #set ($sortedNodes = $nodes)
2199:    #end
2200:   #end
2201:  #end
2202: #end
2203: #end ## macro
2204: 
2205: ## ROUTINE BASED ON THE SORT ROUTINE WRITTEN ABOVE
2206: #macro (sortDefenseNodes $nodes)
2207: $sortedNodes.clear()
2208: #set ($error = false)
2209: #set ($processedNodes = {})
2210: #if ($nodes.size() > 0)
2211:  #foreach ($i in [1..$nodes.size()])
2212:   #if (! $error)
2213:    #set ($maxValue = "undefined")
2214:    #set ($nodeIndex = -1)
2215:    #foreach ($node in $nodes)
2216:     #if (!$processedNodes.containsKey($velocityCount))
2217:      #if ($maxValue == "undefined")
2218:       #if ($americanRules)
2219:        #set ($maxValue = $tool.math.add($node.valueOf("@tackua"), $node.valueOf("@tacka")))
2220:       #else
2221:        #set ($maxValue = $tool.math.add($node.valueOf("@tackua"), $tool.math.div($node.valueOf("@tacka"), 2)))
2222:       #end
2223:       #set ($nodeIndex = $velocityCount)
2224:      #end
2225:      
2226:      #if ($americanRules)
2227:       #set ($compValue = $tool.math.add($node.valueOf("@tackua"), $node.valueOf("@tacka")))
2228:      #else
2229:       #set ($compValue = $tool.math.add($node.valueOf("@tackua"), $tool.math.div($node.valueOf("@tacka"), 2)))
2230:      #end
2231:      
2232:      #if ($maxValue < $compValue)
2233:       #set ($maxValue = $compValue)
2234:       #set ($nodeIndex = $velocityCount)
2235:      #end
2236:     #end
2237:    #end
2238:    $!processedNodes.put($nodeIndex, $maxValue)
2239:    #if (! $sortedNodes.add($nodes.get($tool.math.sub($nodeIndex, 1))))
2240:     #set ($error = true)
2241:     #set ($sortedNodes = $nodes)
2242:    #end
2243:   #end
2244:  #end
2245: #end
2246: #end ## macro
2247: 
2248: ## Handle all ways that football allows someone to score.
2249: #macro (printScore $score)
2250: #set ($scoretype = $score.valueOf("@type"))
2251: #set ($scorehow = $score.valueOf("@how"))
2252: 
2253: #if ($scoretype == "SAF")
2254: Team safety
2255: #elseif ($scoretype == "PAT")
2256:   $score.valueOf("@scorer") $score.valueOf("@yds") yd extra point return.
2257: #elseif ($scoretype == "1PT")
2258:   $score.valueOf("@scorer") rouge point.
2259: #elseif ($scoretype == "FG")
2260:   $score.valueOf("@scorer") $score.valueOf("@yds") yd field goal.
2261:   #set ($plays = $score.valueOf("@plays"))
2262:   #if ($plays.length() > 0)
2263:   <br />Drive: $plays plays, $score.valueOf("@drive") yards in $score.valueOf("@top").
2264:   #end
2265: #elseif ($scoretype == "TD")
2266:   #if ($scorehow == "RUSH")
2267:     $score.valueOf("@scorer") $score.valueOf("@yds") yd run.
2268:   #elseif ($scorehow == "PASS")
2269:     $score.valueOf("@scorer") $score.valueOf("@yds") yd pass from $score.valueOf("@passer").
2270:   #elseif ($scorehow == "INT")
2271:     $score.valueOf("@scorer") $score.valueOf("@yds") yd interception return.
2272:   #elseif ($scorehow == "FUMB")
2273:     $score.valueOf("@scorer") $score.valueOf("@yds") yd fumble recovery.
2274:   #elseif ($scorehow == "KO")
2275:     $score.valueOf("@scorer") $score.valueOf("@yds") yd kickoff return.
2276:   #elseif ($scorehow == "PUNT")
2277:     #if ($score.valueOf("@blocked") == "Y")
2278:       Punt blocked, returned $score.valueOf("@yds") by $score.valueOf("@scorer") for TD.
2279:     #else
2280:       $score.valueOf("@scorer") $score.valueOf("@yds") yd punt return for TD.
2281:     #end
2282:   #elseif ($scorehow == "FGA")
2283:     #if ($score.valueOf("@blocked") == "Y")
2284:       FG blocked, returned $score.valueOf("@yds") by $score.valueOf("@scorer") for TD.
2285:     #else
2286:       $score.valueOf("@scorer") $score.valueOf("@yds") yd missed FG return.
2287:     #end
2288:   #else
2289:     Touchdown
2290:   #end
2291: 
2292: ## Extra point fun
2293: #set ($pattype = $score.valueOf("@pattype"))
2294: #set ($patres = $score.valueOf("@patres"))
2295: #if ($pattype == "KICK")
2296:     ($score.valueOf("@patby") kick
2297:     #if ($patres == "GOOD")
2298:         is good).
2299:     #elseif ($patres == "FAIL")
2300:         failed).
2301:     #elseif ($patres == "BLKD")
2302:         blocked).
2303:     #else
2304:         $patres).
2305:     #end
2306: #elseif ($pattype == "PASS")
2307:     (2pt conversion pass by $score.valueOf("@patby")
2308:     #if ($patres == "GOOD")
2309:         is good).
2310:     #elseif ($patres == "FAIL")
2311:         failed).
2312:     #elseif ($patres == "INT")
2313:         intercepted - no score).
2314:     #else
2315:         $patres).
2316:     #end
2317: #elseif ($pattype == "RUSH")
2318:     (2pt conversion rush by $score.valueOf("@patby")
2319:     #if ($patres == "GOOD")
2320:         is good).
2321:     #elseif ($patres == "FAIL")
2322:         failed).
2323:     #elseif ($patres == "FUMB")
2324:         fumbled - no score).
2325:     #else
2326:     $patres).
2327:     #end
2328: #elseif ($pattype != "")
2329:     ($pattype).
2330: #end
2331: 
2332: #set ($plays = $score.valueOf("@plays"))
2333: #if ($plays.length() > 0)
2334: <br />
2335: Drive: $plays plays, $score.valueOf("@drive") yards in $score.valueOf("@top").
2336: #end
2337: #end
2338: 
2339: #end ##end macro
2340: 
2341: #macro (printPlayerName $playerNode, $linkTeam)
2342:   #if ($browser.getIphone() || $browser.getMobile())
2343:     $playerNode.valueOf("@name")
2344:   #else
2345:     #if ($playerNode.valueOf("@playerId").length() > 0 and $linkPlayers and $linkTeam.length() > 0)
2346:       <a href="$!linkPlayersBase?id=${playerNode.valueOf('@playerId')}">$playerNode.valueOf("@name")</a>
2347:     #else
2348:       $playerNode.valueOf("@name")
2349:     #end
2350:   #end
2351: #end
2352: 
2353: 
2354: #if ($browser.getIphone() || $browser.getMobile())  ##MOBILE VERSION
2355: 
2356: ## serve dependencies if missing
2357: <script>
2358: if (!$('link[href="/info/mobile/stats/mobile-stats.css"]').length) {
2359:   $('head').eq(0).append('<link rel="stylesheet" type="text/css" href="/info/responsive-temp-mobile-stats.css" />');
2360: }
2361: 
2362: if (typeof $.mobileSite === "undefined") {
2363:   var script = document.createElement('script');
2364:   script.src = "/info/mobile/mobile-js/mobile-site.js";
2365:   $('body').eq(0).append(script);
2366: }
2367: 
2368: if (typeof $LAB === "undefined") {
2369:   var script = document.createElement('script');
2370:   script.src = "/info/mobile/mobile-js/LAB.min.js";
2371:   $('body').eq(0).append(script);
2372: }
2373: </script>
2374: 
2375: ## TEAM LINK 
2376: #macro (mobile_showTeam $team)
2377:     $team.attributeValue("name")
2378: #end
2379: 
2380: #macro (printMobileHeader)
2381: 
2382: <div class="teams">
2383:     <div class="frame clearfix">
2384:         <div class="team">
2385:             #mobile_showTeam($visitorNode)
2386:         </div>
2387:         <div class="versus">vs.</div>
2388:         <div class="team right">
2389:             #mobile_showTeam($homeNode)
2390:         </div>
2391:     </div>
2392: </div>
2393: 
2394: <div class="board">
2395:     <div class="frame clearfix">
2396:         <div class="result">
2397:             $visitorNode.valueOf("linescore/@score")
2398:         </div>
2399:         
2400:         <div class="timer">
2401:             #if ($stats.final)
2402:                 <div class="time">Final</div>
2403:             #else
2404:                 <div class="time">$document.valueOf("fbgame/plays/downtogo/@clock")</div>
2405:                 <div class="half">#formatQuarterCount($tool.math.toInteger($document.valueOf("fbgame/plays/downtogo/@qtr")), true) </div>
2406:             #end
2407:         </div>
2408:         
2409:         <div class="result">
2410:             $homeNode.valueOf("linescore/@score")
2411:         </div>
2412:     </div>
2413: </div>
2414: 
2415: #end
2416: 
2417: <script type="text/javascript"> 
2418:     mobileConf.page = 'boxscore'; 
2419:     mobileConf.pageParams = {
2420:         deepLinking : true
2421:         #if ($stats.inProgress)
2422:             , inprogress : true
2423:         #end
2424:     }
2425: </script>
2426: 
2427: 
2428: <div class="swipe-header">
2429:     <a href="#" id="swipe-left"></a>
2430:     <a href="#" id="swipe-right"></a>
2431:     <ul class="dot-nav #if ($stats.inProgress) four #end">
2432:         <li class="dot-nav-1 active"></li>
2433:         <li class="dot-nav-2"></li>
2434:         <li class="dot-nav-3"></li>
2435:         #if ($stats.inProgress)
2436:             <li class="dot-nav-4"></li>
2437:         #end
2438:     </ul>
2439: </div>
2440: <div id="swipe-wrapper">
2441: <div id="live2" class="boxscore-wrapper footbal-stats">
2442: <!-- BEGIN IN PROGRESS-->
2443: #if ($stats.inProgress)
2444: <div class="swipe-screen" data-view="inprogress">
2445:     <div class="score_board">
2446:         #printMobileHeader()
2447:         
2448:         ## IN PROGRESS
2449:         <div class="table">
2450:             <div class="frame">
2451:                 <div class="clearfix">
2452:                     <div class="cell cell_s">&#160;</div>
2453:                     <div class="cell cell_m #if($hasBall == "V") has-ball #end">&#160;</div>
2454:                     <div class="cell cell_l">
2455:                         #printQuarter($document.valueOf("fbgame/plays/downtogo/@down")) 
2456:                         #if ($document.valueOf("fbgame/plays/downtogo/@togo") == "0") and Goal  #else  and $document.valueOf("fbgame/plays/downtogo/@togo")  #end 
2457:                         at $document.valueOf("fbgame/plays/downtogo/@spot")
2458:                     </div>
2459:                     <div class="cell cell_m #if($hasBall == "H") has-ball #end">&#160;</div>
2460:                     <div class="cell cell_s">&#160;</div>
2461:                 </div>
2462: 
2463:                 <div class="clearfix">
2464:                     <div class="cell cell_s">&#160;</div>
2465:                     <div class="cell cell_m">$document.valueOf("fbgame/plays/downtogo/@vtoh")</div>
2466:                     <div class="cell cell_l">Timeouts</div>
2467:                     <div class="cell cell_m">$document.valueOf("fbgame/plays/downtogo/@htoh")</div>
2468:                     <div class="cell cell_s">&#160;</div>
2469:                 </div>
2470:             </div>
2471:         </div>
2472: 
2473:         ##RECENT PLAYS
2474:         <div class="recent">
2475:             <div class="frame">
2476:                 <div class="toggle">
2477:                     <div class="title">Recent Plays</div>
2478:                     <div class="arrow">
2479:                         <img src="/info/mobile/stats/images/arrow_down2.gif" class="recent_arrow_down" width="13" height="9"/>
2480:                         <img src="/info/mobile/stats/images/arrow_up2.gif" class="recent_arrow_up" style="display: none;" width="13" height="9"/>
2481:                     </div>
2482:                 </div>
2483:                 
2484:                 <div class="plays recent_plays reverse" style="display:none">   
2485:                     #set ($qtrNodes = $document.selectNodes("fbgame/plays/qtr"))
2486:                     
2487:                     #foreach ($q in [1..$qtrNodes.size()]) ## looping through quarters
2488:                         
2489:                         #set ($sectionTitle = '')
2490:                         
2491:                         #set ($nodes = $qtrNodes.get($tool.math.sub($q, 1)).selectNodes('*'))
2492:                         #foreach ($node in $nodes) ## looping through nodes for each quarter
2493:                             <div class="clearfix">
2494:                             
2495:                             #if ($velocityCount == $nodes.size())
2496:                                 <div class="play period">
2497:                                     #printQuarter($q)
2498:                                 </div>
2499:                                 <div class="play period">$!sectionTitle  in #printQuarter($q)</div>
2500:                             #end        
2501:                             
2502:                             #if ($node.getName() == "drivestart") ## nodetypes
2503:                                 #if ($node.valueOf("@vh") == "V")
2504:                                 
2505:                                     #set ($driveStart = "$visitor began drive at $node.valueOf('@clock')")
2506:                                 #else
2507:                                     #set ($driveStart = "$home began drive at $node.valueOf('@clock')")
2508:                                 #end
2509:                                 
2510:                                 #if ($sectionTitle == '')
2511:                                     #set ($sectionTitle = $driveStart)
2512:                                 #else   
2513:                                     <div class="play period">$!sectionTitle in #printQuarter($q)</div>
2514:                                     #set ($sectionTitle = $driveStart)
2515:                                 #end
2516:                                 
2517:                             #elseif ($node.getName() == "play")
2518:                                 <div class="play clearfix">
2519:                                 #if ($node.valueOf("@type") == "K" || $node.valueOf("@type") == "X") ## node with a K
2520:                                     <div class="time">&#160;</div>
2521:                                     <div class="text">$node.valueOf("@text")</div>
2522:                                 #else
2523:                                     <div class="time">
2524:                                     #if ($node.valueOf("@togo") == "0")
2525:                                         #printQuarter($node.valueOf("@down")) & Goal<br />at $node.valueOf("@spot")
2526:                                     #else
2527:                                         #printQuarter($node.valueOf("@down")) & $node.valueOf("@togo")<br /> at $node.valueOf("@spot")
2528:                                     #end
2529:                                     </div>
2530:                                     <div class="text">$node.valueOf("@text")</div>
2531:                                 #end ## node with a K
2532:                                 </div>
2533:                             #elseif ($node.getName() == "drivesum")
2534:                                 <div class="play clearfix">                 
2535:                                     <div class="time">&#160;</div>
2536:                                     <div class="text"><strong>$node.valueOf("@plays") plays, $node.valueOf("@yards") yards, $node.valueOf("@top") elapsed</strong></div>
2537:                                 </div>
2538:                             #end ## nodetypes
2539:                             </div>
2540:                         #end ## looping through nodes for each quarter
2541:                     #end ## looping through quarters        
2542:                 </div>
2543:             </div>
2544:             <div class="button active hidden" id="load-more-plays">
2545:                 <div class="team">More Plays</div>
2546:             </div>
2547:         </div>
2548:     </div>
2549: </div>
2550: 
2551: <div class="swipe-screen" data-view="scoring">
2552:     <div class="score_board">
2553:         #printMobileHeader()
2554:         ## SCORE BY PERIOD
2555:         <div class="table">
2556:             <div class="frame">             
2557:                 #foreach ($i in [1..$quartersPlayed])
2558:                     <div class="clearfix">
2559:                         <div class="cell cell_s">&#160;</div>
2560:                         <div class="cell cell_m">$visitorNode.valueOf("linescore/lineprd[$i]/@score")</div>
2561:                         <div class="cell cell_l">
2562:                             #formatQuarterCount($i,true)
2563:                         </div>
2564:                         <div class="cell cell_m">$homeNode.valueOf("linescore/lineprd[$i]/@score")</div>
2565:                         <div class="cell cell_s">&#160;</div>
2566:                     </div>  
2567:                 #end
2568:                 
2569:                 <div class="clearfix">
2570:                     <div class="cell cell_s">&#160;</div>
2571:                     <div class="cell cell_m">$visitorNode.valueOf("linescore/@score")</div>
2572:                     <div class="cell cell_l">Total</div>
2573:                     <div class="cell cell_m">$homeNode.valueOf("linescore/@score")</div>
2574:                     <div class="cell cell_s">&#160;</div>
2575:                 </div>
2576:             </div>
2577:         </div>
2578:         
2579:         
2580:         ## SCORING SUMMARY
2581:         #if ($hasPlayByPlay)
2582:         <div class="recent">
2583:             <div class="frame">
2584:                 <div class="toggle clearfix">
2585:                     <div class="title">Scoring Summary</div>
2586:                     <div class="arrow">
2587:                         <img height="9" width="13" class="recent_arrow_down" src="/info/mobile/stats/images/arrow_down2.gif" style="display: inline;">
2588:                         <img height="9" width="13" style="display: none;" class="recent_arrow_up" src="/info/mobile/stats/images/arrow_up2.gif">
2589:                     </div>
2590:                 </div>
2591:                 
2592:                 <div class="plays recent_plays" style="display: none;">
2593:                     ## SCORING SUMMARY
2594:                     #set ($summaryPeriod = "")
2595:                     #foreach ($score in $document.selectNodes("fbgame/scores/score"))
2596:                         #if($score.attributeValue("type").length() > 0)             
2597:                             #set ($shownStats = "")
2598:                             #if ($summaryPeriod != $score.valueOf("@qtr"))
2599:                             <div class="play period">
2600:                                 #set ($summaryPeriod = $score.valueOf("@qtr"))
2601:                                 #formatQuarterCount($tool.math.toInteger($score.valueOf("@qtr")), true)
2602:                             </div>
2603:                             #end
2604:                             #set ($shownStats = "y")
2605:                             <div class="play clearfix">
2606:                                 <div class="time">
2607:                                     $score.attributeValue("clock")
2608:                                 </div>
2609:                                 <div class="text">
2610:                                     #if ($score.valueOf("@vh") == "V")
2611:                                         <strong>$visitor</strong> -
2612:                                     #else
2613:                                         <strong>$home</strong> -
2614:                                     #end
2615:                                     #printScore($score)
2616:                                 </div>
2617:                             </div>
2618:                         #end
2619:                     #end
2620:                     #if ($shownStats == "")
2621:                         <div class="play clearfix center">(no scoring)</div>
2622:                     #end
2623:                 </div>
2624:             </div>
2625:         </div>
2626:         #end
2627:         
2628:     </div>
2629: </div>
2630: <!-- END IN PROGRESS -->
2631: 
2632: #else
2633: 
2634: <!-- BEGIN SCOREBOARD -->
2635: <div class="swipe-screen" data-view="scoring">
2636:     <div class="score_board">
2637:         #printMobileHeader()
2638: 
2639:         ## SCORE BY PERIOD
2640:         <div class="table">
2641:             <div class="frame">
2642:                 <div class="clearfix">
2643:                     <div class="cell cell_s">&#160;</div>
2644:                     <div class="cell cell_m">&#160;</div>
2645:                     <div class="cell cell_l">SCORE BY PERIOD</div>
2646:                     <div class="cell cell_m">&#160;</div>
2647:                     <div class="cell cell_s">&#160;</div>
2648:                 </div>
2649:                 
2650:                 #foreach ($i in [1..$quartersPlayed])
2651:                     <div class="clearfix">
2652:                         <div class="cell cell_s">&#160;</div>
2653:                         <div class="cell cell_m">$visitorNode.valueOf("linescore/lineprd[$i]/@score")</div>
2654:                         <div class="cell cell_l">
2655:                             #formatQuarterCount($i, true)
2656:                         </div>
2657:                         <div class="cell cell_m">$homeNode.valueOf("linescore/lineprd[$i]/@score")</div>
2658:                         <div class="cell cell_s">&#160;</div>
2659:                     </div>  
2660:                 #end
2661:                 
2662:                 <div class="clearfix">
2663:                     <div class="cell cell_s">&#160;</div>
2664:                     <div class="cell cell_m">$visitorNode.valueOf("linescore/@score")</div>
2665:                     <div class="cell cell_l">Total</div>
2666:                     <div class="cell cell_m">$homeNode.valueOf("linescore/@score")</div>
2667:                     <div class="cell cell_s">&#160;</div>
2668:                 </div>
2669:             </div>
2670:         </div>
2671:         
2672:         
2673:         ## SCORING SUMMARY
2674:         #if ($hasPlayByPlay)
2675:         <div class="recent">
2676:             <div class="frame">
2677:                 <div class="toggle clearfix">
2678:                     <div class="title">Scoring Summary</div>
2679:                     <div class="arrow">
2680:                         <img height="9" width="13" class="recent_arrow_down" src="/info/mobile/stats/images/arrow_down2.gif" style="display: inline;">
2681:                         <img height="9" width="13" style="display: none;" class="recent_arrow_up" src="/info/mobile/stats/images/arrow_up2.gif">
2682:                     </div>
2683:                 </div>
2684:                 
2685:                 <div class="plays recent_plays" style="display: none;">
2686:                     ## SCORING SUMMARY
2687:                     #set ($summaryPeriod = "")
2688:                     #foreach ($score in $document.selectNodes("fbgame/scores/score"))   
2689:                         #if($score.attributeValue("type").length() > 0)                     
2690:                             #set ($shownStats = "")
2691:                             #if ($summaryPeriod != $score.valueOf("@qtr"))
2692:                             <div class="play period">
2693:                                 #set ($summaryPeriod = $score.valueOf("@qtr"))
2694:                                 #formatQuarterCount($tool.math.toInteger($score.valueOf("@qtr")), true)
2695:                             </div>
2696:                             #end
2697:                             #set ($shownStats = "y")
2698:                             <div class="play clearfix">
2699:                                 <div class="time">
2700:                                     $score.attributeValue("clock")
2701:                                 </div>
2702:                                 <div class="text">
2703:                                     #if ($score.valueOf("@vh") == "V")
2704:                                         <strong>$visitor</strong> -
2705:                                     #else
2706:                                         <strong>$home</strong> -
2707:                                     #end
2708:                                     #printScore($score)
2709:                                 </div>
2710:                             </div>
2711:                         #end
2712:                     #end
2713:                     #if ($shownStats == "")
2714:                         <div class="play clearfix center">(no scoring)</div>
2715:                     #end
2716:                 </div>
2717:             </div>
2718:         </div>
2719:         #elseif ($hasScoringSummaryText)
2720:             <div class="recent">
2721:                 <div class="frame">
2722:                     <div class="toggle clearfix">
2723:                         <div class="title">Scoring Summary</div>
2724:                         <div class="arrow">
2725:                             <img height="9" width="13" class="recent_arrow_down" src="/info/mobile/stats/images/arrow_down2.gif" style="display: inline;">
2726:                             <img height="9" width="13" style="display: none;" class="recent_arrow_up" src="/info/mobile/stats/images/arrow_up2.gif">
2727:                         </div>
2728:                     </div>
2729: 
2730:                     <div class="plays recent_plays" style="display: none;">
2731:                         ## SCORING SUMMARY
2732:                         <div class="play clearfix">
2733:                             <div class="text">
2734:                             #foreach ($score in $document.selectNodes("fbgame/scores/score"))
2735:                                 $score.attributeValue("text")
2736:                             #end
2737:                             </div>
2738:                         </div>
2739:                     </div>
2740:                 </div>
2741:             </div>
2742:         #end
2743:         
2744:     </div>
2745: </div>
2746: <!-- END SCORE BOARD-->
2747: 
2748: #end ## IN PROGRESS
2749: 
2750: <!-- BEGIN LINE UP -->
2751: <div class="swipe-screen" data-view="boxscore">
2752:     #printMobileHeader()
2753:     <div class="team_stats">
2754:         <div class="teams clearfix"> 
2755:             <div class="button active clearfix" id="button-1">
2756:                 <div class="team">#mobile_showTeam($visitorNode)</div>
2757:                 <div class="end">
2758:                     <div>&#160;</div>
2759:                 </div>
2760:             </div>
2761:             <div class="button clearfix" id="button-2">
2762:                 <div class="team">#mobile_showTeam($homeNode)</div>
2763:                 <div class="end">
2764:                     <div>&#160;</div>
2765:                 </div>
2766:             </div> 
2767:             
2768: #macro (printEmpty $v) #if ($v.length() > 0) $v #else - #end #end           
2769:             
2770: #macro (mobile_passing $team)
2771: <div class="titles clearfix">
2772:     <div class="data">#</div>
2773:     <div class="name">PASSING</div>
2774:     <div class="data">C-A</div>
2775:     <div class="data">YDS</div>
2776:     <div class="data">LG</div>
2777:     <div class="data">TD</div>
2778:     <div class="data">INT</div>
2779: </div>
2780: #sortNodes ($team.selectNodes("player/pass"), "yds")
2781: #foreach ($stat in $sortedNodes)
2782: <div class="row">
2783:     <div class="toggle clearfix">
2784:         <div class="data">$stat.valueOf("../@uni")</div>
2785:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
2786:         <div class="data">$!stat.valueOf("@comp")-$!stat.valueOf("@att")</div>
2787:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
2788:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
2789:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
2790:         <div class="data">#printEmpty($stat.valueOf("@int"))</div>
2791:     </div>
2792: </div>
2793: #end
2794: #end ##macro
2795: 
2796: #macro (mobile_rushing $team)
2797: <div class="titles clearfix">
2798:     <div class="data">#</div>
2799:     <div class="name">RUSHING</div>
2800:     <div class="data">ATT</div>
2801:     <div class="data">YDS</div>
2802:     <div class="data">AVG</div>
2803:     <div class="data">LG</div>
2804:     <div class="data">TD</div>
2805: </div>
2806: #sortNodes ($team.selectNodes("player/rush"), "yds")
2807: #foreach ($stat in $sortedNodes)
2808: <div class="row">
2809:     <div class="toggle clearfix">
2810:         <div class="data">$stat.valueOf("../@uni")</div>
2811:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
2812:         <div class="data">#printEmpty($stat.valueOf("@att"))</div>
2813:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
2814:         <div class="data">#avg($stat.valueOf("@att") $stat.valueOf("@yds"))</div>
2815:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
2816:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
2817:     </div>
2818: </div>
2819: #end
2820: #end ##macro
2821: 
2822: #macro (mobile_receiving $team)
2823: <div class="titles clearfix">
2824:     <div class="data">#</div>
2825:     <div class="name">RECEIVING</div>
2826:     <div class="data">NO</div>
2827:     <div class="data">YDS</div>
2828:     <div class="data">AVG</div>
2829:     <div class="data">LG</div>
2830:     <div class="data">TD</div>
2831: </div>
2832: #sortNodes ($team.selectNodes("player/rcv"), "yds")
2833: #foreach ($stat in $sortedNodes)
2834: <div class="row">
2835:     <div class="toggle clearfix">
2836:         <div class="data">$stat.valueOf("../@uni")</div>
2837:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
2838:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
2839:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
2840:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
2841:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
2842:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
2843:     </div>
2844: </div>
2845: #end
2846: #end ##macro
2847: 
2848: #macro (mobile_kicking $team) 
2849: <div class="titles clearfix">
2850:     <div class="data">#</div>
2851:     <div class="name">KICKING</div>
2852:     <div class="data">FG</div>
2853:     <div class="data">LG</div>
2854:     <div class="data">XP</div>
2855:     #if (!$americanRules && !$arenaRules)
2856:         <div class="data">RG</div>
2857:     #end
2858:     <div class="data">PTS</div>
2859: </div>
2860:  
2861: ## Scan for fg, scan for pat, filtering those out
2862: ## then merge and loop
2863: 
2864: #set ($players = [])
2865: #foreach ($stat in $team.selectNodes("player/fg"))
2866:  #set ($playerMap = {}) 
2867:  #set ($player = $stat.valueOf("../@name")) 
2868:  $!playerMap.put("name", $player) 
2869:  $!playerMap.put("uni", $stat.valueOf("../@uni"))
2870:  $!playerMap.put("pID", $stat.valueOf("../@playerId"))
2871:  $!playerMap.put("fgm", $stat.valueOf("@made"))
2872:  $!playerMap.put("fga", $stat.valueOf("@att"))
2873:  $!playerMap.put("long", $stat.valueOf("@long"))
2874:  #set ($ignore = $players.add($playerMap))
2875: #end
2876: 
2877: #foreach ($stat in $team.selectNodes("player/pat"))
2878: #if ($stat.valueOf("@kickatt").length() > 0)
2879:  #set ($playerMap = {})
2880:  #set ($player = $stat.valueOf("../@name"))
2881:  #foreach ($existingPlayer in $players)
2882:   #if ($player == $existingPlayer.get("name"))
2883:    #set ($playerMap = $existingPlayer)
2884:   #end
2885:  #end ## foreach existing players
2886:  #if ($playerMap.isEmpty())
2887:   #set ($ignore = $players.add($playerMap))
2888:   $!playerMap.put("name", $player)
2889:   $!playerMap.put("uni", $stat.valueOf("../@uni"))
2890:   $!playerMap.put("pID", $stat.valueOf("../@playerId"))
2891:  #end
2892:  $!playerMap.put("patm", $stat.valueOf("@kickmade"))
2893:  $!playerMap.put("pata", $stat.valueOf("@kickatt"))
2894: #end ## if filtering out non-kickers
2895: #end
2896: 
2897: #if (!$americanRules && !$arenaRules)
2898: #foreach ($stat in $team.selectNodes("player/scoring"))
2899:  #if ($stat.valueOf("@rouge").length() > 0)
2900:   #set ($playerMap = {})
2901:   #set ($player = $stat.valueOf("../@name"))
2902:   #foreach ($existingPlayer in $players)
2903:    #if ($player == $existingPlayer.get("name"))
2904:     #set ($playerMap = $existingPlayer)
2905:    #end
2906:   #end ## foreach existingPlayer
2907:   #if ($playerMap.isEmpty())
2908:    $!playerMap.put("name", $player)
2909:    $!playerMap.put("uni", $stat.valueOf("../@uni"))
2910:    $!playerMap.put("pID", $stat.valueOf("../@playerId"))
2911:    #set ($ignore = $players.add($playerMap))
2912:   #end
2913:   $!playerMap.put("rg", $stat.valueOf("@rouge"))
2914:  #end ## filter rouge points
2915: #end ## loop
2916: #end ## if canadian game
2917: 
2918: #foreach ($playerMap in $players)
2919: <div class="row">
2920:     <div class="toggle clearfix">   
2921:         <div class="data">$playerMap.get("uni")</div>
2922:         <div class="name">$playerMap.get("name")</div>
2923:         <div class="data">
2924:             #if ($playerMap.get("fga"))
2925:                 $playerMap.get("fgm")/$playerMap.get("fga")
2926:             #else
2927:                 -
2928:             #end
2929:         </div>
2930:         <div class="data">
2931:             #if ($playerMap.get("fga"))
2932:                 $playerMap.get("long")
2933:             #else
2934:                 -
2935:             #end
2936:         </div>
2937:         <div class="data">
2938:             #if ($playerMap.get("pata"))
2939:                 $playerMap.get("patm")/$playerMap.get("pata")
2940:             #else
2941:                 -
2942:             #end
2943:         </div>
2944:         #if (!$americanRules && !$arenaRules)
2945:             <div class="data">
2946:                 #if ($playerMap.get("rg"))
2947:                     $playerMap.get("rg")
2948:                 #else
2949:                     -
2950:                 #end
2951:             </div>
2952:         #end
2953: 
2954:         #set ($pts = 0)
2955:         #set ($pts = $tool.math.mul(3, $playerMap.get("fgm")))
2956:         #set ($pts = $tool.math.add($pts, $playerMap.get("patm")))
2957:         #if ($playerMap.get("rg"))
2958:             #set ($pts = $tool.math.add($pts, $playerMap.get("rg")))
2959:         #end    
2960:         <div class="data">#printEmpty($pts)</div>
2961:     </div>
2962: </div>
2963: #end
2964: #end ##macro
2965: 
2966: #macro (mobile_punting $team)
2967: <div class="titles clearfix">
2968:     <div class="data">#</div>
2969:     <div class="name">PUNTING</div>
2970:     <div class="data">NO</div>
2971:     <div class="data">YDS</div>
2972:     <div class="data">AVG</div>
2973:     <div class="data">LG</div>
2974:     ## <div class="data">TB</div>
2975:     <div class="data">IN 20</div>
2976: </div>
2977: #foreach ($stat in $team.selectNodes("player/punt"))
2978: <div class="row">
2979:     <div class="toggle clearfix">
2980:         <div class="data">$stat.valueOf("../@uni")</div>
2981:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
2982:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
2983:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
2984:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
2985:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
2986:         ## <div class="data">#printEmpty($stat.valueOf("@tb"))</div>
2987:         <div class="data">#printEmpty($stat.valueOf("@inside20"))</div>
2988:     </div>
2989: </div>
2990: #end
2991: #end ##macro
2992: 
2993: 
2994: #macro (mobile_kickoffs $team)
2995: <div class="titles clearfix">
2996:     <div class="data">#</div>
2997:     <div class="name">KICKOFFS</div>
2998:     <div class="data">NO</div>
2999:     <div class="data">YDS</div>
3000:     <div class="data">AVG</div>
3001:     <div class="data">TB</div>
3002:     <div class="data">OB</div>
3003: </div>
3004: #set ($statNodes = $team.selectNodes("player/ko"))
3005: #foreach ($stat in $statNodes)
3006: <div class="row">
3007:     <div class="toggle clearfix">
3008:         <div class="data">$stat.valueOf("../@uni")</div>
3009:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3010:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
3011:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
3012:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
3013:         <div class="data">#printEmpty($stat.valueOf("@tb"))</div>
3014:         <div class="data">#printEmpty($stat.valueOf("@ob"))</div>
3015:     </div>
3016: </div>
3017: #end
3018: #end ##macro
3019: 
3020: #macro (mobile_interceptions $team) 
3021: <div class="titles clearfix">
3022:     <div class="data">#</div>
3023:     <div class="name">Interception Returns</div>
3024:     <div class="data">NO</div>
3025:     <div class="data">YDS</div>
3026:     <div class="data">AVG</div>
3027:     <div class="data">LG</div>
3028:     <div class="data">TD</div>
3029: </div>
3030: #set ($statNodes = $team.selectNodes("player/ir"))
3031: #foreach ($stat in $statNodes)
3032: <div class="row">
3033:     <div class="toggle clearfix">
3034:         <div class="data">$stat.valueOf("../@uni")</div>
3035:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3036:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
3037:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
3038:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
3039:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
3040:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
3041:     </div>
3042: </div>
3043: #end
3044: #end ##macro
3045: 
3046: 
3047: #macro (mobile_puntreturns $team)
3048: <div class="titles clearfix">
3049:     <div class="data">#</div>
3050:     <div class="name">PUNT RETURNS</div>
3051:     <div class="data">NO</div>
3052:     <div class="data">YDS</div>
3053:     <div class="data">AVG</div>
3054:     <div class="data">LG</div>
3055:     <div class="data">TD</div>
3056: </div>
3057: #sortNodes ($team.selectNodes("player/pr"), "yds")
3058: #foreach ($stat in $sortedNodes)
3059: <div class="row">
3060:     <div class="toggle clearfix">
3061:         <div class="data">$stat.valueOf("../@uni")</div>
3062:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3063:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
3064:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
3065:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
3066:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
3067:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
3068:     </div>
3069: </div> 
3070: #end
3071: #end ##macro
3072: 
3073: #macro (mobile_kickoffreturns $team)
3074: <div class="titles clearfix">
3075:     <div class="data">#</div>
3076:     <div class="name">KICKOFF RETURNS</div>
3077:     <div class="data">NO</div>
3078:     <div class="data">YDS</div>
3079:     <div class="data">AVG</div>
3080:     <div class="data">LG</div>
3081:     <div class="data">TD</div>
3082: </div>
3083: #sortNodes ($team.selectNodes("player/kr"), "yds")
3084: #foreach ($stat in $sortedNodes)
3085: <div class="row">
3086:     <div class="toggle clearfix">
3087:         <div class="data">$stat.valueOf("../@uni")</div>
3088:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3089:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
3090:         <div class="data">#printEmpty($stat.valueOf("@yds"))</div>
3091:         <div class="data">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</div>
3092:         <div class="data">#printEmpty($stat.valueOf("@long"))</div>
3093:         <div class="data">#printEmpty($stat.valueOf("@td"))</div>
3094:     </div>
3095: </div> 
3096: #end
3097: #end ##macro
3098: 
3099: #macro (mobile_fumbles $team)
3100: <div class="titles clearfix">
3101:     <div class="data">#</div>
3102:     <div class="name">FUMBLES</div>
3103:     <div class="data">NO</div>
3104:     <div class="data">LOST</div>
3105: </div>
3106:  
3107: #set ($statNodes = $team.selectNodes("player/fumbles"))
3108: #foreach ($stat in $statNodes)
3109: <div class="row">
3110:     <div class="toggle clearfix">
3111:         <div class="data">$stat.valueOf("../@uni")</div>
3112:         <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3113:         <div class="data">#printEmpty($stat.valueOf("@no"))</div>
3114:         <div class="data">#printEmpty($stat.valueOf("@lost"))</div>
3115:     </div>
3116: </div> 
3117: #end
3118: #end ##macro
3119:             
3120:             
3121: #macro (mobile_defense $team)
3122: <div class="titles clearfix">
3123:     <div class="data">#</div>
3124:    #if ($americanRules || $arenaRules)
3125:     <div class="name">DEFENSE</div>
3126:    #else
3127:     <div class="name">DEFENCE</div>
3128:    #end
3129:     <div class="data">TKL</div>
3130:     <div class="data">AST</div>
3131:     <div class="data">SCK</div>
3132:     <div class="data">FF</div>
3133:     <div class="data">INT</div>
3134: </div>
3135: 
3136: #sortDefenseNodes ($team.selectNodes("player/defense"))
3137: #foreach ($stat in $sortedNodes)
3138: 
3139:     ## ADD HALF SACKS
3140:     #set($sacks = 0)
3141:     #set ($sacks = $!tool.math.div($stat.valueOf("@sacka"), 2))
3142:     #set ($sacks = $!tool.math.add($stat.valueOf("@sackua"), $sacks))
3143:     
3144:     #if($sacks == "0")#set($sacks = "")#end
3145: 
3146:     <div class="row">
3147:         <div class="toggle clearfix">
3148:             <div class="data">$stat.valueOf("../@uni")</div>
3149:             <div class="name">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</div>
3150:             <div class="data">#printEmpty($stat.valueOf("@tackua"))</div>
3151:             <div class="data">#printEmpty($stat.valueOf("@tacka"))</div>
3152:             <div class="data">$sacks</div>
3153:             <div class="data">#printEmpty($stat.valueOf("@ff"))</div>
3154:             <div class="data">#printEmpty($stat.valueOf("@int"))</div>
3155:         </div>
3156:     </div>
3157: #end
3158: #end ##macro
3159:                         
3160:             
3161:             ## VISITOR STATISTICS
3162:             <div class="table" id="table_team_stats_1">
3163:                 #mobile_passing($visitorNode)
3164:                 #mobile_rushing($visitorNode)
3165:                 #mobile_receiving($visitorNode)
3166:                 #mobile_kicking($visitorNode)
3167:                 #if (! $arenaRules)
3168:                     #mobile_punting($visitorNode)
3169:                 #end
3170:                 #mobile_kickoffs($visitorNode)
3171:                 #mobile_interceptions($visitorNode)
3172:                 #if (! $arenaRules)
3173:                     #mobile_puntreturns($visitorNode)
3174:                 #end
3175:                 #mobile_kickoffreturns($visitorNode)
3176:                 #mobile_fumbles($visitorNode)
3177:                 #mobile_defense($visitorNode)
3178:             </div>
3179: 
3180:             ## HOME STATISTICS
3181:             <div class="table" id="table_team_stats_2" style="display: none">
3182:                 #mobile_passing($homeNode)
3183:                 #mobile_rushing($homeNode)
3184:                 #mobile_receiving($homeNode)
3185:                 #mobile_kicking($homeNode)
3186:                 #if (! $arenaRules)
3187:                     #mobile_punting($homeNode)
3188:                 #end
3189:                 #mobile_kickoffs($homeNode)
3190:                 #mobile_interceptions($homeNode)
3191:                 #if (! $arenaRules)
3192:                     #mobile_puntreturns($homeNode)
3193:                 #end
3194:                 #mobile_kickoffreturns($homeNode)
3195:                 #mobile_fumbles($homeNode)
3196:                 #mobile_defense($homeNode)
3197:             </div>
3198:         </div>
3199:     </div>
3200: </div>
3201: <!-- END LINE UP -->
3202:     
3203: <!-- BEGING TEAM STATS -->
3204: <div class="swipe-screen" data-view="summary">
3205:     <div class="line_up">
3206:         #printMobileHeader()
3207:         <div class="table">
3208:         <div class="row clearfix">
3209:             <div class="data">${visitorTotals.valueOf("firstdowns/@no")}</div>
3210:             <div class="text">FIRST DOWNS</div>
3211:             <div class="data">${homeTotals.valueOf("firstdowns/@no")}</div>
3212:         </div>
3213: 
3214:         <div class="row clearfix">
3215:             <div class="data">$visitorTotals.valueOf("firstdowns/@pass")</div>
3216:             <div class="text">Passing</div>
3217:             <div class="data">$homeTotals.valueOf("firstdowns/@pass")</div>
3218:         </div>
3219: 
3220:         <div class="row clearfix">
3221:             <div class="data">$visitorTotals.valueOf("firstdowns/@rush")</div>
3222:             <div class="text">Rushing</div>
3223:             <div class="data">$homeTotals.valueOf("firstdowns/@rush")</div>
3224:         </div>
3225: 
3226:         <div class="row clearfix">
3227:             <div class="data">$visitorTotals.valueOf("firstdowns/@penalty")</div>
3228:             <div class="text">Penalty</div>
3229:             <div class="data">$homeTotals.valueOf("firstdowns/@penalty")</div>
3230:         </div>
3231: 
3232:         #if ($americanRules || $arenaRules) ## only print the following for american or arena games
3233:         <div class="row clearfix">
3234:             <div class="data">#fraction($visitorTotals.valueOf("conversions/@thirdconv") $visitorTotals.valueOf("conversions/@thirdatt"))</div>
3235:             <div class="text">THIRD DOWN EFFICIENCY</div>
3236:             <div class="data">#fraction($homeTotals.valueOf("conversions/@thirdconv") $homeTotals.valueOf("conversions/@thirdatt"))</div>
3237:         </div>
3238:         <div class="row clearfix">
3239:             <div class="data">#fraction($visitorTotals.valueOf("conversions/@fourthconv") $visitorTotals.valueOf("conversions/@fourthatt"))</div>
3240:             <div class="text">FOURTH DOWN EFFICIENCY</div>
3241:             <div class="data">#fraction($homeTotals.valueOf("conversions/@fourthconv") $homeTotals.valueOf("conversions/@fourthatt"))</div>
3242:         </div>
3243:         #end
3244:         #set ($visitorYards = $visitorTotals.valueOf("@totoff_yards"))
3245:         #set ($homeYards = $homeTotals.valueOf("@totoff_yards"))
3246:         #set ($homeTotalOffPlays = $homeTotals.valueOf("@totoff_plays"))
3247:         #set ($visitorTotalOffPlays = $visitorTotals.valueOf("@totoff_plays"))
3248:         #set ($homeAvgGain = $homeTotals.valueOf("@totoff_avg"))
3249:         #set ($visitorAvgGain = $visitorTotals.valueOf("@totoff_avg"))
3250:  
3251:         #if ($visitorYards.length() > 0 && $homeYards.length() > 0)
3252:             <div class="row clearfix">
3253:                 <div class="data">$visitorYards</div>
3254:                 <div class="text">TOTAL OFFENSE</div>
3255:                 <div class="data">$homeYards</div>
3256:             </div>
3257:         #end
3258:  
3259:         #if ($homeTotalOffPlays.length() > 0 && $visitorTotalOffPlays.length() > 0)
3260:             <div class="row clearfix">
3261:                 <div class="data">$visitorTotalOffPlays</div>
3262:                 <div class="text">Total Offensive Plays</div>
3263:                 <div class="data">$homeTotalOffPlays</div>
3264:             </div>
3265:             
3266:             <div class="row clearfix">
3267:                 <div class="data">$visitorAvgGain</div>
3268:                 <div class="text">Average gain per play</div>
3269:                 <div class="data">$homeAvgGain</div>
3270:             </div>
3271:         #end
3272:         
3273:         <div class="row clearfix">
3274:             <div class="data">$visitorTotals.valueOf("pass/@yds")</div>
3275:             <div class="text">NET YARDS PASSING</div>
3276:             <div class="data">$homeTotals.valueOf("pass/@yds")</div>
3277:         </div>
3278: 
3279:         <div class="row clearfix">
3280:             <div class="data">$!visitorTotals.valueOf("pass/@comp")-$!visitorTotals.valueOf("pass/@att")</div>
3281:             <div class="text">Completions-Attempts</div>
3282:             <div class="data">$!homeTotals.valueOf("pass/@comp")-$!homeTotals.valueOf("pass/@att")</div>
3283:         </div>
3284: 
3285:         <div class="row clearfix">
3286:             <div class="data">#avg($visitorTotals.valueOf("pass/@att") $visitorTotals.valueOf("pass/@yds"))</div>
3287:             <div class="text">Net yards per pass play</div>
3288:             <div class="data">#avg($homeTotals.valueOf("pass/@att") $homeTotals.valueOf("pass/@yds"))</div>
3289:         </div>
3290: 
3291:         <div class="row clearfix">
3292:             <div class="data">#foratt($visitorTotals.valueOf("pass/@sacks") $!visitorTotals.valueOf("pass/@sackyds"))</div>
3293:             <div class="text">Sacked: Number-Yards</div>
3294:             <div class="data">#foratt($homeTotals.valueOf("pass/@sacks") $!homeTotals.valueOf("pass/@sackyds")) </div>
3295:         </div>
3296: 
3297:         <div class="row clearfix">
3298:             <div class="data">$visitorTotals.valueOf("pass/@int")</div>
3299:             <div class="text">Had intercepted</div>
3300:             <div class="data">$homeTotals.valueOf("pass/@int")</div>
3301:         </div>
3302: 
3303:         <div class="row clearfix">
3304:             <div class="data">$visitorTotals.valueOf("rush/@yds")</div>
3305:             <div class="text">NET YARDS RUSHING</div>
3306:             <div class="data">$homeTotals.valueOf("rush/@yds")</div>
3307:         </div>
3308:         
3309:         <div class="row clearfix">
3310:             <div class="data">$visitorTotals.valueOf("rush/@att")</div>
3311:             <div class="text">Rushing Attempts</div>
3312:             <div class="data">$homeTotals.valueOf("rush/@att")</div>
3313:         </div>
3314: 
3315:         <div class="row clearfix">
3316:             <div class="data">#avg($visitorTotals.valueOf("rush/@att") $visitorTotals.valueOf("rush/@yds"))</div>
3317:             <div class="text">Average gain per rush</div>
3318:             <div class="data">#avg($homeTotals.valueOf("rush/@att") $homeTotals.valueOf("rush/@yds"))</div>
3319:         </div>
3320: 
3321:         #if (! $arenaRules)
3322:         <div class="row clearfix">
3323:             <div class="data">#foratt($visitorTotals.valueOf("punt/@no") $visitorTotals.valueOf("punt/@yds"))</div>
3324:             <div class="text">PUNTS: Number-Yards</div>
3325:             <div class="data">#foratt($homeTotals.valueOf("punt/@no") $homeTotals.valueOf("punt/@yds"))</div>
3326:         </div>
3327:         <div class="row clearfix">
3328:             <div class="data">#avg($visitorTotals.valueOf("punt/@no") $visitorTotals.valueOf("punt/@yds"))</div>
3329:             <div class="text">Average</div>
3330:             <div class="data">#avg($homeTotals.valueOf("punt/@no") $homeTotals.valueOf("punt/@yds"))</div>
3331:         </div>
3332:         #end
3333: 
3334:         <div class="row clearfix">
3335:             <div class="data">#returnYds($visitorTotals)</div>
3336:             <div class="text">TOTAL RETURN YARDS</div>
3337:             <div class="data">#returnYds($homeTotals)</div>
3338:         </div>
3339: 
3340:         #if (! $arenaRules)
3341:         <div class="row clearfix">
3342:             <div class="data">#foratt($visitorTotals.valueOf("pr/@no") $visitorTotals.valueOf("pr/@yds"))</div>
3343:             <div class="text">Punt Returns: Number-Yards</div>
3344:             <div class="data">#foratt($homeTotals.valueOf("pr/@no") $homeTotals.valueOf("pr/@yds"))</div>
3345:         </div>
3346:         #end
3347: 
3348:         <div class="row clearfix">
3349:             <div class="data">#foratt($visitorTotals.valueOf("kr/@no") $visitorTotals.valueOf("kr/@yds"))</div>
3350:             <div class="text">Kickoff Returns: Number-Yards</div>
3351:             <div class="data">#foratt($homeTotals.valueOf("kr/@no") $homeTotals.valueOf("kr/@yds"))</div>
3352:         </div>
3353: 
3354:         <div class="row clearfix">
3355:             <div class="data">#foratt($visitorTotals.valueOf("ir/@no") $visitorTotals.valueOf("ir/@yds"))</div>
3356:             <div class="text">Interception Returns: Number-Yards</div>
3357:             <div class="data">#foratt($homeTotals.valueOf("ir/@no") $homeTotals.valueOf("ir/@yds"))</div>
3358:         </div>
3359: 
3360:         <div class="row clearfix">
3361:             <div class="data">#foratt($visitorTotals.valueOf("penalties/@no") $visitorTotals.valueOf("penalties/@yds"))</div>
3362:             <div class="text">PENALTIES: Number-Yards</div>
3363:             <div class="data">#foratt($homeTotals.valueOf("penalties/@no") $homeTotals.valueOf("penalties/@yds"))</div>
3364:         </div>
3365:         
3366:         <div class="row clearfix">
3367:             <div class="data">#att($visitorTotals.valueOf("fumbles/@no") $visitorTotals.valueOf("fumbles/@lost"))</div>
3368:             <div class="text">FUMBLES: Number-Lost</div>
3369:             <div class="data">#att($homeTotals.valueOf("fumbles/@no") $homeTotals.valueOf("fumbles/@lost"))</div>
3370:         </div>
3371:         
3372:         <div class="row clearfix">
3373:             <div class="data">#foratt($visitorTotals.valueOf("defense/@sacks"), $visitorTotals.valueOf("defense/@sackyds"))</div>
3374:             <div class="text">SACKS: Number-Yards</div>
3375:             <div class="data">#foratt($homeTotals.valueOf("defense/@sacks"), $homeTotals.valueOf("defense/@sackyds"))</div>
3376:         </div>
3377:         
3378:         <div class="row clearfix">
3379:             <div class="data">#foratt($visitorTotals.valueOf("defense/@int"), $visitorTotals.valueOf("defense/@intyds"))</div>
3380:             <div class="text">INTERCEPTIONS: Number-Yards</div>
3381:             <div class="data">#foratt($homeTotals.valueOf("defense/@int"), $homeTotals.valueOf("defense/@intyds"))</div>
3382:         </div>
3383:         
3384:         <div class="row clearfix">
3385:             <div class="data">$!visitorTotals.valueOf("misc/@top")</div>
3386:             <div class="text">TIME OF POSSESSION</div>
3387:             <div class="data">$!homeTotals.valueOf("misc/@top")</div>
3388:         </div>
3389:         
3390:         <div class="recent">
3391:             <div class="frame">
3392:                 <div class="other">
3393:                     <div class="toggle clearfix">
3394:                         <div class="row title">
3395:                             Other Information
3396:                             <div class="arrow">
3397:                                 <img src="/info/mobile/stats/images/arrow_down2.gif" class="recent_arrow_down" width="13" height="9"/>
3398:                                 <img src="/info/mobile/stats/images/arrow_up2.gif" class="recent_arrow_up" style="display: none;" width="13" height="9"/>
3399:                             </div>
3400:                         </div>
3401:                     </div>
3402: 
3403:                     <div class="recent_plays plays" style="display: none;">
3404:                         #if ($location.length() > 0)<div class="row clearfix"><div class="data">Location:</div><div class="text">$location</div></div>#end
3405:                         #if ($stadium.length() > 0)<div class="row clearfix"><div class="data">Stadium:</div><div class="text"> $stadium</div></div> #end
3406:                         #if ($attend.length() > 0)<div class="row clearfix"><div class="data">Attendance:</div><div class="text"> $attend</div></div> #end
3407:                     #if (! $arenaRules)
3408:                         #if ($weather.length() > 0)<div class="row clearfix"><div class="data">Weather:</div><div class="text"> $weather</div></div> #end
3409:                         #if ($temp.length() > 0)<div class="row clearfix"><div class="data">Temperature</div><div class="text"> $temp</div></div> #end
3410:                         #if ($wind.length() > 0)<div class="row clearfix"><div class="data">Wind:</div><div class="text">$wind</div></div> #end
3411:                     #end
3412: 
3413:                         #if ($document.valueOf("fbgame/venue/officials/@ref").length() > 0)<div class="row clearfix"><div class="data">Referee: </div><div class="text">$document.valueOf("fbgame/venue/officials/@ref")</div></div>#end
3414:                         #if ($document.valueOf("fbgame/venue/officials/@ump").length() > 0)<div class="row clearfix"><div class="data">Umpire: </div><div class="text">$document.valueOf("fbgame/venue/officials/@ump")</div></div>#end
3415:                         #if ($document.valueOf("fbgame/venue/officials/@line").length() > 0)<div class="row clearfix"><div class="data">Head Linesman:</div><div class="text"> $document.valueOf("fbgame/venue/officials/@line")</div></div>#end
3416:                         #if ($document.valueOf("fbgame/venue/officials/@lj").length() > 0)<div class="row clearfix"><div class="data">Line Judge: </div><div class="text">$document.valueOf("fbgame/venue/officials/@lj")</div></div>#end
3417:                         #if ($document.valueOf("fbgame/venue/officials/@bj").length() > 0)<div class="row clearfix"><div class="data">Back Judge: </div><div class="text">$document.valueOf("fbgame/venue/officials/@bj")</div></div>#end
3418:                         #if ($document.valueOf("fbgame/venue/officials/@fj").length() > 0)<div class="row clearfix"><div class="data">Field Judge: </div><div class="text">$document.valueOf("fbgame/venue/officials/@fj")</div></div>#end
3419:                         #if ($document.valueOf("fbgame/venue/officials/@sj").length() > 0)<div class="row clearfix"><div class="data">Side Judge: </div><div class="text">$document.valueOf("fbgame/venue/officials/@sj")</div></div>#end
3420:                         #if ($document.valueOf("fbgame/venue/officials/@sc").length() > 0)<div class="row clearfix"><div class="data">Scorekeeper: </div><div class="text">$document.valueOf("fbgame/venue/officials/@sc")</div></div>#end
3421:                     </div>
3422:                 </div>
3423:             </div>
3424:         </div>
3425:         </div>
3426:         
3427:     </div>
3428: </div>
3429: </div> ##live2
3430: </div> ##wrapper-accordion
3431: 
3432: #set ($showWiki = true)
3433: #set ($showWiki = $showWikiVar)
3434: 
3435: #if ($showWiki == true)
3436:     $!wiki.su 
3437: #end
3438: 
3439: #else  ##WEBSITE VERSION
3440: 
3441: #set ($titleVa = "at")
3442: #if ($isNeutralGame)
3443: 	#set ($titleVa = "vs.")
3444: #end
3445: 
3446: #set ($pageTitle = "$visname $titleVa $homename")
3447: 
3448: #if ($date)
3449: 	#set ($dateObj = $tool.date.toDate("MM/dd/yyyy", $date))
3450: 	#set ($pageTitle = "${pageTitle} - ${formatter.formatLongDate($dateObj)}")
3451: #end	
3452: 
3453: #if ($time.length() > 0) 
3454: 	#set ($pageTitle = "${pageTitle} - ${time}") 
3455: #end
3456: 
3457: 
3458: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3459: <head>
3460: <title>$pageTitle - Box Score</title>
3461: #if ($stats.inProgress)
3462:     <meta http-equiv="refresh" content="30"/>
3463: #end
3464: #if ($stats.view == "pdf")
3465:     #include("statcrew-pdf-css-template")
3466: #end
3467: </head>
3468: <body>
3469: 
3470: #if ($stats.view == "pdf")
3471:     <div class='footer-left'>$visname vs. $homename</div>
3472:     <div class='footer-right'><span id="pagenumber"></span> of <span
3473:             id="pagecount"></span></div>
3474: #end
3475: #if ($stats.view != "pdf")
3476:     #set ($showWiki = true)
3477:     #set ($showWiki = $showWikiVar)
3478: 
3479:     #if ($showWiki == true)
3480:         $!wiki.su
3481:     #end
3482: #end
3483: <div class="stats-wrapper clearfix">
3484: 
3485: #if ($stats.view == "pdf")
3486:     #printPdfHeader("Scoring Summary")
3487: #end
3488: 
3489: <table>
3490: ## GAME INFORMATION
3491:  <tr>
3492:   <td colspan="2" class="align-center">
3493:    <strong>$visname $titleVa $homename</strong> - $document.valueOf("fbgame/venue/@location")<br />
3494:    $document.valueOf("fbgame/venue/@date") - $document.valueOf("fbgame/venue/@start")<br />
3495:    $document.valueOf("fbgame/venue/@schednote")
3496:   </td>
3497:  </tr>
3498: 
3499: ## TEAM SCORES
3500:   <tr>
3501:     #foreach ($team in $document.selectNodes("fbgame/team"))
3502:      <td width="50%" align="center">
3503:      #if ($team.attributeValue("link").length() > 0 and $linkTeams)
3504:      <a href="$!linkTeamsBase?id=${team.attributeValue("teamId")}">
3505:      #end
3506:      <span class="stats-header">$team.attributeValue("name")</span>
3507:      #if ($team.attributeValue("link").length() > 0 and $linkTeams)
3508:      </a>
3509:      #end
3510:      <br /><span class="stats-header">$team.valueOf("linescore/@score")</span>
3511:      </td>
3512:     #end
3513:   </tr>
3514: </table>
3515: 
3516: 
3517: ## SCORE BY PERIOD
3518: <div class="stats-fullbox clearfix">
3519: <table>
3520:  <tr>
3521:   <th class="align-left">Scoring</th>
3522:   #foreach ($i in [1..$quartersPlayed])
3523:     <th style="width:40px; text-align:center;">#formatQuarterCount($i,false)</th>
3524:   #end
3525:   
3526:   #if ($stats.final)
3527:     <th style="width:60px">Final</th>
3528:   #else
3529:     <th style="width:100px">
3530:         #formatQuarterCount($tool.math.toInteger($document.valueOf("fbgame/plays/downtogo/@qtr")), true)
3531:         - $document.valueOf("fbgame/plays/downtogo/@clock")
3532:     </th>
3533:   #end
3534:  </tr>
3535: 
3536: #macro (teamscore $team)
3537:  <tr>
3538:   <td>
3539:       $team.attributeValue("name")
3540:       #if ($team.attributeValue("record").length() > 0)
3541:           ($team.attributeValue("record")#if ($team.attributeValue("conf-record").length() > 0), $team.attributeValue("conf-record")#end)
3542:       #end
3543:   </td>
3544:   #foreach ($i in [1..$quartersPlayed])
3545:   <td class="align-center">$team.valueOf("linescore/lineprd[$i]/@score")</td>
3546:   #end
3547:   <td class="align-center">$team.valueOf("linescore/@score")</td>
3548:  </tr>
3549: #end
3550: 
3551: ## TEAM SCORES
3552: #teamscore($visitorNode)
3553: #teamscore($homeNode)
3554: 
3555:  <tr class="stats-highlight">
3556:   <td colspan="$tool.math.add($quartersPlayed, 2)" class="align-center">
3557:     $document.valueOf("fbgame/venue/@location")    |   $document.valueOf("fbgame/venue/@stadium")
3558: #if($document.valueOf("fbgame/venue/@schednote") > 0)   |   $document.valueOf("fbgame/venue/@schednote"))#end
3559:   </td>
3560:  </tr>
3561: </table>
3562: </div>
3563: 
3564: ## TABS
3565: #if ($stats.view != "pdf")
3566:     <div class="stats-tabs clearfix">
3567:         <ul class="clearfix">
3568:           <li #if (!($stats.view.length() > 0) || $stats.view == "boxscore") class="active" #end><a href="${stats.pageUrl}" data-view="boxscore">Box Score</a>
3569:           #if ($hasPlayByPlay)<li #if ($stats.view == "plays") class="active" #end><a href="${stats.pageUrl}${paramSep}view=plays" data-view="plays" id="pbp">Play by Play</a></li>#end
3570:           #if ($hasDriveSummary)<li #if ($stats.view == "drives") class="active" #end><a href="${stats.pageUrl}${paramSep}view=drives" data-view="drives">Drive Summary</a></li>#end
3571:           #if ($hasStarters)<li #if ($stats.view == "starters") class="active" #end><a href="${stats.pageUrl}${paramSep}view=starters" data-view="starters">Starters</a></li>#end
3572:           <li #if ($stats.view == "participation") class="active" #end><a href="${stats.pageUrl}${paramSep}view=participation" data-view="participation">Participation</a></li>
3573:           <li><a href="${stats.pageUrl}${paramSep}tmpl=fbxml-monospace-template" target="_blank">Coach's View</a></li>
3574:         </ul>
3575:     </div>
3576: #end
3577: 
3578: #macro (printTabStarters)
3579:     #macro (listStarters $nodes $isOffensive)
3580:         #set ($counter = 0)
3581:         #foreach ($node in $nodes)
3582:             #set ($position = '')
3583: 
3584:             #if ($isOffensive && $node.valueOf("@opos").length() > 0)
3585:                 #set ($position = $node.valueOf("@opos"))
3586:             #elseif (! $isOffensive && $node.valueOf("@dpos").length() > 0)
3587:                 #set ($position = $node.valueOf("@dpos"))
3588:             #end
3589: 
3590:             #if ($position.length() > 0)
3591: 
3592:                 #set ($counter = $counter + 1)
3593: 
3594:                 #if ($counter % 2 == 0)
3595:                 <tr class="even">
3596:                 #else
3597:                 <tr class="odd">
3598:                 #end
3599:                 <td>$!position</td>
3600:                 <td class="nowrap">$node.valueOf("@name")</td>
3601:             </tr>
3602: 
3603:             #end
3604: 
3605:         #end
3606:     #end ## macro
3607: 
3608:     <div class="clearfix">
3609:         <div class="stats-halfbox-left">
3610:             <table>
3611:                 <tr><td colspan="2" class="align-center"><h4>$visitor</h4></td></tr>
3612:                 <tr><th colspan="2">#if ($americanRules || $arenaRules) Offense #else Offence #end</th></tr>
3613:                 #listStarters($visitorNode.selectNodes("player[@gs='1']"), true)
3614:                 <tr><th colspan="2">#if ($americanRules || $arenaRules) Defense #else Defence #end</th></tr>
3615:                 #listStarters($visitorNode.selectNodes("player[@gs='1']"), false)
3616:             </table>
3617:         </div>
3618: 
3619:         <div class="stats-halfbox-right">
3620:             <table>
3621:                 <tr><td colspan="2" class="align-center"><h4>$home</h4></td></tr>
3622:                 <tr><th colspan="2">#if ($americanRules || $arenaRules) Offense #else Offence #end</th></tr>
3623:                 #listStarters($homeNode.selectNodes("player[@gs='1']"), true)
3624:                 <tr><th colspan="2">#if ($americanRules || $arenaRules) Defense #else Defence #end</th></tr>
3625:                 #listStarters($homeNode.selectNodes("player[@gs='1']"), false)
3626:             </table>
3627:         </div>
3628:         <div class="clear"></div>
3629:     </div>
3630: #end
3631: 
3632: #macro (printTabDriveSummary)
3633: 
3634:     ## #########################
3635:     ## DRIVE SUMMARY
3636:     <div class="stats-fullbox clearfix" data-module="stats/fbxml-drive-table">
3637:         <table>
3638:         <thead>
3639:             <tr>
3640:                 <th class="align-left stats-sortable-head"><a href="#" class="drive-sort-trigger-team" title="Sort by Team">Team</a></th>
3641:                 <th class="align-left stats-sortable-head"><a href="#" class="drive-sort-trigger-qtr" title="Sort by Quater">QTR</a></th>
3642:                 <th>Start</th>
3643:                 <th>Poss.</th>
3644:                 <th>Began</th>
3645:                 <th>Plays</th>
3646:                 <th>Yards</th>
3647:                 <th>Result</th>
3648:             </tr>
3649:         </thead>
3650:         <tbody>
3651:             #foreach ($drive in $document.selectNodes("fbgame/drives/drive"))
3652:                 #if ($velocityCount % 2 == 0)
3653:                 <tr class="even">
3654:                 #else
3655:                 <tr class="odd">
3656:                 #end
3657:                 <td class="drive-team-name">
3658:                 #if ($drive.valueOf("@vh") == "V")
3659:                     $visitorNode.valueOf("@name")
3660:                 #else
3661:                     $homeNode.valueOf("@name")
3662:                 #end
3663:                 </td>
3664:                 <td class="align-center drive-qtr">#formatQuarterCount($tool.math.toInteger($drive.valueOf("@start_qtr")), false)</td>
3665:                 <td class="align-center">$drive.attributeValue("start_time")</td>
3666:                 <td class="align-center">$drive.attributeValue("top")</td>
3667:                 <td class="align-center">$drive.attributeValue("start_spot")</td>
3668:                 <td class="align-center">$drive.attributeValue("plays")</td>
3669:                 <td class="align-center">$drive.attributeValue("yards")</td>
3670:                 <td class="align-center">$drive.attributeValue("end_how")</td>
3671:             </tr>
3672:             #end
3673:         </tbody>
3674:         </table>
3675:     </div>
3676: 
3677: #end
3678: 
3679: #macro (printTabPlayByPlay)
3680:     ## #########################
3681:     ## PLAY BY PLAY
3682:     <div class="stats-fullbox clearfix">
3683:         <table>
3684:             #set ($qtrNodes = $document.selectNodes("fbgame/plays/qtr"))
3685:             #if ($stats.view != "pdf")
3686:             <tr>
3687:                 <td colspan="2">
3688:                     <strong>Quarters: </strong>
3689:                     #foreach ($i in [1..$qtrNodes.size()])
3690:                         #if ($i > 1) | #end
3691:                         <a href="#qtr${i}">#printQuarter($i)</a>
3692:                     #end
3693:                 </td>
3694:             </tr>
3695:             #end
3696:             #if ($qtrNodes.size() == 0)
3697:                 #set ($qs = [])
3698:             #else
3699:                 #set ($qs = [1..$qtrNodes.size()])
3700:             #end
3701:             #foreach ($q in $qs) ## looping through quarters
3702:                 #set ($printScore = false)
3703:                 <tr><td colspan="2" id="qtr${q}" class="align-center summary"><div class="stats-header">#printQuarter($q)</div></td></tr>
3704: 
3705:                 #foreach ($node in $qtrNodes.get($tool.math.sub($q, 1)).selectNodes('*')) ## looping through nodes for each quarter
3706:                 
3707:                 #set($down = $node.valueOf("@down"))
3708:                 #set($togo = $node.valueOf("@togo"))
3709:                 #set($spot = $node.valueOf("@spot"))
3710: 
3711:                 ## USE CONTEXT WHEN DOWN, TOGO AND SPOT ARE NOT SPECIFIED
3712:                     #if(!($down.length() > 0))
3713:                         #set ($context = $node.valueOf("@context"))
3714: 
3715:                         #if ($context)
3716:                             #set($contextFoo = $context.split(","))
3717:                             #set($down = $tool.list.get($contextFoo, 1))
3718:                             #set($togo = $tool.list.get($contextFoo, 2))
3719:                             #set($spot = $tool.list.get($contextFoo, 3))
3720:                         #end
3721:                     #end
3722: 
3723:                     #if ($velocityCount % 2 == 0)
3724:                         #set ($row = "even")
3725:                     #else
3726:                         #set ($row = "odd")
3727:                     #end
3728: 
3729:                     #if ($node.getName() == "drivestart") ## nodetypes
3730: 
3731:                         #if ($node.valueOf("@vh") == "V")
3732:                             <tr><th colspan="2">$visitor at $node.valueOf("@clock")</th></tr>
3733:                         #else
3734:                             <tr><th colspan="2">$home at $node.valueOf("@clock")</th></tr>
3735:                         #end
3736: 
3737:                     #elseif ($node.getName() == "play")
3738:                         #if ($node.valueOf("@score") == "Y")
3739:                         <tr class="$row bold">
3740:                         #else
3741:                         <tr class="$row">
3742:                         #end
3743:                         #if ($node.valueOf("@type") == "K" || $node.valueOf("@type") == "X") ## node with a K
3744:                             <td>&#160;</td>
3745:                             <td>$node.valueOf("@text")</td>
3746:                         #else
3747: 
3748:                             #if ($node.valueOf("@togo") == "0")
3749:                                 <td class="nowrap">#printQuarter($down) and Goal at $spot</td>
3750:                             #else
3751:                                 <td class="nowrap">#printQuarter($down) and $togo at $spot</td>
3752:                             #end
3753: 
3754:                             <td>$node.valueOf("@text")</td>
3755:                         #end ## node with a K
3756:                         </tr>
3757:                         
3758:                         #if ($node.valueOf("@score") == "Y")
3759:                             #set ($printScore = true)
3760:                         #end
3761: 
3762:                     #elseif ($node.getName() == "drivesum")
3763:                         <tr class="$row"><td colspan="2" class="summary bold">$node.valueOf("@plays") plays, $node.valueOf("@yards") yards, $node.valueOf("@top") elapsed</td></tr>
3764:                         
3765:                     #elseif  ($node.getName() == "score" && $printScore)
3766:                         #set ($printScore = false)
3767:                         <tr class="bold">
3768:                             <td>&#160;</td>
3769:                             <td>$visitor $node.valueOf("@V"), $home $node.valueOf("@H")</td>
3770:                         </tr>
3771:                     #end ## nodetypes
3772:                     
3773:                 #end ## looping through nodes for each quarter
3774:                 #if ($stats.view != "pdf")
3775:                     <tr><td colspan="2" class="align-center"><a href="#pbp">back to top</a></td></tr>
3776:                 #end
3777:             #end ## looping through quarters
3778:         </table>
3779:     </div>
3780: #end
3781: 
3782: #macro (printTabParticipation)
3783:     ## #########################
3784:     ## PARTICIPATION
3785: 
3786:         #macro (listParticipation $nodes)
3787:         <table>
3788:             <tr>
3789:                 <th>Uni.</th>
3790:                 <th class="align-left">Player</th>
3791:             </tr>
3792:             #foreach ($node in $nodes)
3793:                 <tr>
3794:                     <td align="center">$!node.valueOf("@uni")</td>
3795:                     <td class="nowrap">$node.valueOf("@name")</td>
3796:                 </tr>
3797:             #end
3798:         </table>
3799:         #end ##macro
3800: 
3801: 
3802:     <div class="stats-fullbox clearfix">
3803:         <table>
3804:             <tr><th align="center" colspan="2">PARTICIPANTS</th></tr>
3805:             <tr>
3806:                 <th align="center" width="50%">$visitor</th>
3807:                 <th align="center" width="50%">$home</th>
3808:             </tr>
3809: 
3810:         ## PARTICIPANTS
3811:             <tr>
3812:                 <td valign="top">#listParticipation($visitorNode.selectNodes("player[@gp='1']"))</td>
3813:                 <td valign="top">#listParticipation($homeNode.selectNodes("player[@gp='1']"))</td>
3814:             </tr>
3815:         ## DNP
3816:             <tr><th align="center" colspan="2">DID NOT PARTICIPATE</th></tr>
3817:             <tr>
3818:                 <th align="center">$visitor</th>
3819:                 <th align="center">$home</th></tr>
3820:             <tr>
3821:                 <td valign="top">#listParticipation($document.selectNodes("fbgame/dnp[@vh='V']/player"))</td>
3822:                 <td valign="top">#listParticipation($document.selectNodes("fbgame/dnp[@vh='H']/player"))</td>
3823:             </tr>
3824:         </table>
3825:     </div>
3826: #end
3827: 
3828: #macro (printScoringSummary)
3829:     ## SCORING SUMMARY
3830:     #if ($hasPlayByPlay)
3831:         <div class="stats-fullbox clearfix">
3832:             <table>
3833:                 <tr>
3834:                     <th>Prd</th>
3835:                     <th>Time</th>
3836:                     <th class="align-left">Scoring Summary</th>
3837:                     <th class="nowrap">$visitor - $home</th>
3838:                 </tr>
3839:                 #foreach ($score in $document.selectNodes("fbgame/scores/score"))
3840:                     #if($score.attributeValue("type").length() > 0)
3841:                         <tr>
3842:                             <td class="align-center">#formatQuarterCount($tool.math.toInteger($score.valueOf("@qtr")), false)</td>
3843:                             <td>$score.attributeValue("clock")</td>
3844:                             <td>
3845:                                 #if ($score.valueOf("@vh") == "V")
3846:                                     <strong>$visitor</strong>
3847:                                 #else
3848:                                     <strong>$home</strong>
3849:                                 #end
3850:                                 - #printScore($score)
3851:                             </td>
3852:                             <td class="align-center">$score.attributeValue("vscore") - $score.attributeValue("hscore")</td>
3853:                         </tr>
3854:                     #end
3855:                 #end
3856:             </table>
3857:         </div>
3858:     #elseif ($hasScoringSummaryText)
3859:         <div class="stats-fullbox clearfix">
3860:             <table>
3861:                 <tr>
3862:                     <th class="align-left">Scoring Summary</th>
3863:                 </tr>
3864:                 #foreach ($score in $document.selectNodes("fbgame/scores/score"))
3865:                         <tr>
3866:                             <td class="align-left">$score.attributeValue("text")</td>
3867:                         </tr>
3868:                 #end
3869:             </table>
3870:         </div>
3871:     #end
3872: 
3873: #end
3874: 
3875: #macro (printTeamStatistics)
3876:     ## TEAM STATISTICS
3877:     <div class="stats-fullbox clearfix">
3878:         <table class="all-center">
3879:             <tr><th width="33%">$visitor</th><th width="34%">Statistics</th><th width="33%">$home</th></tr>
3880:             <tr>
3881:                 <td>${visitorTotals.valueOf("firstdowns/@no")}</td>
3882:                 <td class="totals">FIRST DOWNS</td>
3883:                 <td>${homeTotals.valueOf("firstdowns/@no")}</td>
3884:             </tr>
3885:             <tr>
3886:                 <td>$visitorTotals.valueOf("firstdowns/@pass")<br />$visitorTotals.valueOf("firstdowns/@rush")<br />$visitorTotals.valueOf("firstdowns/@penalty")</td>
3887:                 <td>Passing<br />Rushing<br />Penalty</td>
3888:                 <td>$homeTotals.valueOf("firstdowns/@pass")<br />$homeTotals.valueOf("firstdowns/@rush")<br />$homeTotals.valueOf("firstdowns/@penalty")</td>
3889:             </tr>
3890:             #if ($americanRules || $arenaRules) ## only print the following for american or arena games
3891:                 <tr>
3892:                     <td>#fraction($visitorTotals.valueOf("conversions/@thirdconv") $visitorTotals.valueOf("conversions/@thirdatt"))</td>
3893:                     <td class="totals">THIRD DOWN EFFICIENCY</td>
3894:                     <td>#fraction($homeTotals.valueOf("conversions/@thirdconv") $homeTotals.valueOf("conversions/@thirdatt"))</td>
3895:                 </tr>
3896:                 <tr>
3897:                     <td>#fraction($visitorTotals.valueOf("conversions/@fourthconv") $visitorTotals.valueOf("conversions/@fourthatt"))</td>
3898:                     <td class="totals">FOURTH DOWN EFFICIENCY</td>
3899:                     <td>#fraction($homeTotals.valueOf("conversions/@fourthconv") $homeTotals.valueOf("conversions/@fourthatt"))</td>
3900:                 </tr>
3901:             #end
3902: 
3903:             #set ($visitorYards = $visitorTotals.valueOf("@totoff_yards"))
3904:             #set ($homeYards = $homeTotals.valueOf("@totoff_yards"))
3905:             #set ($homeTotalOffPlays = $homeTotals.valueOf("@totoff_plays"))
3906:             #set ($visitorTotalOffPlays = $visitorTotals.valueOf("@totoff_plays"))
3907:             #set ($homeAvgGain = $homeTotals.valueOf("@totoff_avg"))
3908:             #set ($visitorAvgGain = $visitorTotals.valueOf("@totoff_avg"))
3909: 
3910: 
3911:             #if ($visitorYards.length() > 0 && $homeYards.length() > 0)
3912:                 <tr>
3913:                     <td>$visitorYards</td>
3914:                     <td class="totals">TOTAL OFFENSE</td>
3915:                     <td>$homeYards</td>
3916:                 </tr>
3917:             #end
3918: 
3919:             #if ($homeTotalOffPlays.length() > 0 && $visitorTotalOffPlays.length() > 0)
3920:                 <tr>
3921:                     <td>$!visitorTotalOffPlays<br />$!visitorAvgGain</td>
3922:                     <td>Total Offensive Plays<br />Average gain per play</td>
3923:                     <td>$!homeTotalOffPlays<br />$!homeAvgGain</td>
3924:                 </tr>
3925:             #end
3926: 
3927:             <tr>
3928:                 <td>$visitorTotals.valueOf("pass/@yds")</td>
3929:                 <td class="totals">NET YARDS PASSING</td>
3930:                 <td>$homeTotals.valueOf("pass/@yds")</td>
3931:             </tr>
3932:             <tr>
3933:                 <td>$!visitorTotals.valueOf("pass/@comp")-$!visitorTotals.valueOf("pass/@att")<br />#avg($visitorTotals.valueOf("pass/@att") $visitorTotals.valueOf("pass/@yds"))
3934:                     <br />#foratt($visitorTotals.valueOf("pass/@sacks") $!visitorTotals.valueOf("pass/@sackyds"))
3935:                     <br />$visitorTotals.valueOf("pass/@int")
3936:                 </td>
3937:                 <td>Completions-Attempts<br />Net yards per pass play<br />Sacked: Number-Yards<br />Had intercepted</td>
3938:                 <td>$!homeTotals.valueOf("pass/@comp")-$!homeTotals.valueOf("pass/@att")<br />#avg($homeTotals.valueOf("pass/@att") $homeTotals.valueOf("pass/@yds"))
3939:                     <br />#foratt($homeTotals.valueOf("pass/@sacks") $!homeTotals.valueOf("pass/@sackyds"))
3940:                     <br />$homeTotals.valueOf("pass/@int")
3941:                 </td>
3942:             </tr>
3943:             <tr>
3944:                 <td>$visitorTotals.valueOf("rush/@yds")</td>
3945:                 <td class="totals">NET YARDS RUSHING</td>
3946:                 <td>$homeTotals.valueOf("rush/@yds")</td>
3947:             </tr>
3948:             <tr>
3949:                 <td>$visitorTotals.valueOf("rush/@att")<br />#avg($visitorTotals.valueOf("rush/@att") $visitorTotals.valueOf("rush/@yds"))</td>
3950:                 <td>Rushing Attempts<br />Average gain per rush</td>
3951:                 <td>$homeTotals.valueOf("rush/@att")<br />#avg($homeTotals.valueOf("rush/@att") $homeTotals.valueOf("rush/@yds"))</td>
3952:             </tr>
3953:             #if (! $arenaRules)
3954:                 <tr>
3955:                     <td>#foratt($visitorTotals.valueOf("punt/@no") $visitorTotals.valueOf("punt/@yds"))</td>
3956:                     <td class="totals">PUNTS: Number-Yards</td>
3957:                     <td>#foratt($homeTotals.valueOf("punt/@no") $homeTotals.valueOf("punt/@yds"))</td>
3958:                 </tr>
3959:                 <tr>
3960:                     <td>#avg($visitorTotals.valueOf("punt/@no") $visitorTotals.valueOf("punt/@yds"))</td>
3961:                     <td>Average</td>
3962:                     <td>#avg($homeTotals.valueOf("punt/@no") $homeTotals.valueOf("punt/@yds"))</td>
3963:                 </tr>
3964:             #end
3965:             <tr>
3966:                 <td>#returnYds($visitorTotals)</td>
3967:                 <td class="totals">TOTAL RETURN YARDS</td>
3968:                 <td>#returnYds($homeTotals)</td>
3969:             </tr>
3970:             <tr>
3971:                 <td>#if (! $arenaRules) #foratt($visitorTotals.valueOf("pr/@no") $visitorTotals.valueOf("pr/@yds")) <br />#end
3972:                     #foratt($visitorTotals.valueOf("kr/@no") $visitorTotals.valueOf("kr/@yds"))
3973:                     <br />#foratt($visitorTotals.valueOf("ir/@no") $visitorTotals.valueOf("ir/@yds"))</td>
3974:                 <td>#if(! $arenaRules) Punt Returns: Number-Yards<br />#end Kickoff Returns: Number-Yards<br />Interception Returns: Number-Yards</td>
3975:                 <td>#if(! $arenaRules) #foratt($homeTotals.valueOf("pr/@no") $homeTotals.valueOf("pr/@yds"))<br />#end
3976:                     #foratt($homeTotals.valueOf("kr/@no") $homeTotals.valueOf("kr/@yds"))
3977:                     <br />#foratt($homeTotals.valueOf("ir/@no") $homeTotals.valueOf("ir/@yds"))</td>
3978:             </tr>
3979:             <tr>
3980:                 <td>#foratt($visitorTotals.valueOf("penalties/@no") $visitorTotals.valueOf("penalties/@yds"))</td>
3981:                 <td class="totals">PENALTIES: Number-Yards</td>
3982:                 <td>#foratt($homeTotals.valueOf("penalties/@no") $homeTotals.valueOf("penalties/@yds"))</td>
3983:             </tr>
3984:             <tr>
3985:                 <td>#att($visitorTotals.valueOf("fumbles/@no") $visitorTotals.valueOf("fumbles/@lost"))</td>
3986:                 <td class="totals">FUMBLES: Number-Lost</td>
3987:                 <td>#att($homeTotals.valueOf("fumbles/@no") $homeTotals.valueOf("fumbles/@lost"))</td>
3988:             </tr>
3989:             <tr>
3990:                 <td>#foratt($visitorTotals.valueOf("defense/@sacks"), $visitorTotals.valueOf("defense/@sackyds"))</td>
3991:                 <td class="totals">SACKS: Number-Yards</td>
3992:                 <td>#foratt($homeTotals.valueOf("defense/@sacks"), $homeTotals.valueOf("defense/@sackyds"))</td>
3993:             </tr>
3994:             <tr>
3995:                 <td>#foratt($visitorTotals.valueOf("defense/@int"), $visitorTotals.valueOf("defense/@intyds"))</td>
3996:                 <td class="totals">INTERCEPTIONS: Number-Yards</td>
3997:                 <td>#foratt($homeTotals.valueOf("defense/@int"), $homeTotals.valueOf("defense/@intyds"))</td>
3998:             </tr>
3999:             <tr>
4000:                 <td>$!visitorTotals.valueOf("misc/@top")</td>
4001:                 <td class="totals">TIME OF POSSESSION</td>
4002:                 <td>$!homeTotals.valueOf("misc/@top")</td>
4003:             </tr>
4004:         </table>
4005:     </div>
4006: #end
4007: 
4008:     #macro (passing $team)
4009:     <table>
4010:         <tr>
4011:             <th class="align-left">Passing</th>
4012:             <th>C-A</th>
4013:             <th>YDS</th>
4014:             <th>LG</th>
4015:             <th>TD</th>
4016:             <th>INT</th>
4017:         ##  <th>RTG</th>
4018:         </tr>
4019: 
4020:         #sortNodes ($team.selectNodes("player/pass"), "yds")
4021:         #foreach ($stat in $sortedNodes)
4022:             #if ($velocityCount % 2 == 0)
4023:                 #set ($row = "even")
4024:             #else
4025:                 #set ($row = "odd")
4026:             #end
4027:             <tr class="$row">
4028:                 <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4029:                 <td class="align-center">$!stat.valueOf("@comp")-$!stat.valueOf("@att")</td>
4030:                 <td class="align-center">$!stat.valueOf("@yds")</td>
4031:                 <td class="align-center">$!stat.valueOf("@long")</td>
4032:                 <td class="align-center">$!stat.valueOf("@td")</td>
4033:                 <td class="align-center">$!stat.valueOf("@int")</td>
4034:             ##  <td></td>
4035:             </tr>
4036:         #end
4037:     </table>
4038:     #end ##macro
4039: 
4040:     #macro (rushing $team)
4041:     <table>
4042:         <tr>
4043:             <th class="align-left">Rushing</th>
4044:             <th>ATT</th>
4045:             <th>YDS</th>
4046:             <th>AVG</th>
4047:             <th>LG</th>
4048:             <th>TD</th>
4049:         </tr>
4050:         #sortNodes ($team.selectNodes("player/rush"), "yds")
4051:         #foreach ($stat in $sortedNodes)
4052:             #if ($velocityCount % 2 == 0)
4053:                 #set ($row = "even")
4054:             #else
4055:                 #set ($row = "odd")
4056:             #end
4057:             <tr class="$row">
4058:                 <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4059:                 <td align="center">$!stat.valueOf("@att")</td>
4060:                 <td align="center">$!stat.valueOf("@yds")</td>
4061:                 <td align="center">#avg($stat.valueOf("@att") $stat.valueOf("@yds"))</td>
4062:                 <td align="center">$!stat.valueOf("@long")</td>
4063:                 <td align="center">$!stat.valueOf("@td")</td>
4064:             </tr>
4065:         #end
4066:     </table>
4067:     #end ##macro
4068: 
4069:     #macro (receiving $team)
4070:     <table>
4071:         <tr>
4072:             <th class="align-left">Receiving</th>
4073:             <th>NO</th>
4074:             <th>YDS</th>
4075:             <th>AVG</th>
4076:             <th>LG</th>
4077:             <th>TD</th>
4078:         </tr>
4079:         #sortNodes ($team.selectNodes("player/rcv"), "yds")
4080:         #foreach ($stat in $sortedNodes)
4081:             #if ($velocityCount % 2 == 0)
4082:                 #set ($row = "even")
4083:             #else
4084:                 #set ($row = "odd")
4085:             #end
4086:             <tr class="$row">
4087:                 <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4088:                 <td align="center">$!stat.valueOf("@no")</td>
4089:                 <td align="center">$!stat.valueOf("@yds")</td>
4090:                 <td align="center">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</td>
4091:                 <td align="center">$!stat.valueOf("@long")</td>
4092:                 <td align="center">$!stat.valueOf("@td")</td>
4093:             </tr>
4094:         #end
4095:     </table>
4096:     #end ##macro
4097: 
4098:     #macro (kicking $team)
4099:     <table>
4100:         <tr>
4101:             <th class="align-left">Kicking</th>
4102:             <th>FG</th>
4103:             <th>LG</th>
4104:             <th>XP</th>
4105:             #if (!$americanRules && !$arenaRules)
4106:                 <th>RG</th>
4107:             #end
4108:             <th>PTS</th>
4109:         </tr>
4110:     ## Scan for fg, scan for pat, filtering those out
4111:     ## then merge and loop
4112: 
4113:         #set ($players = [])
4114:         #foreach ($stat in $team.selectNodes("player/fg"))
4115:             #set ($playerMap = {})
4116:             <span class="none playermap">$playerMap.class</span>
4117:             #set ($player = $stat.valueOf("../@name"))
4118:             $!playerMap.put("name", $player)
4119:             $!playerMap.put("pID", $stat.valueOf("../@playerId"))
4120:             $!playerMap.put("fgm", $stat.valueOf("@made"))
4121:             $!playerMap.put("fga", $stat.valueOf("@att"))
4122:             $!playerMap.put("long", $stat.valueOf("@long"))
4123:             #set ($ignore = $players.add($playerMap))
4124:         #end
4125: 
4126:         #foreach ($stat in $team.selectNodes("player/pat"))
4127:             #if ($stat.valueOf("@kickatt").length() > 0)
4128:                 #set ($playerMap = {})
4129:                 #set ($player = $stat.valueOf("../@name"))
4130:                 #foreach ($existingPlayer in $players)
4131:                     #if ($player == $existingPlayer.get("name"))
4132:                         #set ($playerMap = $existingPlayer)
4133:                     #end
4134:                 #end ## foreach existing players
4135:                 #if ($playerMap.isEmpty())
4136:                     #set ($ignore = $players.add($playerMap))
4137:                     $!playerMap.put("name", $player)
4138:                     $!playerMap.put("pID", $stat.valueOf("../@playerId"))
4139:                 #end
4140:                 $!playerMap.put("patm", $stat.valueOf("@kickmade"))
4141:                 $!playerMap.put("pata", $stat.valueOf("@kickatt"))
4142:             #end ## if filtering out non-kickers
4143:         #end
4144: 
4145:         #if (!$americanRules && !$arenaRules)
4146:             #foreach ($stat in $team.selectNodes("player/scoring"))
4147:                 #if ($stat.valueOf("@rouge").length() > 0)
4148:                     #set ($playerMap = {})
4149:                     #set ($player = $stat.valueOf("../@name"))
4150:                     #foreach ($existingPlayer in $players)
4151:                         #if ($player == $existingPlayer.get("name"))
4152:                             #set ($playerMap = $existingPlayer)
4153:                         #end
4154:                     #end ## foreach existingPlayer
4155:                     #if ($playerMap.isEmpty())
4156:                         $!playerMap.put("name", $player)
4157:                         $!playerMap.put("pID", $stat.valueOf("../@playerId"))
4158:                         #set ($ignore = $players.add($playerMap))
4159:                     #end
4160:                     $!playerMap.put("rg", $stat.valueOf("@rouge"))
4161:                 #end ## filter rouge points
4162:             #end ## loop
4163:         #end ## if canadian game
4164: 
4165:         #foreach ($playerMap in $players)
4166:             #if ($velocityCount % 2 == 0)
4167:                 #set ($row = "even")
4168:             #else
4169:                 #set ($row = "odd")
4170:             #end
4171:             #if ($players.size() > 2)
4172:             <tr class="$row">
4173:             #else
4174:             <tr>
4175:             #end
4176:             <td class="nowrap">
4177:                 #if ($playerMap.get("pID").length() > 0 && $linkPlayers)
4178:                     <a href="$!linkPlayersBase?id=${playerMap.get('pID')}"> $playerMap.get("name")</a>
4179:                 #else
4180:                     $playerMap.get("name")
4181:                 #end
4182:             </td>
4183:             <td class="align-center">
4184:                 #if ($playerMap.get("fga"))
4185:                     $playerMap.get("fgm")/$playerMap.get("fga")
4186:                 #end
4187:             </td>
4188:             <td class="align-center">
4189:                 #if ($playerMap.get("fga"))
4190:     $playerMap.get("long")
4191:     #end
4192:             </td>
4193:             <td class="align-center">
4194:                 #if ($playerMap.get("pata"))
4195:                     $playerMap.get("patm")/$playerMap.get("pata")
4196:                 #end
4197:             </td>
4198:             #if (!$americanRules && !$arenaRules)
4199:                 <td class="align-center">
4200:                     #if ($playerMap.get("rg"))
4201:     $playerMap.get("rg")
4202:     #end
4203:                 </td>
4204:             #end
4205: 
4206:             #set ($pts = 0)
4207:             #set ($pts = $tool.math.mul(3, $playerMap.get("fgm")))
4208:             #set ($pts = $tool.math.add($pts, $playerMap.get("patm")))
4209:             #if ($playerMap.get("rg"))
4210:                 #set ($pts = $tool.math.add($pts, $playerMap.get("rg")))
4211:             #end
4212:             <td class="align-center">${pts}</td>
4213:         </tr>
4214:         #end
4215:     </table>
4216:     #end ##macro
4217: 
4218:     #macro (punting $team)
4219:     <table>
4220:         <tr>
4221:             <th class="align-left">Punting</th>
4222:             <th>NO</th>
4223:             <th>YDS</th>
4224:             <th>AVG</th>
4225:             <th>LG</th>
4226:             <th>TB</th>
4227:             <th>IN 20</th>
4228:         </tr>
4229:         #foreach ($stat in $team.selectNodes("player/punt"))
4230:             #if ($velocityCount % 2 == 0)
4231:                 #set ($row = "even")
4232:             #else
4233:                 #set ($row = "odd")
4234:             #end
4235:             <tr>
4236:                 <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4237:                 <td class="align-center">$!stat.valueOf("@no")</td>
4238:                 <td class="align-center">$!stat.valueOf("@yds")</td>
4239:                 <td class="align-center">#avg( $stat.valueOf("@no") $!stat.valueOf("@yds") )</td>
4240:                 <td class="align-center">$!stat.valueOf("@long")</td>
4241:                 <td class="align-center">$!stat.valueOf("@tb")</td>
4242:                 <td class="align-center">$!stat.valueOf("@inside20")</td>
4243:             </tr>
4244:         #end
4245:     </table>
4246: 
4247:     #end ##macro
4248: 
4249:     #macro (kickoffs $team)
4250:     <table>
4251:         <tr>
4252:             <th class="align-left">Kickoffs</th>
4253:             <th>NO</th>
4254:             <th>YDS</th>
4255:             <th>AVG</th>
4256:             <th>TB</th>
4257:             <th>OB</th>
4258:         </tr>
4259:         #set ($statNodes = $team.selectNodes("player/ko"))
4260:         #foreach ($stat in $statNodes)
4261:             #if ($velocityCount % 2 == 0)
4262:                 #set ($row = "even")
4263:             #else
4264:                 #set ($row = "odd")
4265:             #end
4266:             #if ($statNodes.size() > 2)
4267:             <tr class="$row">
4268:             #else
4269:             <tr>
4270:             #end
4271:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4272:             <td class="align-center">$!stat.valueOf("@no")</td>
4273:             <td class="align-center">$!stat.valueOf("@yds")</td>
4274:             <td class="align-center">#avg( $stat.valueOf("@no") $!stat.valueOf("@yds") )</td>
4275:             <td class="align-center">$!stat.valueOf("@tb")</td>
4276:             <td class="align-center">$!stat.valueOf("@ob")</td>
4277:         </tr>
4278:         #end
4279:     </table>
4280:     #end ##macro
4281: 
4282:     #macro (interceptions $team)
4283:     <table>
4284:         <tr>
4285:             <th class="align-left">Interception Returns</th>
4286:             <th>NO</th>
4287:             <th>YDS</th>
4288:             <th>AVG</th>
4289:             <th>LG</th>
4290:             <th>TD</th>
4291:         </tr>
4292:         #set ($statNodes = $team.selectNodes("player/ir"))
4293:         #foreach ($stat in $statNodes)
4294:             #if ($velocityCount % 2 == 0)
4295:                 #set ($row = "even")
4296:             #else
4297:                 #set ($row = "odd")
4298:             #end
4299:             #if ($statNodes.size() > 2)
4300:             <tr class="$row">
4301:             #else
4302:             <tr>
4303:             #end
4304:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4305:             <td class="align-center">$!stat.valueOf("@no")</td>
4306:             <td class="align-center">$!stat.valueOf("@yds")</td>
4307:             <td class="align-center">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</td>
4308:             <td class="align-center">$!stat.valueOf("@long")</td>
4309:             <td class="align-center">$!stat.valueOf("@td")</td>
4310:         </tr>
4311:         #end
4312:     </table>
4313:     #end ##macro
4314: 
4315:     #macro (puntreturns $team)
4316:     <table>
4317:         <tr>
4318:             <th class="align-left">Punt Returns</th>
4319:             <th>NO</th>
4320:             <th>YDS</th>
4321:             <th>AVG</th>
4322:             <th>LG</th>
4323:             <th>TD</th>
4324:         </tr>
4325:     ###set ($statNodes = $team.selectNodes("player/pr"))
4326:         #sortNodes ($team.selectNodes("player/pr"), "yds")
4327:         #foreach ($stat in $sortedNodes)
4328:             #if ($velocityCount % 2 == 0)
4329:                 #set ($row = "even")
4330:             #else
4331:                 #set ($row = "odd")
4332:             #end
4333:             #if ($statNodes.size() > 2)
4334:             <tr class="$row">
4335:             #else
4336:             <tr>
4337:             #end
4338:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4339:             <td class="align-center">$!stat.valueOf("@no")</td>
4340:             <td class="align-center">$!stat.valueOf("@yds")</td>
4341:             <td class="align-center">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</td>
4342:             <td class="align-center">$!stat.valueOf("@long")</td>
4343:             <td class="align-center">$!stat.valueOf("@td")</td>
4344:         </tr>
4345:         #end
4346:     </table>
4347:     #end ##macro
4348: 
4349:     #macro (kickoffreturns $team)
4350:     <table class="kickoff-returns">
4351:         <tr>
4352:             <th class="align-left">Kickoff Returns</th>
4353:             <th>NO</th>
4354:             <th>YDS</th>
4355:             <th>AVG</th>
4356:             <th>LG</th>
4357:             <th>TD</th>
4358:         </tr>
4359:         #sortNodes ($team.selectNodes("player/kr"), "yds")
4360:         #foreach ($stat in $sortedNodes)
4361:             #if ($velocityCount % 2 == 0)
4362:                 #set ($row = "even")
4363:             #else
4364:                 #set ($row = "odd")
4365:             #end
4366:             #if ($statNodes.size() > 2)
4367:             <tr class="$row">
4368:             #else
4369:             <tr>
4370:             #end
4371:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4372:             <td class="align-center">$!stat.valueOf("@no")</td>
4373:             <td class="align-center">$!stat.valueOf("@yds")</td>
4374:             <td class="align-center">#avg($stat.valueOf("@no") $stat.valueOf("@yds"))</td>
4375:             <td class="align-center">$!stat.valueOf("@long")</td>
4376:             <td class="align-center">$!stat.valueOf("@td")</td>
4377:         </tr>
4378:         #end
4379:     </table>
4380:     #end ##macro
4381: 
4382:     #macro (fumbles $team)
4383:     <table>
4384:         <tr>
4385:             <th class="align-left">Fumbles</th>
4386:             <th>NO</th>
4387:             <th colspan="2">LOST</th>
4388:         </tr>
4389:         #set ($statNodes = $team.selectNodes("player/fumbles"))
4390:         #foreach ($stat in $statNodes)
4391:             #if ($velocityCount % 2 == 0)
4392:                 #set ($row = "even")
4393:             #else
4394:                 #set ($row = "odd")
4395:             #end
4396:             #if ($statNodes.size() > 2)
4397:             <tr class="$row">
4398:             #else
4399:             <tr>
4400:             #end
4401:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4402:             <td class="align-center">$!stat.valueOf("@no")</td>
4403:             <td colspan="2" class="align-center">$!stat.valueOf("@lost")</td>
4404:         </tr>
4405:         #end
4406:     </table>
4407: #end ##macro
4408: 
4409: #macro (printIndividualStatistics)
4410: ## INDIVIDUAL STATISTICS
4411: <div class="stats-fullbox clearfix">
4412:     <table>
4413:         <tr><td class="align-center"><h4>$visitor</h4></td><td class="align-center"><h4>$home</h4></td></tr>
4414: 
4415:     ## PASSING
4416:         <tr>
4417:             <td>#passing($visitorNode)</td>
4418:             <td>#passing($homeNode)</td>
4419:         </tr>
4420: 
4421:     ## RUSHING
4422:         <tr>
4423:             <td>#rushing($visitorNode)</td>
4424:             <td>#rushing($homeNode)</td>
4425:         </tr>
4426: 
4427:     ## RECEIVING
4428:         <tr>
4429:             <td>#receiving($visitorNode)</td>
4430:             <td>#receiving($homeNode)</td>
4431:         </tr>
4432: 
4433:     ## KICKING
4434:         <tr>
4435:             <td>#kicking($visitorNode)</td>
4436:             <td>#kicking($homeNode)</td>
4437:         </tr>
4438: 
4439:     ## PUNTING
4440:         #if(! $arenaRules)
4441:             <tr>
4442:                 <td>#punting($visitorNode)</td>
4443:                 <td>#punting($homeNode)</td>
4444:             </tr>
4445:         #end
4446: 
4447:     ## KICKOFFS
4448:         <tr>
4449:             <td>#kickoffs($visitorNode)</td>
4450:             <td>#kickoffs($homeNode)</td>
4451:         </tr>
4452: 
4453:     ## KICKOFF RETURNS
4454:         <tr>
4455:             <td>#kickoffreturns($visitorNode)</td>
4456:             <td>#kickoffreturns($homeNode)</td>
4457:         </tr>
4458: 
4459:     ## PUNT RETURNS
4460:         #if(! $arenaRules)
4461:             <tr>
4462:                 <td>#puntreturns($visitorNode)</td>
4463:                 <td>#puntreturns($homeNode)</td>
4464:             </tr>
4465:         #end
4466: 
4467:     ## INTERCEPTIONS
4468:         <tr>
4469:             <td>#interceptions($visitorNode)</td>
4470:             <td>#interceptions($homeNode)</td>
4471:         </tr>
4472: 
4473:     ## FUMBLES
4474:         <tr>
4475:             <td>#fumbles($visitorNode)</td>
4476:             <td>#fumbles($homeNode)</td>
4477:         </tr>
4478:     </table>
4479: </div>
4480: #end
4481: 
4482:     #macro (defense $team)
4483:     <tr>
4484:         <th>#</th>
4485:         <th class="align-left">$team.valueOf("@name")</th>
4486:         <th>Solo</th>
4487:         <th>Ast</th>
4488:         <th>Total</th>
4489:         <th>Sacks-Yds</th>
4490:         <th>TFL-Yds</th>
4491:         <th>FF</th>
4492:         <th>FR-Yds</th>
4493:         <th>Int-Yds</th>
4494:         <th>BrUp</th>
4495:         <th>Blks</th>
4496:         <th>QBH</th>
4497:     </tr>
4498:         #sortDefenseNodes($team.selectNodes("player/defense"))
4499:         #foreach ($stat in $sortedNodes)
4500:             #if ($velocityCount % 2 == 0)
4501:                 #set ($row = "even")
4502:             #else
4503:                 #set ($row = "odd")
4504:             #end
4505: 
4506:         ## ADD HALF SACKS
4507:             #set($sacks = 0)
4508:             #set ($sacks = $!tool.math.div($stat.valueOf("@sacka"), 2))
4509:             #set ($sacks = $!tool.math.add($stat.valueOf("@sackua"), $sacks))
4510: 
4511:         ## WRONG CALCULATION FOR DAK STATS https://prestosports.jira.com/browse/PS-6928
4512:         ## #set ($sacks = $!tool.math.add($stat.valueOf("@sacks"), $sacks))
4513: 
4514:             #if($sacks == "0")#set($sacks = "")#end
4515: 
4516:         ## ADD HALF TFL
4517:             #set($tfl = 0)
4518:             #set ($tfl = $!tool.math.div($stat.valueOf("@tfla"), 2))
4519:             #set ($tfl = $!tool.math.add($stat.valueOf("@tflua"), $tfl))
4520:             #if($tfl == "0")#set($tfl = "")#end
4521: 
4522:             #set($teamTFL = 0)
4523:             #set($teamTFL = 0)
4524:             #set ($teamTFL = $!tool.math.div($!team.valueOf("totals/defense/@tfla"), 2))
4525:             #set ($teamTFL = $!tool.math.add($!team.valueOf("totals/defense/@tflua"), $teamTFL ))
4526:             #if($teamTFL == "0")#set($teamTFL = "")#end
4527: 
4528:         <tr class="$row">
4529:             <td class="align-center nowrap">$stat.valueOf("../@uni")</td>
4530:             <td class="nowrap">#printPlayerName($stat.selectSingleNode(".."), $team.attributeValue("link"))</td>
4531:             <td class="align-center">$!stat.valueOf("@tackua")</td>
4532:             <td class="align-center">$!stat.valueOf("@tacka")</td>
4533:             #if ($americanRules || $arenaRules)
4534:                 <td class="align-center">$!tool.math.add($stat.valueOf("@tackua"), $stat.valueOf("@tacka"))</td>
4535:             #else
4536:                 <td class="align-center">$!tool.math.add($stat.valueOf("@tackua"), $tool.math.div($stat.valueOf("@tacka"), 2))</td>
4537:             #end
4538:             <td class="align-center">#if ($sacks != '')$sacks - $!stat.valueOf("@sackyds")#else - #end</td>
4539:             <td class="align-center">$tfl - $!stat.valueOf("@tflyds")</td>
4540:             <td class="align-center">$!stat.valueOf("@ff")</td>
4541:             <td class="align-center">$!stat.valueOf("@fr")-$!stat.valueOf("@fryds")</td>
4542:             <td class="align-center">$!stat.valueOf("@int")-$!stat.valueOf("@intyds")</td>
4543:             <td class="align-center">$!stat.valueOf("@brup")</td>
4544:             <td class="align-center">$!stat.valueOf("@blkd")</td>
4545:             <td class="align-center">$!stat.valueOf("@qbh")</td>
4546:         </tr>
4547:         #end
4548:     <tr class="stats-highlight totals">
4549:         <td colspan="2">TOTALS</td>
4550:         <td class="align-center">$!team.valueOf("totals/defense/@tackua")</td>
4551:         <td class="align-center">$!team.valueOf("totals/defense/@tacka")</td>
4552:         #if ($americanRules || $arenaRules)
4553:             <td class="align-center">$!team.valueOf("totals/defense/@tot_tack")</td>
4554:         #else
4555:             <td class="align-center">$tool.math.add($!team.valueOf("totals/defense/@tackua"), $tool.math.div($team.valueOf("totals/defense/@tacka"), 2))</td>
4556:         #end
4557:         <td class="align-center">$!team.valueOf("totals/defense/@sacks") - $!team.valueOf("totals/defense/@sackyds")</td> ## team sacks still listed this way
4558:         <td class="align-center">$!teamTFL - $!team.valueOf("totals/defense/@tflyds")</td>
4559:         <td class="align-center">$!team.valueOf("totals/defense/@ff")</td>
4560:         <td class="align-center">$!team.valueOf("totals/defense/@fr")-$!team.valueOf("totals/defense/@fryds")</td>
4561:         <td class="align-center">$!team.valueOf("totals/defense/@int")-$!team.valueOf("totals/defense/@intyds")</td>
4562:         <td class="align-center">$!team.valueOf("totals/defense/@brup")</td>
4563:         <td class="align-center">$!team.valueOf("totals/defense/@blkd")</td>
4564:         <td class="align-center">$!team.valueOf("totals/defense/@qbh")</td>
4565:     </tr>
4566: #end ##macro
4567: 
4568: #macro (printDefensiveStatistics)
4569:     ## DEFENSIVE STATS
4570:     <div class="stats-fullbox clearfix">
4571:         <table>
4572:             <tr><th align="center" colspan="13">Defensive Statistics</th></tr>
4573:             #defense($visitorNode)
4574:             #defense($homeNode)
4575:         </table>
4576:     </div>
4577: #end
4578: 
4579: #macro (printOtherInformation)
4580:     ## OTHER INFORMATION
4581:     <div class="stats-fullbox summary other-info clearfix">
4582:         <table>
4583:             <tr><th colspan="2" class="align-left">Other Information</th></tr>
4584:             <tr>
4585:                 <td style="width:50%">
4586:                     #if ($location.length() > 0)<strong>Location: </strong>$location<br />#end
4587:                     #if ($stadium.length() > 0)<strong>Stadium: </strong>$stadium<br />#end
4588:                     #if ($attend.length() > 0)<strong>Attendance: </strong>$attend<br />#end
4589:                     #if(! $arenaRules)
4590:                         #if ($weather.length() > 0)<strong>Weather: </strong>$weather<br />#end
4591:                         #if ($temp.length() > 0)<strong>Temperature: </strong>$temp<br />#end
4592:                         #if ($wind.length() > 0)<strong>Wind: </strong>$wind #end
4593:                     #end
4594:                 </td>
4595:                 <td>
4596:                     #if ($document.valueOf("fbgame/venue/officials/@ref").length() > 0)<strong>Referee: </strong>$document.valueOf("fbgame/venue/officials/@ref")<br />#end
4597:                     #if ($document.valueOf("fbgame/venue/officials/@ump").length() > 0)<strong>Umpire: </strong>$document.valueOf("fbgame/venue/officials/@ump")<br />#end
4598:                     #if ($document.valueOf("fbgame/venue/officials/@line").length() > 0)<strong>Head Linesman: </strong>$document.valueOf("fbgame/venue/officials/@line")<br />#end
4599:                     #if ($document.valueOf("fbgame/venue/officials/@lj").length() > 0)<strong>Line Judge: </strong>$document.valueOf("fbgame/venue/officials/@lj")<br />#end
4600:                     #if ($document.valueOf("fbgame/venue/officials/@bj").length() > 0)<strong>Back Judge: </strong>$document.valueOf("fbgame/venue/officials/@bj")<br />#end
4601:                     #if ($document.valueOf("fbgame/venue/officials/@fj").length() > 0)<strong>Field Judge: </strong>$document.valueOf("fbgame/venue/officials/@fj")<br />#end
4602:                     #if ($document.valueOf("fbgame/venue/officials/@sj").length() > 0)<strong>Side Judge: </strong>$document.valueOf("fbgame/venue/officials/@sj")<br />#end
4603:                     #if ($document.valueOf("fbgame/venue/officials/@sc").length() > 0)<strong>Scorekeeper: </strong>$document.valueOf("fbgame/venue/officials/@sc")#end
4604:                 </td>
4605:             </tr>
4606:         </table>
4607:     </div>
4608: #end
4609: 
4610: #macro (printTabBoxscore)
4611:     ## BOX SCORE
4612: 
4613:     ## #########################
4614:     #printScoringSummary()
4615: 
4616:     #printTeamStatistics()
4617: 
4618:     #printIndividualStatistics()
4619: 
4620:     #printDefensiveStatistics()
4621: 
4622:     #printOtherInformation()
4623: 
4624: #end
4625: 
4626: #if ($stats.view == "starters") ## STARTERS
4627:     #printTabStarters()
4628: #elseif ($stats.view == "drives")
4629:     #printTabDriveSummary()
4630: #elseif ($stats.view == "plays")
4631:     #printTabPlayByPlay()
4632: #elseif ($stats.view == "participation")
4633:     #printTabParticipation()
4634: #elseif ($stats.view == "pdf")
4635:     #printScoringSummary()
4636:     #printOtherInformation()
4637:     <p class="pagebreak">&nbsp;</p>
4638:     #printPdfHeader("Team Statistics")
4639:     #printTeamStatistics()
4640:     <p class="pagebreak">&nbsp;</p>
4641:     #printPdfHeader("Individual Statistics")
4642:     #printIndividualStatistics()
4643:     <p class="pagebreak">&nbsp;</p>
4644:     #printPdfHeader("Defensive Statistics")
4645:     #printDefensiveStatistics()
4646:     <p class="pagebreak">&nbsp;</p>
4647:     #printPdfHeader("Play by Play")
4648:     #printTabPlayByPlay()
4649:     <p class="pagebreak">&nbsp;</p>
4650:     #printPdfHeader("Drive Summary")
4651:     #printTabDriveSummary()
4652:     <p class="pagebreak">&nbsp;</p>
4653:     #printPdfHeader("Starters")
4654:     #printTabStarters()
4655:     <p class="pagebreak">&nbsp;</p>
4656:     #printPdfHeader("Participation")
4657:     #printTabParticipation()
4658: #else
4659:     #printTabBoxscore()
4660: #end ##ALTERNATE VIEWS
4661: 
4662: #set ($showWiki = true)
4663: #set ($showWiki = $showWikiVar)
4664: 
4665: #if ($showWiki == true)
4666:     $!wiki.su 
4667: #end
4668: </div>
4669: 
4670: #if ($stats.view != "pdf")
4671: ## CORRECT WRONG VIEW WITH REPLACESTATE
4672: #changeViewScript()
4673: #end
4674: </body>
4675: </html>
4676: 
4677: #end
4678: #end