Ottawa

McGill

Sat, Feb. 5, 2022
7:00 PM EST

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


Overview

Ottawa

Team Record Conf. Record Last Game
5-3 5-3 W, 3-2 vs. McGill

McGill

Team Record Conf. Record Last Game
2-7 2-7 W, 7-3 at Concordia

Team Comparison

Ottawa

Power Play Percentage

10.5

Penalty Kill Percentage

87.5

McGill

Power Play Percentage

10.3

Penalty Kill Percentage

83.7


3.13GPG2.22
2.63GAA3.55
Ottawa (based on 8 games)
McGill (based on 9 games)

Key Contributors


Points

Daniel Hardie
77
Keanu Yamamoto
Mathieu Desgagnés
65
Brandon Skubel

Goals

Charles-Antoine Roy
45
Eric Uba
Nicolas Mattinen
34
Brandon Skubel

Plus Minus

Konnor MacCormick
00
Blake Hayward
Mathieu Desgagnés
00
Felix-Antoine Tourigny

Save Percentage

There was a problem with a Velocity script
Page/httpd/prestosports/site-public/WEB-INF/themes/generic/statcrew-hkxml-template
ErrorError invoking method 'get(java.lang.Integer)' in java.util.ArrayList at /httpd/prestosports/site-public/WEB-INF/themes/generic/statcrew-hkxml-template[line 442, column 74]
Page source:
1: 
2: 
3: #if ($stats.view == 'pt')
4:     ## CONFIGURATION
5:     $website.include("options")
6:     #set ($options = $request.getAttribute("options"))
7:     #set ($pregame = $stats.pregame)
8:     #set ($startTime = $document.getRootElement().valueOf("network/@startTime"))
9:     #if ($document.getRootElement().valueOf("network/@tba") == 'Y')
10:         #set ($tba = true)
11:     #else
12:         #set ($tba = false)
13:     #end
14:     #set ($location = $document.getRootElement().valueOf("network/@location"))
15:     #set ($localDate = $document.getRootElement().valueOf("network/@localDate"))
16:     #set ($localTime = $document.getRootElement().valueOf("network/@localTime"))
17:     #set ($hasVideo = false)
18:     #if ($document.getRootElement().valueOf("primetime/@videoProvider").length() > 0 && $document.getRootElement().valueOf("primetime/@videoProvider") != "none")
19:         #set ($hasVideo = true)
20:     #end
21:     #if ($location != '')
22:         #set ($neutral = true)
23:     #else
24:         #set ($neutral = false)
25:     #end
26:     #if ($request.getParameter("paused") == 'y')
27:         #set ($paused = true)
28:     #else
29:         #set ($paused = false)
30:     #end
31: 
32:     #if ($pregame)
33:         #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
34:         #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
35: 
36: 
37:         #if ($!options.get("primetime_preview_hide").equalsIgnoreCase("hide"))
38:             #set ($shouldStatsShow = false)
39:         #else
40:             #set ($shouldStatsShow = $preview.shouldStatsShow($homeTeamId,$visitorTeamId))
41:         #end
42:     #end
43: 
44: <head>
45: 
46:     <script type="text/javascript" src='$website.cdn("/info/jquery-2.1.1.js")'></script>
47:     <script type="text/javascript" src='$website.cdn("/info/notifications/jquery.noty.packaged.min.js")'></script>
48:     <script type="text/javascript" src='$website.cdn("/info/dataTables/js/jquery.dataTables.js")'></script>
49:     <script type="text/javascript" src='$website.cdn("/info/momentjs/moment.js")'></script>
50:     <script type="text/javascript" src='$website.cdn("/info/primetime3/js/full_screen_api.js")'></script>
51:     <script type="text/javascript" src='$website.cdn("/info/primetime3/js/flipclock.min.js")'></script>
52: 
53:     $website.addCss($website.cdn("/info/dataTables/css/jquery.dataTables.css"))
54:     $website.addCss($website.cdn("/info/primetime3/css/flipclock.css"))
55: 
56:     <script type="text/javascript" src="/info/primetime3/js/pt3-embed.js"></script>
57: 
58:     <script type="text/javascript">var jQuery_2_1 = $.noConflict(true);</script>
59:     <script type="text/javascript" src="/info/primetime3/js/add-ons.js"></script>
60:     <script type="text/javascript" src="/info/primetime3/js/pt3-util.js"></script>
61: 
62:     <script src="/info/primetime3/js/highcharts-custom.js"></script>
63: 
64:     <script type="text/javascript" src="/info/primetime3/js/pt3-preview-charts.js"></script>
65: 
66:     $website.addCss("/info/primetime3/css/pt3-styles.css")
67:     $website.addCss("/info/primetime3/css/pt3-ice-hockey-icons.css")
68: 
69:     $website.addCss("/info/primetime3/css/pt3-responsive.css")
70: 
71:     <script type="text/javascript" src="/info/primetime3/js/restive.js"></script>
72:     <script type="text/javascript" src="/info/primetime3/js/pt3-restive.js"></script>
73: 
74:     <script type="text/javascript">
75:         var conf = new Object();
76:         conf.locale = '${locale}';
77:         conf.videoProvider = '${videoProvider}';
78:         conf.videoId = '${videoId}';
79:         conf.eventId = '$document.getRootElement().valueOf("network/@eventId")';
80:         conf.eventIdHashCode = '$eventIdHashCode';
81:         conf.visitorTeamLogo = '$stats.visitorTeamLogo';
82:         conf.homeTeamLogo = '$stats.homeTeamLogo';
83:         conf.visitorTeamColor = '#121212';
84:         conf.homeTeamColor = '#6D6D6D';
85:         conf.startTime = '$startTime';
86:         conf.pregame = $pregame;
87:         conf.tba = $tba;
88:         conf.localDate = '$localDate';
89:         conf.localTime = '$localTime';
90:         conf.visitor = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='V']/@name"))}';
91:         conf.home = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='H']/@name"))}';
92:         conf.currentDate = new Date();
93:         conf.statusFinal = $stats.final;
94:         conf.neutral = $neutral;
95:         conf.paused = $paused;
96: 
97:         conf.visitorTeamLighterColor = $.fn.increase_brightness(conf.visitorTeamColor, 30);
98:         conf.homeTeamLighterColor = $.fn.increase_brightness(conf.homeTeamColor, 30);
99:     </script>
100: 
101:     <script type="text/javascript" src="/info/primetime3/js/pt3-boxscore-client.js"></script>
102:     <script type="text/javascript" src="/info/primetime3/js/pt3-hockey-template.js"></script>
103: </head>
104:     #if ($pregame && !$shouldStatsShow)
105:     <div id="primetime-wrapper" class="primetime-pre-game primetime-ice-hockey clearfix">
106:         <div class="primetime-overflow clearfix">
107:             <div id="primetime-header" class="grid-row">
108:                 <div class="grid-col grid-col-hdr">
109:                     <div class="pt-header clearfix">
110:                         <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
111:                             <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
112:                             <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
113:                         </div>
114: 
115:                         <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
116:                             <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
117:                             <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
118:                         </div>
119: 
120:                         <div class="pt-match-scoreboard clearfix">
121:                             <div class="pt-mtach-info pt-pregame">
122:                                 <center>
123:                                     <div>
124:                                         $localDate <br>
125:                                         #if ($tba)
126:                                             TBA
127:                                         #else
128:                                             $localTime
129:                                         #end
130:                                     </div>
131:                                 </center>
132:                             </div>
133:                         </div>
134:                     </div>
135:                 </div>
136:             </div>
137:             <div class="grid-row-container clearfix">
138:                 <div class="grid-row">
139:                     <div class="content">
140:                         <div class="pt-last-play clearfix" style="display: none">
141:                                     <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
142:                                         This event doesn't have a set start time, but PrimeTime will be available once the event begins.
143:                                     </span>
144:                         </div>
145:                         <div class="text">
146:                             <h3>
147:                                 Live statistics will be available at the start of the event in:
148:                             </h3>
149:                             <center>
150:                                 <div class="clock"></div><br/>
151:                                 #if ($tba)
152:                                     Days
153:                                 #end
154:                             </center>
155:                         </div>
156:                     </div>
157:                 </div>
158:                 <div class="pt-game-info grid-row clearfix">
159:                     <div class="pt-tabs-panes clearfix">
160:                         <div id="stats-tabs" class="pt-tabs-pane clearfix">
161:                             <div id="divGameInformation" class="grid-row">
162:                                 <div class="grid-col grid-col-gi grid-col1">
163:                                     <h2 class="grid-title">
164:                                         Game Information
165:                                     </h2>
166:                                     <div class="grid-content clearfix">
167:                                         <div class="pt-game-information clearfix">
168:                                             <div class="pt-row clearfix">
169:                                                 <center>
170:                                                     <div class="game-location pt-col">
171:                                                             <span class="date">
172:                                                                 $localDate<br />
173:                                                                 #if ($tba)
174:                                                                     TBA
175:                                                                 #else
176:                                                                     $localTime
177:                                                                 #end
178:                                                             </span>
179:                                                         <h3>Date & Time</h3>
180:                                                     </div>
181:                                                     #if ($location != '')
182:                                                         <div class="game-venue pt-col">
183:                                                             <span class="venue">
184:                                                                 $location<br />
185:                                                                 (Neutral)
186:                                                             </span>
187:                                                             <h3>Location</h3>
188:                                                         </div>
189:                                                     #end
190:                                                 </center>
191:                                             </div>
192:                                         </div>
193:                                     </div>
194:                                 </div>
195:                             </div>
196:                         </div>
197:                     </div>
198:                 </div>
199:             </div>
200: 
201:             <div id="primetime-footer" class="grid-row">
202:                 <div class="grid-col grid-col-ftr">
203:                     <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
204:                 </div>
205:             </div>
206:         </div>
207:     ## GENERAL INFORMATION
208:     </div>
209:     #elseif ($pregame && $shouldStatsShow)
210:         #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
211:         #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
212: 
213:         #set ($teamStats = ["gfa", "gaa", "pppt", "pppt100", "ppptopp", "ppptopp100"])
214:         #set ($topStats = ["p", "g", "plusminus", "svpt", "svpt100"])
215: 
216:         #set ($visitorStats = $preview.getTeam($visitorTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
217:         #set ($homeStats = $preview.getTeam($homeTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
218: 
219:     <div id="primetime-wrapper" class="primetime-pre-game primetime-ice-hockey clearfix">
220:     <div class="primetime-overflow clearfix">
221:     <div id="primetime-header" class="grid-row">
222:         <div class="grid-col grid-col-hdr">
223:             <div class="pt-header clearfix">
224:                 <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
225:                     <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
226:                     <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
227:                 </div>
228: 
229:                 <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
230:                     <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
231:                     <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
232:                 </div>
233: 
234:                 <div class="pt-match-scoreboard clearfix">
235:                     <div class="pt-mtach-info pt-pregame">
236:                         <center>
237:                             <div>
238:                                 $localDate <br>
239:                                 #if ($tba)
240:                                     TBA
241:                                 #else
242:                                     $localTime
243:                                 #end
244:                             </div>
245:                         </center>
246:                     </div>
247:                 </div>
248:             </div>
249:         </div>
250:     </div>
251:     <div class="grid-row-container clearfix">
252:     <div class="grid-row preview">
253:         <div class="content">
254:             <div class="pt-last-play clearfix" style="display: none">
255:                     <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
256:                         This event doesn't have a set start time, but PrimeTime will be available once the event begins.
257:                     </span>
258:             </div>
259:             <div class="text">
260:                 <h3>
261:                     Live statistics will be available at the start of the event in:
262:                 </h3>
263:                 <center>
264:                     <div class="clock"></div><br/>
265:                     #if ($tba)
266:                         Days
267:                     #end
268:                 </center>
269:             </div>
270:         </div>
271:     </div>
272: 
273: 
274:     <!-- Team Overview -->
275:     <div class="grid-row pt-overview">
276:         <h2>Overview</h2>
277:         <div class="grid-col grid-col-e grid-col2 background-black">
278:             <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
279:             <div class="container clearfix pt-live-action">
280:                 <table>
281:                     <thead>
282:                     <tr>
283:                         <th>Team Record</th>
284:                         <th>Conf. Record</th>
285:                         <th>Last Game</th>
286:                     </tr>
287:                     </thead>
288:                     <tbody>
289:                     <tr>
290:                         <td>${visitorStats.overallRecord}</td>
291:                         <td>${visitorStats.conferenceRecord}</td>
292:                         <td style="text-align: center">
293:                             ${visitorStats.lastGame.APResult}
294:                             <span>
295:                                 #if ($visitorStats.lastGame.neutralSite.length() > 0 || $visitorStats.lastGame.home)
296:                                     vs.
297:                                 #else
298:                                     at
299:                                 #end
300:                                 ${visitorStats.lastGame.opponent.name}
301:                             </span>
302:                         </td>
303:                     </tr>
304:                     </tbody>
305:                 </table>
306:             </div>
307:             <br />
308:         </div>
309:         <div class="grid-col grid-col-e grid-col2 background-gray">
310:             <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
311:             <div class="pt-live-action">
312:                 <table>
313:                     <thead>
314:                     <tr>
315:                         <th>Team Record</th>
316:                         <th>Conf. Record</th>
317:                         <th>Last Game</th>
318:                     </tr>
319:                     </thead>
320:                     <tbody>
321:                     <tr>
322:                         <td>${homeStats.overallRecord}</td>
323:                         <td>${homeStats.conferenceRecord}</td>
324:                         <td style="text-align: center">
325:                             ${homeStats.lastGame.APResult}
326:                             <span>
327:                                 #if ($homeStats.lastGame.neutralSite.length() > 0 || $homeStats.lastGame.home)
328:                                     vs.
329:                                 #else
330:                                     at
331:                                 #end
332:                                 ${homeStats.lastGame.opponent.name}
333:                             </span>
334:                         </td>
335:                     </tr>
336:                     </tbody>
337:                 </table>
338:             </div>
339:             <br />
340:         </div>
341:     </div>
342: 
343: 
344:     <!-- Team Comaprison -->
345:     <div class="grid-row">
346:         <div class="grid-col team-compare">
347:             <h2>Team Comparison</h2>
348:             <div class="grid-col clearfix">
349:                 <div class="grid-col-e left">
350:                     <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
351:                     <div class="chart-container">
352:                         <h3>Power Play Percentage</h3>
353:                         <h3 class="stat-total-value">${formatter.formatNumber($visitorStats.teamStats['pppt'], $formats.get('pppt'))}</h3>
354:                         <div class="stats-chart ts-voff"></div>
355:                     </div>
356:                     <div class="chart-container">
357:                         <h3>Penalty Kill Percentage</h3>
358:                         <h3 class="stat-total-value">${formatter.formatNumber($visitorStats.teamStats['ppptopp'], $formats.get('ppptopp'))}</h3>
359:                         <div class="stats-chart ts-vdef"></div>
360:                     </div>
361:                 </div>
362:                 <div class="grid-col-e right">
363:                     <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
364:                     <div class="chart-container">
365:                         <h3>Power Play Percentage</h3>
366:                         <h3 class="stat-total-value">${formatter.formatNumber($homeStats.teamStats['pppt'], $formats.get('pppt'))}</h3>
367:                         <div class="stats-chart ts-hoff"></div>
368:                     </div>
369:                     <div class="chart-container">
370:                         <h3>Penalty Kill Percentage</h3>
371:                         <h3 class="stat-total-value">${formatter.formatNumber($homeStats.teamStats['ppptopp'], $formats.get('ppptopp'))}</h3>
372:                         <div class="stats-chart ts-hdef"></div>
373:                     </div>
374:                 </div>
375:             </div>
376:             <br/>
377: 
378:             <div class="game-leaders">
379:                 <div class="top">
380:                     <div class="charts">
381:                         <div class="chart">
382:                             <div class="stats-chart visitor goals-per-game"></div>
383:                             <div class="label"><span>${formatter.formatNumber($visitorStats.teamStats['gfa'], $formats.get('gfa'))}</span><span class="title">GPG</span><span>${formatter.formatNumber($homeStats.teamStats['gfa'], $formats.get('gfa'))}</span></div>
384:                             <div class="stats-chart home goals-per-game"></div>
385:                         </div>
386:                         <div class="chart">
387:                             <div class="stats-chart visitor goals-allowed-per-game"></div>
388:                             <div class="label"><span>${formatter.formatNumber($visitorStats.teamStats['gaa'], $formats.get('gaa'))}</span><span class="title">GAA</span><span>${formatter.formatNumber($homeStats.teamStats['gaa'], $formats.get('gaa'))}</span></div>
389:                             <div class="stats-chart home goals-allowed-per-game"></div>
390:                         </div>
391:                     </div>
392:                 </div>
393:             </div>
394:             <div class="legend grid-col clearfix">
395:                 <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
396:                 <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
397:             </div>
398:         </div>
399:     </div>
400: 
401:     <!-- Key Contributors -->
402:     <div class="grid-row">
403:         <div class="grid-col grid-col1 game-leaders grid-col">
404:             <h2>Key Contributors</h2>
405:             #macro (gameLeaders $category $label $visitorPlayers $homePlayers $quantityPlayers)
406:                 #set ($quantityPlayers = $quantityPlayers - 1)
407:                 <div class="game-leaders">
408:                     <br/>
409:                     <h3>$label</h3>
410:                     <div class="grid-col top1">
411:                         <div class="grid-col charts">
412:                             #foreach ($i in [0..$quantityPlayers])
413:                                 #set ($visitorTopPlayer = $visitorPlayers[$i])
414:                                 #set ($homeTopPlayer = $homePlayers[$i])
415:                                 <div class="grid-col chart">
416:                                     <div class="stats-player visitor">
417:                                         <div class="player-name">${visitorTopPlayer.firstName} ${visitorTopPlayer.lastName}</div>
418:                                         <div class="stats-chart visitor ${category}-top${i}"></div>
419:                                     </div>
420:                                     <!-- Using the format '#' directly since the wyg has set 0.0 as format on the stats metadata object -->
421:                                     <div class="label"><span>${formatter.formatNumber($visitorTopPlayer.stats[$category],'#')}</span><span class="title"></span><span>${formatter.formatNumber($homeTopPlayer.stats[$category], '#')}</span></div>
422:                                     <div class="stats-player home">
423:                                         <div class="player-name">${homeTopPlayer.firstName} ${homeTopPlayer.lastName}</div>
424:                                         <div class="stats-chart home ${category}-top${i}"></div>
425:                                     </div>
426:                                 </div>
427:                             #end
428:                         </div>
429:                     </div>
430:                 </div>
431:             #end
432: 
433:             #macro (gameLeadersDonut $category $label $visitorPlayers
434:             $homePlayers $quantityPlayers)
435:                 #set ($quantityPlayers = $quantityPlayers - 1)
436:                 <div class="game-leaders">
437:                     <br/>
438:                     <h3>$label</h3>
439:                     <div class="grid-col top1">
440:                         <div class="grid-col charts">
441:                             #foreach ($i in [0..$quantityPlayers])
442:                                 #set ($visitorTopPlayer = $visitorPlayers[$i])
443:                                 #set ($homeTopPlayer = $homePlayers[$i])
444:                                 <div class="grid-col chart">
445:                                     <div class="stats-player visitor">
446:                                         <div class="player-name">${visitorTopPlayer.firstName} ${visitorTopPlayer.lastName}</div>
447:                                         <div style="float:right"
448:                                              class="stats-chart-donut
449:                                         visitor
450:                                         ${category}-top${i}"></div>
451:                                     </div>
452:                                     <div class="label"><span>${formatter.formatNumber($visitorTopPlayer.stats[$category], $formats.get($category))}</span><span class="title"></span><span>${formatter.formatNumber($homeTopPlayer.stats[$category], $formats.get($category))}</span></div>
453:                                     <div class="stats-player home">
454:                                         <div class="player-name">${homeTopPlayer.firstName} ${homeTopPlayer.lastName}</div>
455:                                         <div style="float:left"
456:                                              class="stats-chart-donut
457:                                              home
458:                                         ${category}-top${i}"></div>
459:                                     </div>
460:                                 </div>
461:                             #end
462:                         </div>
463:                     </div>
464:                 </div>
465:             #end
466: 
467:             #gameLeaders('p' 'Points' $visitorStats.topStats['p'] $homeStats.topStats['p'] 2)
468:             #gameLeaders('g' 'Goals' $visitorStats.topStats['g'] $homeStats.topStats['g'] 2)
469:             #gameLeaders('plusminus' 'Plus Minus' $visitorStats.topStats['plusminus'] $homeStats.topStats['plusminus'] 2)
470:             #gameLeadersDonut('svpt' 'Save Percentage' $visitorStats.topStats['svpt'] $homeStats.topStats['svpt'] 1)
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: 
478: 
479:     </div>
480: 
481:     <!-- Game Information -->
482:     <div class="pt-game-info grid-row clearfix">
483:         <div class="pt-tabs-panes clearfix">
484:             <div id="stats-tabs" class="pt-tabs-pane clearfix">
485:                 <div id="divGameInformation" class="grid-row">
486:                     <div class="grid-col grid-col-gi grid-col1">
487:                         <h2 class="grid-title">
488:                             Game Information
489:                         </h2>
490:                         <div class="grid-content clearfix">
491:                             <div class="pt-game-information clearfix">
492:                                 <div class="pt-row clearfix">
493:                                     <center>
494:                                         <div class="game-location pt-col">
495:                                                             <span class="date">
496:                                                                 $localDate<br />
497:                                                                 #if ($tba)
498:                                                                     TBA
499:                                                                 #else
500:                                                                     $localTime
501:                                                                 #end
502:                                                             </span>
503:                                             <h3>Date & Time</h3>
504:                                         </div>
505:                                         #if ($location != '')
506:                                             <div class="game-venue pt-col">
507:                                                             <span class="venue">
508:                                                                 $location<br />
509:                                                                 (Neutral)
510:                                                             </span>
511:                                                 <h3>Location</h3>
512:                                             </div>
513:                                         #end
514:                                     </center>
515:                                 </div>
516:                             </div>
517:                         </div>
518:                     </div>
519:                 </div>
520:             </div>
521:         </div>
522:     </div>
523:     </div>
524: 
525:     <div id="primetime-footer" class="grid-row">
526:         <div class="grid-col grid-col-ftr">
527:             <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
528:         </div>
529:     </div>
530:     </div>
531:     <script type="text/javascript">
532:         (function($) {
533:             $(document).ready(function() {
534:                 Highcharts.setOptions({
535:                     colors: [conf.visitorTeamColor, null]
536:                 });
537:                 $.fn.buildDonutChart('.stats-chart.ts-voff', ${visitorStats.teamStats['pppt100']}, ${visitorStats.teamStats['pppt']}, conf.visitorTeamLighterColor);
538:                 $.fn.buildDonutChart('.stats-chart.ts-vdef', ${visitorStats.teamStats['ppptopp100']}, ${visitorStats.teamStats['ppptopp']}, conf.visitorTeamLighterColor);
539: 
540:                 // Key Contributors Donut
541:                 #set ($visitorTopPlayer = $visitorStats.topStats['svpt'][0])
542:                 $.fn.buildDonutChart('.svpt-top0.visitor', ${visitorTopPlayer.stats['svpt100']}, ${visitorTopPlayer.stats['svpt']}, conf.visitorTeamLighterColor);
543: 
544:                 Highcharts.setOptions({
545:                     colors: [conf.homeTeamColor, null]
546:                 });
547:                 $.fn.buildDonutChart('.stats-chart.ts-hoff', ${homeStats.teamStats['pppt100']}, ${homeStats.teamStats['pppt']}, conf.homeTeamLighterColor);
548:                 $.fn.buildDonutChart('.stats-chart.ts-hdef', ${homeStats.teamStats['ppptopp100']}, ${homeStats.teamStats['ppptopp']}, conf.homeTeamLighterColor);
549: 
550:                 // Key Contributors Donut
551:                 #set ($homeTopPlayer = $homeStats.topStats['svpt'][0])
552:                 $.fn.buildDonutChart('.svpt-top0.home', ${homeTopPlayer.stats['svpt100']}, ${homeTopPlayer.stats['svpt']}, conf.homeTeamLighterColor);
553: 
554:                 Highcharts.setOptions({
555:                     colors: [conf.homeTeamColor, conf.visitorTeamColor]
556:                 });
557: 
558:                 $.fn.buildVisitorBarChart('.top .visitor.goals-per-game', ${visitorStats.teamStats['gfa']}, 5.0, conf.visitorTeamLighterColor);
559:                 $.fn.buildHomeBarChart('.top .home.goals-per-game', ${homeStats.teamStats['gfa']}, 5.0, conf.homeTeamLighterColor);
560: 
561:                 $.fn.buildVisitorBarChart('.top .visitor.goals-allowed-per-game', ${visitorStats.teamStats['gaa']}, 5.0, conf.visitorTeamLighterColor);
562:                 $.fn.buildHomeBarChart('.top .home.goals-allowed-per-game', ${homeStats.teamStats['gaa']}, 5.0, conf.homeTeamLighterColor);
563: 
564:                 // Key Contributors
565:                 #macro (playerStatsScript $category $visitorPlayers $homePlayers $visitorLimit $homeLimit)
566:                     #foreach ($i in [0..1])
567:                         #set ($visitorTopPlayer = $visitorPlayers[$i])
568:                         #set ($homeTopPlayer = $homePlayers[$i])
569:                         $.fn.buildVisitorBarChart('.${category}-top${i}.visitor', ${visitorTopPlayer.stats[$category]}, $visitorLimit, conf.visitorTeamLighterColor);
570:                         $.fn.buildHomeBarChart('.${category}-top${i}.home', ${homeTopPlayer.stats[$category]}, $homeLimit, conf.homeTeamLighterColor);
571:                     #end
572:                 #end
573: 
574:                 #playerStatsScript('p' $visitorStats.topStats['p'] $homeStats.topStats['p'] 50 50)
575:                 #playerStatsScript('g' $visitorStats.topStats['g'] $homeStats.topStats['g'] 50 50)
576:                 #playerStatsScript('plusminus' $visitorStats.topStats['plusminus'] $homeStats.topStats['plusminus'] 50 50)
577: 
578:                 $('.stats-value.visitor').css("background-color", conf.visitorTeamColor);
579:                 $('.stats-value.visitor.light').css("background-color", conf.visitorTeamLighterColor);
580:                 $('.stats-value.home').css("background-color", conf.homeTeamColor);
581:                 $('.stats-value.home.light').css("background-color", conf.homeTeamLighterColor);
582:             });
583:         })(jQuery);
584:     </script>
585: 
586:     ## GENERAL INFORMATION
587:     </div>
588:     #else
589: 
590:     <div id="primetime-wrapper" class="primetime-ice-hockey primetime-wrapper clearfix">
591: 
592:     <div class="primetime-overflow clearfix">
593:     ## HEADER
594:     <div id="primetime-header" class="grid-row">
595:         <div class="grid-col grid-col-hdr">
596: 
597:             <div class="primetime-screen-controls clearfix">
598:                 <a href="#" class="full-screen-button pt-icon-resize-full"><span class="text">Switch</span></a>
599:                 <a href="#" class="normal-screen-button pt-icon-resize-small"><span class="text">Switch</span></a>
600:                 <a href="#" class="expand-button pt-icon-link-ext"><span class="text">Switch</span></a>
601:             </div>
602: 
603:             <div class="pt-header clearfix">
604: 
605:                 <div class="pt-team pt-team-away visitor-team-color"><img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" /><span
606:                         class="team-record visitor-team-record"></span>
607:                     <h3 class="team-name visitor-team-name"></h3>
608:                 </div>
609: 
610:                 <div class="pt-team pt-team-home home-team-color">
611:                     <span class="team-record home-team-record"></span>
612:                     <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
613:                     <h3 class="team-name home-team-name"></h3>
614:                 </div>
615: 
616:                 <div class="pt-match-scoreboard clearfix">
617:                     <p class="team-score visitor-team-score"></p>
618:                     <p class="team-score home-team-score"></p>
619: 
620:                     <div class="pt-mtach-info">
621:                         <span class="time scoreboard-time"></span><br />
622:                         <span class="period scoreboard-period" style="width: 100%"></span>
623:                     </div>
624: 
625:                 </div>
626: 
627:                 <div id="pt-page-nav" class="pt-page-nav">
628:                     <a href="#" class="pt-menu">Menu</a>
629:                     <ul class="clearfix">
630:                         <li><a href="#live-action-title" data-stroke="1" data-id="#live-action-title">Live Action</a></li>
631:                         <li><a href="#line-score-title" data-stroke="2" data-id="#line-score-title">Line Score</a></li>
632:                         <li><a href="#scoring-plays-title" data-stroke="3" data-id="#scoring-plays-title" data-tab-id="#stats-tabs">Scoring Plays</a></li>
633:                         <li><a href="#team-comparison-title" data-stroke="4" data-id="#team-comparison-title" data-tab-id="#stats-tabs">Team Comparison</a></li>
634:                         <li><a href="#individual-stats-title" data-stroke="5" data-id="#individual-stats-title" data-tab-id="#stats-tabs">Individual Stats</a></li>
635:                         <li><a href="#game-info-title" data-stroke="6" data-id="#game-info-title" data-tab-id="#stats-tabs">Game Information</a></li>
636:                         <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>
637:                     </ul>
638:                 </div>
639: 
640:             </div>
641: 
642:         </div>
643:     </div>
644:     ## PRIMETIME HEADER
645: 
646:     ## GRID ROW CONTAINER
647:     <div class="grid-row-container clearfix">
648:     ## GRID ROW
649:         #set ($gridRowClass = "grid-row no-video")
650:         #if ($hasVideo)
651:             #set ($gridRowClass = "grid-row")
652:         #end
653: 
654:     <div id="firstPanelRow" class="$gridRowClass">
655: 
656:         #set ($gridCounter = 0)
657: 
658:         #if ($hasVideo)
659:             #set ($gridCounter = $gridCounter + 1)
660:             <div class="grid-col grid-col-v grid-col${gridCounter}">
661:                 <h3 id="video-field-title" class="grid-title">Broadcast<span class="close">x</span></h3>
662:                 <div class="grid-content clearfix">
663:                     <div class='embed-container'>
664: 
665:                     </div>
666:                 </div>
667:             ## GRID CONTENT
668:             </div>
669:         ## VIDEO COL
670:         #end
671: 
672:         #set ($gridCounter = $gridCounter + 1)
673:         <div class="grid-col grid-col-cd grid-col${gridCounter}">
674:             <h3 id="live-action-title" class="grid-title">
675:                 Live Action<span class="close">x</span>
676:             </h3>
677:             <div class="grid-content clearfix">
678:                 <div class="clearfix">
679:                     <div class="container clearfix pt-live-action">
680:                         <table>
681:                             <thead>
682:                             <tr>
683:                                 <th>Time</th>
684:                                 <th>PP</th>
685:                                 <th>Action</th>
686:                                 <th>Plays</th>
687:                             </tr>
688:                             </thead>
689:                             <tbody>
690:                             </tbody>
691:                         </table>
692:                     </div>
693:                 </div>
694:             </div>
695:         </div>
696:     </div>
697: 
698:     <div class="grid-row">
699:         #set ($gridCounter = $gridCounter + 1)
700:         <div class="grid-col grid-col${gridCounter}">
701:             <h3 id="line-score-title" class="grid-title">
702:                 Line Score<span class="close">x</span>
703:             </h3>
704:             <div class="grid-content clearfix">
705:                 <div class="pt-line-score clearfix">
706:                     <table id="scoreByPeriod">
707:                         <thead>
708:                         <tr>
709:                             <th>&nbsp;</th>
710:                         </tr>
711:                         </thead>
712:                         <tbody>
713:                         <tr class="visitor">
714:                             <td><img src="" alt=""
715:                                      class="team-logo visitor-team-logo" />
716:                                 <span class="team-name visitor-team-name"></span></td>
717:                         </tr>
718:                         <tr class="home">
719:                             <td><img src="" alt=""
720:                                      class="team-logo home-team-logo" />
721:                                 <span class="team-name home-team-name"></span></td>
722:                         </tr>
723:                         </tbody>
724:                     </table>
725: 
726:                 </div>
727:             </div>
728:         ## GRID CONTENT
729:         </div>
730:     ## LINE SCORE
731:     </div>
732: 
733:     ## GRID ROW ## TABS
734:     <div class="pt-game-info clearfix">
735: 
736:     <ul class="pt-tabs clearfix">
737:         <li class="current"><a href="#stats-tabs">Statistics</a></li>
738:         <li><a href="#pbp-tabs">Play By Play</a></li>
739:     </ul>
740: 
741:     <div class="pt-tabs-panes clearfix">
742:     <div id="stats-tabs" class="pt-tabs-pane clearfix">
743: 
744:     ## GRID ROW
745:     <div class="grid-row">
746:         #set ($gridCounter = $gridCounter + 1)
747:         <div class="grid-col grid-col-sp grid-col${gridCounter}">
748:             <h3 id="scoring-plays-title" class="grid-title">
749:                 Scoring Plays<span class="close">x</span>
750:             </h3>
751:             <div class="grid-content clearfix">
752:                 <div id="scoringPlayList" class="pt-scoring-plays clearfix">
753:                 </div>
754:             </div>
755:         ## GRID CONTENT
756: 
757:         </div>
758:     ## SCRING PLAY
759:     </div>
760:     ## GRID ROW ##GRID ROW
761:     <div class="grid-row">
762:         #set ($gridCounter = $gridCounter + 1)
763:         <div class="grid-col grid-col-tc grid-col${gridCounter}">
764:             <h3 id="team-comparison-title" class="grid-title">
765:                 Team Comparison<span class="close">x</span>
766:             </h3>
767:             <div class="grid-content clearfix">
768:                 <div class="pt-team-compare clearfix">
769:                     <table id="teamCompare">
770:                         <thead>
771:                         <tr>
772:                             <th><img src="" alt="" class="team-logo visitor-team-logo" /><br />
773:                                 <span class="team-name visitor-team-name"></span></th>
774:                             <th> <span></span></th>
775:                             <th><img src="" alt="" class="team-logo home-team-logo" /><br />
776:                                 <span class="team-name home-team-name"></span></th>
777:                         </tr>
778:                         </thead>
779: 
780:                         <tbody>
781:                         <tr class="stats-shots">
782:                             <td></td>
783:                             <td class="stats-cat">Shots</td>
784:                             <td></td>
785:                         </tr>
786: 
787:                         <tr class="stats-saves">
788:                             <td></td>
789:                             <td class="stats-cat">Saves</td>
790:                             <td></td>
791:                         </tr>
792: 
793:                         <tr class="stats-faceoffs">
794:                             <td></td>
795:                             <td class="stats-cat">Faceoffs Won</td>
796:                             <td></td>
797:                         </tr>
798: 
799:                         <tr class="stats-powerplays">
800:                             <td></td>
801:                             <td class="stats-cat">Power Plays</td>
802:                             <td></td>
803:                         </tr>
804: 
805:                         <tr class="stats-bshots">
806:                             <td></td>
807:                             <td class="stats-cat">Blocked Shots</td>
808:                             <td></td>
809:                         </tr>
810: 
811:                         <tr class="stats-penalties">
812:                             <td></td>
813:                             <td class="stats-cat">Penalties (Minutes)</td>
814:                             <td></td>
815:                         </tr>
816:                         </tbody>
817: 
818:                     </table>
819:                 </div>
820:             </div>
821:         ## GRID CONTENT
822:         </div>
823:     ## TEAM COMPARE
824:     </div>
825:     ## GRID ROW ## GRID ROW
826:     <div class="grid-row">
827:         #set ($gridCounter = $gridCounter + 1)
828:         <div class="grid-col grid-col-is grid-col${gridCounter}">
829:             <h3 id="individual-stats-title" class="grid-title">
830:                 Individual Stats<span class="close">x</span>
831:                                         <span>
832:                                             <img class="switchStats horizontal" src="/info/primetime3/images/horizontal_view.png" />
833:                                             &nbsp;
834:                                             <img class="switchStats vertical active" src="/info/primetime3/images/vertical_view.png" />
835:                                         </span>
836:             </h3>
837:             <div class="grid-content clearfix">
838:                 <div class="pt-team-stats clearfix">
839: 
840:                     <div id="visitorTeamIndividualStats" class="active clearfix pt-stats-team">
841: 
842:                         <div class="pt-team clearfix">
843:                             <img src="" alt=""
844:                                  class="team-logo visitor-team-logo active" />
845:                             <h3 class="team-name visitor-team-name"></h3>
846:                         </div>
847: 
848:                         <div class="pt-stats-tabs clearfix">
849:                             <div class="pt-panes clearfix">
850:                                 <div id="vOffenseTab" class="pt-pane pt-pane1 clearfix">
851:                                     <div class="pt-row">
852:                                         <table class="goalieStats display"> <!-- goalies -->
853:                                             <thead>
854:                                             <tr>
855:                                                 <th>#</th>
856:                                                 <th>Goalie</th>
857:                                                 <th>GA</th>
858:                                                 <th>SV</th>
859:                                                 <th>SV %</th>
860:                                                 <th>Min</th>
861:                                             </tr>
862:                                             </thead>
863:                                             <tbody>
864: 
865:                                             </tbody>
866:                                         </table>
867:                                     </div>
868: 
869:                                     <div class="pt-row">
870:                                         <table class="playerStats display"> <!-- starters -->
871:                                             <thead>
872:                                             <tr>
873:                                                 <th>#</th>
874:                                                 <th>Player</th>
875:                                                 <th>Pos</th>
876:                                                 <th>G</th>
877:                                                 <th>A</th>
878:                                                 <th>P</th>
879:                                                 <th class="sog">Sog</th>
880:                                                 <th class="toHide">PIM</th>
881:                                                 <th class="toHide">+/-</th>
882:                                                 <th class="toHide">BLK</th>
883:                                                 <th class="toHide">FO</th>
884:                                             </tr>
885:                                             </thead>
886:                                             <tbody>
887: 
888:                                             </tbody>
889:                                         </table>
890:                                     </div>
891:                                 </div>
892:                             </div>
893:                         </div>
894:                     </div>
895: 
896:                     <div id="homeTeamIndividualStats" class="clearfix pt-stats-team">
897: 
898:                         <div class="pt-team clearfix">
899:                             <img src="" alt=""
900:                                  class="team-logo home-team-logo active" />
901:                             <h3 class="team-name home-team-name"></h3>
902:                         </div>
903: 
904:                         <div class="pt-stats-tabs clearfix">
905: 
906:                             <div class="pt-panes clearfix">
907:                                 <div class="pt-pane clearfix">
908:                                     <div class="pt-row">
909:                                         <table class="goalieStats display"> <!-- goalies -->
910:                                             <thead>
911:                                             <tr>
912:                                                 <th>#</th>
913:                                                 <th>Goalie</th>
914:                                                 <th>GA</th>
915:                                                 <th>SV</th>
916:                                                 <th>SV %</th>
917:                                                 <th>Min</th>
918:                                             </tr>
919:                                             </thead>
920:                                             <tbody>
921: 
922:                                             </tbody>
923:                                         </table>
924:                                     </div>
925: 
926:                                     <div class="pt-row">
927:                                         <table class="playerStats display"> <!-- starters -->
928:                                             <thead>
929:                                             <tr>
930:                                                 <th>#</th>
931:                                                 <th>Player</th>
932:                                                 <th>Pos</th>
933:                                                 <th>G</th>
934:                                                 <th>A</th>
935:                                                 <th>P</th>
936:                                                 <th class="sog">Sog</th>
937:                                                 <th class="toHide">PIM</th>
938:                                                 <th class="toHide">+/-</th>
939:                                                 <th class="toHide">BLK</th>
940:                                                 <th class="toHide">FO</th>
941:                                             </tr>
942:                                             </thead>
943:                                             <tbody>
944: 
945:                                             </tbody>
946:                                         </table>
947:                                     </div>
948: 
949:                                 </div>
950:                             </div>
951:                         </div>
952:                     </div>
953: 
954:                 </div>
955:             </div>
956:         ## GRID CONTENT
957:         </div>
958:     ## INDIVISUAL STATS
959:     </div>
960:     ## GRID ROW ## GRID ROW
961:     <div class="grid-row">
962:         #set ($gridCounter = $gridCounter + 1)
963:         <div class="grid-col grid-col-gi grid-col${gridCounter}">
964:             <h3 id="game-info-title" class="grid-title">
965:                 Game Information<span class="close">x</span>
966:             </h3>
967:             <div class="grid-content clearfix">
968:                 <div class="pt-game-information clearfix">
969: 
970:                     <div class="pt-row clearfix">
971:                         <center>
972:                             <div class="date-time pt-col">
973:                                 <span id="gameInformationDate" class="date"></span>
974:                                 <span id="gameInformationTime" class="time"></span>
975:                                 <h3>Date & Time</h3>
976:                             </div>
977: 
978:                             <div class="game-location pt-col">
979:                                 <span id="gameInformationLocation" class="location"></span>
980:                                 <h3>Location</h3>
981:                             </div>
982: 
983:                             <div class="game-venue pt-col">
984:                                 <span id="gameInformationVenue" class="venue"></span>
985:                                 <h3>Venue</h3>
986:                             </div>
987: 
988:                             <div class="weather pt-col">
989: 
990:                                 <div class="weather-condition">
991:                                                                                 <span id="gameInformationTemperature"
992:                                                                                       class="temp"></span>
993:                                     <span id="gameInformationCondition" class="condition"></span>
994:                                 </div>
995:                                 <h3>Weather</h3>
996:                             </div>
997:                         </center>
998:                     </div>
999: 
1000:                 </div>
1001:             </div>
1002:         ## GRID CONTENT
1003:         </div>
1004:     ## GENERAL INFORMATION
1005:     </div>
1006:     ## GRID ROW
1007: 
1008:     </div>
1009: 
1010:     ## PLAY BY PLAY TABS
1011:     <div id="pbp-tabs" class="pt-tabs-pane clearfix">
1012:     ## GRID ROW
1013:         <div class="grid-row">
1014:             #set ($gridCounter = $gridCounter + 1)
1015:             <div class="grid-col grid-col-ds grid-col${gridCounter}">
1016:                 <h3 id="play-by-play-title" class="grid-title">
1017:                     Play by Play<span class="close">x</span>
1018:                 </h3>
1019:                 <div class="grid-content clearfix">
1020:                     <div id="playByPlay" class="clearfix">
1021:                         <select id="filterPeriod" class="dropdownFilter">
1022:                             <option value="" selected>ALL PERIODS</option>
1023:                         </select>
1024:                         <select id="filterPlayType" class="dropdownFilter">
1025:                             <option value="" selected>ALL PLAYS</option>
1026:                             <option value="goal">Goal</option>
1027:                             <option value="shot">Shot</option>
1028:                             <option value="faceoff">Faceoff</option>
1029:                             <option value="penalty">Penalty</option>
1030:                         </select>
1031:                         <select id="filterStrength" class="dropdownFilter">
1032:                             <option value="" selected>All Strength</option>
1033:                             <option value="V" class="visitor-team-name team-name"></option>
1034:                             <option value="H" class="home-team-name team-name"></option>
1035:                             <option value="even">Even Strength</option>
1036:                         </select>
1037:                     </div>
1038:                     <div class="pt-play-by-play clearfix">
1039:                         <table>
1040:                             <thead>
1041:                             <tr>
1042:                                 <th>Time</th>
1043:                                 <th>PP</th>
1044:                                 <th>Action</th>
1045:                                 <th>Plays</th>
1046:                             </tr>
1047:                             </thead>
1048:                             <tbody>
1049:                             </tbody>
1050:                         </table>
1051:                     </div>
1052:                 </div>
1053:             ## GRID CONTENT
1054:             </div>
1055:         ## DRIVE SUMMARY
1056:         </div>
1057:     ## GRID ROW
1058:     </div>
1059:     ## PLAY BY PLAY TABS
1060:     </div>
1061:     ## PT TABS PANES
1062:     </div>
1063:     ## PRIME TIME GAME INFO
1064:     </div>
1065:     ## GRID ROW CONTAINER
1066: 
1067:     ## FOOTER
1068:     <div id="primetime-footer" class="grid-row">
1069:         <div class="grid-col grid-col-ftr">
1070:             <a href="/"><img src="/info/primetime3/images/presto-logo.png" alt="prestosports website" /></a>
1071:         </div>
1072:     </div>
1073: 
1074:     </div>
1075:     ## PRIMTE TIME OVERFLOW
1076:     </div>
1077:     ## PRIME TIME WRAPPER
1078:     #end
1079: 
1080:     #set ($showWiki = true)
1081:     #set ($showWiki = $showWikiVar)
1082:     #if ($showWiki == true)
1083:         $wiki.su
1084:     #end
1085: ## END OF PRIMETIME
1086: 
1087: #else
1088: ##COMMON FUNCTIONS
1089:     #macro (changeViewScript)
1090:     ## CORRECT WRONG VIEW WITH REPLACESTATE
1091:     <script type="text/javascript">
1092:         $(function () {
1093:             if (!$('.stats-tabs li.active').length) {
1094:                 if (history.replaceState) {
1095:                     history.replaceState({}, '', '?view=' + $('.stats-tabs li:first').addClass('active').children('a').data('view'));
1096:                 } else {
1097:                     $('.stats-tabs li:first').addClass('active');
1098:                 }
1099:             }
1100:         })
1101:     </script>
1102:     #end
1103: 
1104:     #macro (printPdfHeader $title)
1105:     <div class="stats-fullbox clearfix">
1106:         <table>
1107:             <tr>
1108:                 <td class="align-center"><h4>$title</h4></td>
1109:             </tr>
1110:         </table>
1111:     </div>
1112:     #end
1113: 
1114:     #set ($homeTeam = $document.selectSingleNode("hkgame/team[@vh='H']"))
1115:     #set ($visitorTeam = $document.selectSingleNode("hkgame/team[@vh='V']"))
1116:     #set ($home = $document.valueOf("hkgame/team[@vh='H']/@name"))
1117:     #set ($visitor = $document.valueOf("hkgame/team[@vh='V']/@name"))
1118:     #set ($totalPeriods = $document.selectNodes("hkgame/team[1]/linescore/lineprd").size())
1119:     #set ($periods = $tool.math.toInteger($document.valueOf("hkgame/status/@period")))
1120:     #set ($periodRange = [1..$periods])
1121: 
1122:     #set ($linkPlayers = $stats.linkPlayers)
1123:     #set ($linkPlayersBase = $stats.linkPlayersBase)
1124:     #set ($linkTeams = $stats.linkTeams)
1125:     #set ($linkTeamsBase = $stats.linkTeamsBase)
1126: 
1127:     #set ($gamePlayedOn = $document.valueOf("hkgame/venue/@date"))
1128:     #set ($gameStartedAt = $document.valueOf("hkgame/venue/@start"))
1129:     #set ($isNeutralGame = $documnt.valueOf("hkgame/venue/@neutralgame"))
1130:     #set ($schedNote = $document.valueOf("hkgame/venue/@schednote"))
1131:     #set ($hasPlayByPlay = $document.selectNodes("hkgame/plays/period").size() > 0)
1132: 
1133: ##INVERT CLOCK
1134:     #set ($clockSplited = $document.valueOf("hkgame/status/@clock").split(":"))
1135:     #foreach ($clockPart in $clockSplited)
1136:         #set($clockPart = $tool.Math.toInteger($clockPart))
1137:         #if ($velocityCount == 1) ##MINUTES
1138:             #if ($periods >= 4) ##MINUTES FOR OVERTIME (5)
1139:                 #set($maxMinutes = 5)
1140:             #else ##MINUTES FOR NORMAL PERIOD (20)
1141:                 #set($maxMinutes = 20)
1142:             #end
1143: 
1144:             #set($clockMinutes = $maxMinutes - $clockPart)
1145:             #if ($clockMinutes == $maxMinutes)
1146:                 #set($clockMinutes = $maxMinutes)
1147:             #end
1148:         #end
1149: 
1150:         #if ($velocityCount == 2) ##SECONDS
1151:             #set($clockSeconds = 60 - $clockPart)
1152:             #if ($clockSeconds == 60)
1153:                 #set($clockSeconds = 0)
1154:             #end
1155:         #end
1156:     #end
1157: ##DOWNSIZE MINUTE, IF SECONDS ARE NOT EQUAL ZERO
1158:     #if ($clockSeconds != 0)
1159:         #set($clockMinutes = $clockMinutes - 1)
1160:     #end
1161: ##CONVERT TO 00 FORMAT
1162:     #if ($clockSeconds < 10)
1163:         #set($clockSeconds = "0$clockSeconds")
1164:     #end
1165: 
1166:     #set ($clock = "$clockMinutes:$clockSeconds")
1167: ##END INVERT CLOCK
1168: 
1169: ## NEUTRAL SITE
1170:     #if ($isNeutralGame.length() > 0 && $isNeutralGame.equals("Y"))
1171:         #set ($isNeutralGame = true)
1172:     #else
1173:         #set ($isNeutralGame = false)
1174:     #end
1175: 
1176: ## PERIOD NAME
1177:     #macro (period $p)
1178:         #set($p = $tool.math.toInteger($p))
1179:         #if ($p == 1) 1st
1180:         #elseif ($p == 2) 2nd
1181:         #elseif ($p == 3) 3rd
1182:         #elseif ($p == 4) OT
1183:         #else
1184:             #set ($ot = $p - 3)
1185:             ${ot}OT
1186:         #end
1187:     #end
1188: 
1189: ## PERIOD NUMBER
1190:     #macro (printPeriodCount $p)
1191:         #set ($p = $tool.math.toInteger($p))
1192:         #if ($p == 4) OT
1193:         #elseif ($p > 4)
1194:             #set ($ot = $p - 3)
1195:             ${ot}OT
1196:         #else $p
1197:         #end
1198:     #end
1199: 
1200: ## GOALIE SHOTS
1201:     #macro (shots $ga $saves)
1202:         #if ($saves.length() > 0)
1203:             $tool.math.add($ga, $saves)
1204:         #else
1205:         #end
1206:     #end
1207: 
1208: 
1209: ## POWER PLAY PERCENTAGE
1210:     #macro (pp $ppg $ppopp)
1211:         #if ($ppopp.length() > 0)
1212:             $formatter.formatNumber($tool.math.div($ppopp, $ppg), 3)
1213:         #else
1214:         #end
1215:     #end
1216: 
1217: ## SHOOTOUT
1218:     #macro (shootout $shootouts $t)
1219:         #foreach ($shot in $shootouts)
1220:             #if ($shot.valueOf("@vh") == $t)
1221:                 #if ($shot.valueOf("@result") == "MADE")
1222:                 Goal
1223:                 #else
1224:                 No Goal
1225:                 #end
1226:             - #${shot.valueOf("@uni")} ${shot.valueOf("@name")}<br>
1227:             #end ## if
1228:         #end ## foreach
1229:     #end
1230: 
1231: ## SHOOTOUT
1232:     #macro (shootoutTotals $shootouts $t)
1233:         #foreach ($shot in $shootouts)
1234:             #if ($shot.valueOf("@vh") == $t)
1235:                 #if ($shot.valueOf("@result") == "MADE")
1236:                     #set ($score = $shootoutScores.get($t))
1237:                     #set ($score = $tool.math.add($score, 1))
1238:                     #set ($score = $shootoutScores.put($t, $score))
1239:                 #end
1240:             #end ## if
1241:         #end ## foreach
1242:     #end
1243: 
1244:     #set ($shootoutScores = {"V" : 0, "H" : 0})
1245:     #set ($shootouts = $document.selectNodes("hkgame/shootouts/shootout"))
1246:     #shootoutTotals($shootouts "V")
1247:     #shootoutTotals($shootouts "H")
1248: 
1249:     #if ($browser.getIphone() || $browser.getMobile()) ##MOBILE VERSION
1250: 
1251:     ## serve dependencies if missing
1252:     <script>
1253:         if (!$('link[href="/info/mobile/stats/mobile-stats.css"]').length) {
1254:             $('head').eq(0).append('<link rel="stylesheet" type="text/css" href="/info/responsive-temp-mobile-stats.css" />');
1255:         }
1256: 
1257:         if (typeof $.mobileSite === "undefined") {
1258:             var script = document.createElement('script');
1259:             script.src = "/info/mobile/mobile-js/mobile-site.js";
1260:             $('body').eq(0).append(script);
1261:         }
1262: 
1263:         if (typeof $LAB === "undefined") {
1264:             var script = document.createElement('script');
1265:             script.src = "/info/mobile/mobile-js/LAB.min.js";
1266:             $('body').eq(0).append(script);
1267:         }
1268:     </script>
1269: 
1270:         #macro (printMobileHeader)
1271: 
1272:         <div class="teams">
1273:             <div class="frame clearfix">
1274:                 <div class="team">
1275:                     $visitorTeam.attributeValue("name")
1276:                 </div>
1277:                 <div class="versus">vs.</div>
1278:                 <div class="team right">
1279:                     $homeTeam.attributeValue("name")
1280:                 </div>
1281:             </div>
1282:         </div>
1283: 
1284:         <div class="board">
1285:             <div class="frame clearfix">
1286:                 <div class="result">$visitorTeam.valueOf("linescore/@score")</div>
1287:                 <div class="timer">
1288:                 ##<div class="time">$document.valueOf("hkgame/venue/@date")</div>
1289:                 ##<div class="half">$document.valueOf("hkgame/venue/@start")</div>
1290:                     #if ($stats.final)
1291:                         <div class="time">Final</div>
1292:                     #else
1293:                         <div class="time">$!clock - #period($periods)</div>
1294:                     #end
1295:                 </div>
1296:                 <div class="result">$homeTeam.valueOf("linescore/@score")</div>
1297:             </div>
1298:         </div>
1299: 
1300:         #end
1301: 
1302:         #set ($showWiki = true)
1303:         #set ($showWiki = $showWikiVar)
1304: 
1305:         #if ($showWiki == true)
1306:             $!wiki.su
1307:         #end
1308:         #if($periods.length() > 0)
1309:             #set ($mobile_lastPlay = $document.selectSingleNode("hkgame/plays/period[@number=$periods.intValue()]/play[last()]"))
1310:         #end
1311: 
1312:     <script type="text/javascript">
1313:         mobileConf.page = 'boxscore';
1314:         mobileConf.pageParams = {
1315:             deepLinking : true
1316:             #if ($stats.inProgress)
1317:                 , inprogress : true
1318:             #end
1319:         }
1320:     </script>
1321: 
1322:     <div class="swipe-header">
1323:         <a href="#" id="swipe-left"></a>
1324:         <a href="#" id="swipe-right"></a>
1325:         <ul class="dot-nav">
1326:             <li class="dot-nav-1 active"></li>
1327:             <li class="dot-nav-2"></li>
1328:             <li class="dot-nav-3"></li>
1329:         </ul>
1330:     </div>
1331:     <!-- BEGING SCORE BOARD-->
1332:     <div id="swipe-wrapper">
1333:     <div id="live2" class="hockey-stats">
1334:     <div class="swipe-screen" data-view="scoring">
1335:         <div class="score_board">
1336: 
1337:             #printMobileHeader()
1338: 
1339:             <div class="table">
1340:                 <div class="frame">
1341:                     <div class="clearfix">
1342:                         <div class="cell cell_s">&#160;</div>
1343:                         <div class="cell cell_m">&#160;</div>
1344:                         <div class="cell cell_l title">SCORING</div>
1345:                         <div class="cell cell_m">&#160;</div>
1346:                         <div class="cell cell_s">&#160;</div>
1347:                     </div>
1348: 
1349:                     #foreach ($p in [1..$totalPeriods])
1350:                         #if ($visitorTeam.valueOf("linescore/lineprd[$p]/@score") || $homeTeam.valueOf("linescore/lineprd[$p]/@score"))
1351:                             <div class="clearfix">
1352:                                 <div class="cell cell_s">&#160;</div>
1353:                                 <div class="cell cell_m">$visitorTeam.valueOf("linescore/lineprd[$p]/@score")</div>
1354:                                 <div class="cell cell_l">#period($p)</div>
1355:                                 <div class="cell cell_m">$homeTeam.valueOf("linescore/lineprd[$p]/@score")</div>
1356:                                 <div class="cell cell_s">&#160;</div>
1357:                             </div>
1358:                         #end
1359:                     #end
1360: 
1361:                     <div class="clearfix">
1362:                         <div class="cell cell_s">&#160;</div>
1363:                         <div class="cell cell_m">$visitorTeam.valueOf("linescore/@score")</div>
1364:                         <div class="cell cell_l">#if ($stats.final) FINAL #else TOTAL #end</div>
1365:                         <div class="cell cell_m">$homeTeam.valueOf("linescore/@score")</div>
1366:                         <div class="cell cell_s">&#160;</div>
1367:                     </div>
1368: 
1369: 
1370:                     #if ($shootouts.size() > 0)
1371:                         <div class="clearfix">
1372:                             <div class="cell cell_s">&#160;</div>
1373:                             <div class="cell cell_m">${shootoutScores.get("V")}</div>
1374:                             <div class="cell cell_l">SHOOTOUT</div>
1375:                             <div class="cell cell_m">${shootoutScores.get("H")}</div>
1376:                             <div class="cell cell_s">&#160;</div>
1377:                         </div>
1378:                     #end
1379: 
1380:                 </div>
1381:             </div>
1382: 
1383: 
1384: 
1385:             #if ($mobile_lastPlay)
1386:                 <div class="recent">
1387:                     <div class="frame">
1388:                         <div class="toggle clearfix">
1389:                             <div class="title">LAST PLAY</div>
1390:                             <div class="arrow">
1391:                                 <img src="/info/mobile/stats/images/arrow_down2.gif" class="recent_arrow_down" width="13" height="9"/>
1392:                                 <img src="/info/mobile/stats/images/arrow_up2.gif" class="recent_arrow_up" style="display: none;" width="13" height="9"/>
1393:                             </div>
1394:                         </div>
1395:                         <div class="plays recent_plays" style="display: none;">
1396:                             <div class="play period">$!mobile_lastPlay.attributeValue("text")</div>
1397:                         </div>
1398:                     </div>
1399:                 </div>
1400:             #end
1401: 
1402:             <div class="recent">
1403:                 <div class="frame">
1404:                     <div class="toggle clearfix">
1405:                         <div class="title">Scoring Summary</div>
1406:                         <div class="arrow">
1407:                             <img height="9" width="13" class="recent_arrow_down" src="/info/mobile/stats/images/arrow_down2.gif" style="display: inline;">
1408:                             <img height="9" width="13" style="display: none;" class="recent_arrow_up" src="/info/mobile/stats/images/arrow_up2.gif">
1409:                         </div>
1410:                     </div>
1411: 
1412:                     <div class="plays recent_plays" style="display: none;">
1413:                     ## SCORING SUMMARY
1414:                         #foreach ($pd in $periodRange)
1415:                             #set ($shownStats = "")
1416:                             <div class="play period">
1417:                                 #period($pd)
1418:                             </div>
1419: 
1420:                             #foreach ($score in $document.selectNodes("hkgame/scores/score"))
1421:                                 #if ($pd == $score.valueOf("@prd"))
1422:                                     #set ($shownStats = "y")
1423:                                     <div class="play clearfix">
1424:                                         <div class="time">
1425:                                             $score.valueOf("@time")
1426:                                         </div>
1427:                                         <div class="text">
1428:                                             <b>
1429:                                                 #if
1430:                                                     ($score.valueOf("@vh") == 'H') $home
1431:                                                 #end
1432:                                                 #if
1433:                                                     ($score.valueOf("@vh") == 'V') $visitor
1434:                                                 #end
1435:                                             </b>&#160; - &#160;
1436:                                             #if ($score.valueOf("@type") == 'PP')<i>PP - </i>#end
1437:                                             #if ($score.valueOf("@type") == 'SH')<i>SH - </i>#end
1438:                                             #if ($score.valueOf("@type") == 'PS')<i>PS - </i>#end
1439:                                             #if ($score.valueOf("@engoal") == 'Y')<i>EN - </i>#end
1440: 
1441:                                             #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1442:                                             <a href="$!linkPlayersBase?id=${score.valueOf("@playerId")}">
1443:                                             #end
1444:                                             $score.valueOf("@name")
1445:                                             #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1446:                                             </a>
1447:                                             #end
1448: 
1449:                                         #* ORIGINAL CODE
1450:                                         (<i>
1451:                                         #if($score.valueOf("@assist1").length() > 0)
1452:                                             #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1453:                                                 <a href="$!linkPlayersBase?id=${score.valueOf("@assist1Id")}">
1454:                                             #end
1455:                                             $score.valueOf("@assist1")
1456:                                             #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1457:                                                 </a>
1458:                                             #end
1459:                                         #else
1460:                                             (unassisted#end#if($score.valueOf("@assist2").length() > 0)
1461:                                             &amp;
1462:                                             #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1463:                                                 <a href="$!linkPlayersBase?id=${score.valueOf("@assist2Id")}">
1464:                                             #end
1465:                                             $score.valueOf("@assist2")
1466:                                             #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1467:                                                 </a>
1468:                                             #end
1469:                                         #end
1470:                                         )</i>
1471:                                         *#
1472:                                             (<i>#if($score.valueOf("@assist1").length() > 0)#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)<a href="$!linkPlayersBase?id=${score.valueOf("@assist1Id")}">#end$score.valueOf("@assist1")#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)</a>#end#else unassisted #end#if($score.valueOf("@assist2").length() > 0) &amp; #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)<a href="$!linkPlayersBase?id=${score.valueOf("@assist2Id")}">#end $score.valueOf("@assist2")#if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)</a>#end#end</i>)
1473: 
1474:                                         </div>
1475:                                     </div>
1476:                                 #end
1477:                             #end
1478:                             #if ($shownStats == "")
1479:                                 <div class="play clearfix center">(no scoring)</div>
1480:                             #end
1481:                         #end
1482:                     </div>
1483:                 </div>
1484:             </div>
1485:         </div>
1486:     </div>
1487: 
1488:     <!-- BEGING LINE UP -->
1489:     <div class="swipe-screen" data-view="boxscore">
1490:         #printMobileHeader()
1491:         <div class="team_stats">
1492:             <div class="teams clearfix">
1493:                 <div id="button-1" class="button clearfix active">
1494:                     <div class="team">$visitor</div>
1495:                     <div class="end">
1496:                         <div>&#160;</div>
1497:                     </div>
1498:                 </div>
1499:                 <div id="button-2" class="button clearfix">
1500:                     <div class="team">$home</div>
1501:                     <div class="end">
1502:                         <div>&#160;</div>
1503:                     </div>
1504:                 </div>
1505: 
1506:                 <!-- BEGING STATS -->
1507: 
1508:                 #macro (mobile_playerstats $team)
1509:                     <div class="titles clearfix">
1510:                         <div class="data">#</div>
1511:                         <div class="name">PLAYER</div>
1512:                         <div class="data">POS</div>
1513:                         <div class="data">G</div>
1514:                         <div class="data">A</div>
1515:                         <div class="data">+/-</div>
1516:                         <div class="data">S</div>
1517:                         <div class="data">PIM</div>
1518:                     </div>
1519: 
1520:                     #foreach ($stat in $team.selectNodes("player/shots"))
1521: 
1522:                         <div class="row">
1523:                             <div class="toggle clearfix">
1524:                                 <div class="data">$!stat.valueOf("../@uni")</div>
1525:                                 <div class="name">
1526:                                     #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
1527:                                     ## <a href="$!linkPlayersBase?id=${stat.valueOf("../@playerId")}">
1528:                                     #end
1529: 									$stat.valueOf("../@name")
1530: 									#if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
1531:                                 ## </a>
1532:                                 #end
1533:                                 </div>
1534:                                 <div class="data">
1535:                                     #if ($stat.valueOf("../@pos").length() > 0)
1536:                                         $stat.valueOf("../@pos")
1537:                                     #else
1538:                                         &#160;
1539:                                     #end
1540:                                 </div>
1541:                                 <div class="data">$!stat.valueOf("@g")</div>
1542:                                 <div class="data">$!stat.valueOf("@a")</div>
1543:                                 <div class="data">$!stat.valueOf("../misc/@plusminus")</div>
1544:                                 <div class="data">$!stat.valueOf("@sh")</div>
1545:                                 <div class="data">$!stat.valueOf("../penalty/@minutes")</div>
1546:                             </div>
1547:                         </div>
1548:                     #end
1549: 
1550:                     <div class="titles clearfix goalies">
1551:                         <div class="data">#</div>
1552:                         <div class="name">GOALIES</div>
1553:                         <div class="data">GA</div>
1554:                         <div class="data">Min</div>
1555:                         <div class="data">SV</div>
1556:                         <div class="data">S</div>
1557:                         <div class="data">PIM</div>
1558:                     </div>
1559: 
1560:                     #foreach ($stat in $team.selectNodes("player/goalie"))
1561:                         <div class="row goalies">
1562:                             <div class="toggle clearfix">
1563:                                 #if($stat.valueOf("../@uni") == "TM")
1564:                                     <div class="data">&#160;</div>
1565:                                     <div class="name">Empty Net</div>
1566:                                 #else
1567:                                     <div class="data">$!stat.valueOf("../@uni")</div>
1568:                                     <div class="name">
1569:                                         #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
1570:                                         ## <a href="$!linkPlayersBase?id=${stat.valueOf("../@playerId")}">
1571:                                         #end
1572: 										$stat.valueOf("../@name")
1573: 										#if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
1574:                                         ## </a>
1575:                                         #end
1576:                                     </div>
1577:                                 #end
1578: 
1579:                                 #set ($ga = $stat.numberValueOf("@ga") + $stat.numberValueOf("@eng"))
1580:                                 <div class="data">$!formatter.formatNumber($ga, "#")</div>
1581:                                 <div class="data">$!stat.valueOf("@minutes")</div>
1582:                                 <div class="data">$!stat.valueOf("@saves")</div>
1583:                                 <div class="data">#shots($stat.valueOf("@ga") $stat.valueOf("@saves"))</div>
1584:                                 <div class="data">$!stat.valueOf("@pen")</div>
1585:                             </div>
1586:                         </div>
1587:                     #end
1588:                 #end
1589: 
1590:             ## VISITOR STATISTICS
1591:                 <div class="table hockey" id="table_team_stats_1">#mobile_playerstats($document.selectSingleNode("hkgame/team[@vh='V']"))</div>
1592: 
1593:             ## HOME STATISTICS
1594:                 <div class="table hockey" id="table_team_stats_2" style="display: none">#mobile_playerstats($document.selectSingleNode("hkgame/team[@vh='H']"))</div>
1595:                 <!-- END STATS -->
1596:             </div>
1597:         </div>
1598:     </div>
1599:     <!-- END LINE UP -->
1600: 
1601:     <!-- BEGING TEAM STATS -->
1602:     <div class="swipe-screen" data-view="summary">
1603:         #printMobileHeader()
1604:         <div class="line_up">
1605:             <div class="table">
1606:                 <div class="frame">
1607:                     <div class="clearfix">
1608:                         <div class="cell cell_s">&#160;</div>
1609:                         <div class="cell cell_m">&#160;</div>
1610:                         <div class="cell cell_l title">SHOTS</div>
1611:                         <div class="cell cell_m">&#160;</div>
1612:                         <div class="cell cell_s">&#160;</div>
1613:                     </div>
1614: 
1615:                     #foreach ($p in [1..$totalPeriods])
1616:                         #if ($visitorTeam.valueOf("linescore/lineprd[$p]/@score") || $homeTeam.valueOf("linescore/lineprd[$p]/@score"))
1617:                             <div class="clearfix">
1618:                                 <div class="cell cell_s">&#160;</div>
1619:                                 <div class="cell cell_m">$visitorTeam.valueOf("linescore/lineprd[$p]/@shots")</div>
1620:                                 <div class="cell cell_l">#period($p)</div>
1621:                                 <div class="cell cell_m">$homeTeam.valueOf("linescore/lineprd[$p]/@shots")</div>
1622:                                 <div class="cell cell_s">&#160;</div>
1623:                             </div>
1624:                         #end
1625:                     #end
1626: 
1627:                     <div class="clearfix">
1628:                         <div class="cell cell_s">&#160;</div>
1629:                         <div class="cell cell_m">$visitorTeam.valueOf("linescore/@shots")</div>
1630:                         <div class="cell cell_l">TOTAL</div>
1631:                         <div class="cell cell_m">$homeTeam.valueOf("linescore/@shots")</div>
1632:                         <div class="cell cell_s">&#160;</div>
1633:                     </div>
1634: 
1635:                     <div class="clearfix">
1636:                         <div class="cell cell_s">&#160;</div>
1637:                         <div class="cell cell_m">$visitorTeam.valueOf("totals/misc/@facewon")-$tool.math.add($visitorTeam.valueOf("totals/misc/@facewon"),$visitorTeam.valueOf("totals/misc/@facelost"))</div>
1638:                         <div class="cell cell_l title">Faceoffs</div>
1639:                         <div class="cell cell_m">$homeTeam.valueOf("totals/misc/@facewon")-$tool.math.add($homeTeam.valueOf("totals/misc/@facewon"),$homeTeam.valueOf("totals/misc/@facelost"))</div>
1640:                         <div class="cell cell_s">&#160;</div>
1641:                     </div>
1642:                     <div class="clearfix">
1643:                         <div class="cell cell_s">&#160;</div>
1644:                         <div class="cell cell_m">
1645:                             $visitorTeam.valueOf("totals/powerplay/@ppg") for $visitorTeam.valueOf("totals/powerplay/@ppopp")<br>
1646:                             (#pp($visitorTeam.valueOf("totals/powerplay/@ppopp") $visitorTeam.valueOf("totals/powerplay/@ppg")))
1647:                         </div>
1648:                         <div class="cell cell_l title">Power Plays</div>
1649:                         <div class="cell cell_m">
1650:                             $homeTeam.valueOf("totals/powerplay/@ppg") for $homeTeam.valueOf("totals/powerplay/@ppopp")<br>
1651:                             (#pp($homeTeam.valueOf("totals/powerplay/@ppopp") $homeTeam.valueOf("totals/powerplay/@ppg")))
1652:                         </div>
1653:                         <div class="cell cell_s">&#160;</div>
1654:                     </div>
1655:                     <div class="clearfix">
1656:                         <div class="cell cell_s">&#160;</div>
1657:                         <div class="cell cell_m">&#160;</div>
1658:                         <div class="cell cell_l title">Penalty Totals</div>
1659:                         <div class="cell cell_m">&#160;</div>
1660:                         <div class="cell cell_s">&#160;</div>
1661:                     </div>
1662:                     <div class="clearfix">
1663:                         <div class="cell cell_s">&#160;</div>
1664:                         <div class="cell cell_m">$visitorTeam.valueOf("totals/penalty/@minutes")</div>
1665:                         <div class="cell cell_l">Minutes</div>
1666:                         <div class="cell cell_m">$homeTeam.valueOf("totals/penalty/@minutes")</div>
1667:                         <div class="cell cell_s">&#160;</div>
1668:                     </div>
1669:                     <div class="clearfix">
1670:                         <div class="cell cell_s">&#160;</div>
1671:                         <div class="cell cell_m">$visitorTeam.valueOf("totals/penalty/@count")</div>
1672:                         <div class="cell cell_l">Infractions</div>
1673:                         <div class="cell cell_m">$homeTeam.valueOf("totals/penalty/@count")</div>
1674:                         <div class="cell cell_s">&#160;</div>
1675:                     </div>
1676: 
1677:                     <div class="recent">
1678:                         <div class="frame">
1679:                             <div class="other">
1680:                                 <div class="toggle clearfix">
1681:                                     <div class="play title">
1682:                                         Penalty Summary
1683:                                         <div class="arrow">
1684:                                             <img src="/info/mobile/stats/images/arrow_down2.gif" class="recent_arrow_down" width="13" height="9"/>
1685:                                             <img src="/info/mobile/stats/images/arrow_up2.gif" class="recent_arrow_up" style="display: none;" width="13" height="9"/>
1686:                                         </div>
1687:                                     </div>
1688:                                 </div>
1689:                                 <div class="recent_plays plays" style="display: none;">
1690:                                     #foreach ($pd in $periodRange)
1691:                                         #set ($shownStats = "")
1692:                                         <div class="play period">#period($pd)</div>
1693:                                         #foreach ($penalty in $document.selectNodes("hkgame/penalties/pen"))
1694:                                             #if ($pd == $penalty.valueOf("@prd"))
1695:                                                 #set ($shownStats = "y")
1696:                                                 <div class="row clearfix">
1697:                                                     <div class="data">
1698:                                                         $penalty.valueOf("@time")
1699:                                                         #if($penalty.valueOf("@vh") == 'H') $home #end
1700:                                                         #if($penalty.valueOf("@vh") == 'V') $visitor #end
1701:                                                         &#160; - &#160;
1702:                                                     </div>
1703:                                                     <div class="data">
1704:                                                         $penalty.valueOf("@name"): $!penalty.valueOf("@desc")
1705:                                                     </div>
1706:                                                     <div class="data">
1707:                                                         $penalty.valueOf("@type")
1708:                                                         $penalty.valueOf("@minutes") minutes
1709:                                                     </div>
1710:                                                 </div>
1711:                                             #end
1712:                                         #end
1713:                                         #if ($shownStats == "")
1714:                                             <div class="row sub_title"><i>No penalties</i></div>
1715:                                         #end
1716:                                     #end
1717:                                 </div>
1718:                             </div>
1719:                         </div>
1720:                     </div>
1721: 
1722:                     <div class="recent">
1723:                         <div class="frame">
1724:                             <div class="other">
1725:                                 <div class="toggle clearfix">
1726:                                     <div class="row title">
1727:                                         Other Information
1728:                                         <div class="arrow">
1729:                                             <img src="/info/mobile/stats/images/arrow_down2.gif" class="recent_arrow_down" width="13" height="9"/>
1730:                                             <img src="/info/mobile/stats/images/arrow_up2.gif" class="recent_arrow_up" style="display: none;" width="13" height="9"/>
1731:                                         </div>
1732:                                     </div>
1733:                                 </div>
1734: 
1735:                                 <div class="recent_plays plays" style="display: none;">
1736:                                     <div class="row clearfix">
1737:                                         <div class="data">Location</div>
1738:                                         <div class="text">$document.valueOf("hkgame/venue/@location")</div>
1739:                                     </div>
1740:                                     <div class="row clearfix">
1741:                                         <div class="data">Game Length</div>
1742:                                         <div class="text">$document.valueOf("hkgame/venue/@duration")</div>
1743:                                     </div>
1744:                                     <div class="row clearfix">
1745:                                         <div class="data">Attendance</div>
1746:                                         <div class="text">$document.valueOf("hkgame/venue/@attend")</div>
1747:                                     </div>
1748:                                     #foreach ($official in $document.selectNodes("hkgame/venue/officials/official"))
1749:                                         <div class="row clearfix">
1750:                                             <div class="data">$official.valueOf("@title")</div>
1751:                                             <div class="text">$official.valueOf("@name")</div>
1752:                                         </div>
1753:                                     #end
1754:                                 </div>
1755:                             </div>
1756:                         </div>
1757:                     </div>
1758:                 </div>
1759:             </div>
1760:         </div>
1761:     </div>
1762:     </div>
1763:     </div>
1764:         #set ($showWiki = true)
1765:         #set ($showWiki = $showWikiVar)
1766: 
1767:         #if ($showWiki == true)
1768:             $!wiki.su
1769:         #end
1770: 
1771:     ###################################################################################################################
1772: 
1773:     #else
1774:     ##WEBSITE VERSION
1775:         #if ($stats.view != "pdf")
1776:             #set ($showWiki = true)
1777:             #set ($showWiki = $showWikiVar)
1778: 
1779:             #if ($showWiki == true)
1780:                 $!wiki.su
1781:             #end
1782:         #end
1783: 
1784:         #if ($stats.pageUrl.length() > 0 && !$stats.pageUrl.contains("?"))
1785:             #set ($paramSep = "?")
1786:         #else
1787:             #set ($paramSep = "&")
1788: 		#end
1789: 
1790: 		#set ($titleVa = "at")
1791:         #if ($isNeutralGame)
1792:         	#set ($titleVa = "vs.")
1793:         #end
1794: 
1795: 		#set ($pageTitle = "$visitor $titleVa $home")
1796: 
1797:         #if ($gamePlayedOn.length() > 0)
1798:         	#set ($dateObj = $tool.date.toDate("MM/dd/yyyy", $gamePlayedOn))
1799:         	#set ($pageTitle = "${pageTitle} - ${formatter.formatLongDate($dateObj)}")
1800:         #end
1801: 
1802:         #if ($gameStartedAt.length() > 0)
1803:         	#set ($pageTitle = "${pageTitle} - ${gameStartedAt}")
1804:         #end
1805: 
1806:     <html>
1807:     <head>
1808:         <title>$pageTitle - Box Score</title>
1809:         #if ($stats.inProgress)
1810:             <meta http-equiv="refresh" content="60" />
1811:         #end
1812:         #if ($stats.view == "pdf")
1813:             #include("statcrew-pdf-css-template")
1814:         #end
1815:     </head>
1816:     <body>
1817: 
1818:         #if ($stats.view == "pdf")
1819:         <div class='footer-left'>$visitor vs. $home</div>
1820:         <div class='footer-right'><span id="pagenumber"></span> of <span
1821:                 id="pagecount"></span></div>
1822:         #end
1823: $request.setAttribute("relatedLinksContentPage", $page)
1824: $website.includeAgain("related-links-template")
1825: 
1826:     <div class="stats-wrapper clearfix">
1827:         #if ($stats.view != "pdf")
1828:         ## GAME INFORMATION
1829:         <div class="align-center">
1830:             <span class="bold">$visitor #if($isNeutralGame)vs.#else at #end $home</span><br />at $document.valueOf("hkgame/venue/@location")<br />
1831:             #if ($gamePlayedOn.length() > 0)$gamePlayedOn #end #if ($gameStartedAt.length() > 0)at $gameStartedAt #end
1832:             #if ($schedNote.length() > 0)<br />$schedNote #end
1833:         </div>
1834:         <br />
1835: 
1836:         ## TEAM SCORES
1837:         <table class="all-center">
1838:             <tr>
1839:                 #foreach ($team in $document.selectNodes("hkgame/team"))
1840:                     <td style="width:50%">
1841:                         #if ($team.attributeValue("link").length() > 0 and $linkTeams)
1842:                         <a href="$!linkTeamsBase?id=${team.attributeValue("teamId")}">
1843:                         #end
1844:                         <span class="stats-header">$team.attributeValue("name")</span>
1845:                         #if ($team.attributeValue("link").length() > 0 and $linkTeams)
1846:                         </a>
1847:                         #end
1848:                         <br /><span class="stats-header">$team.valueOf("linescore/@score")</span>
1849:                     </td>
1850:                 #end
1851:             </tr>
1852:         </table>
1853: 
1854:         <div class="stats-fullbox clearfix">
1855:         ## PERIOD SUMMARY
1856:             <table>
1857:                 <tr>
1858:                     <th class="align-left">Scoring</th>
1859:                     #foreach ($p in [1..$totalPeriods])
1860:                         <th style="width:40px">#printPeriodCount($p)</th>
1861:                     #end
1862:                     #if ($stats.final)
1863:                         <th style="width:60px;">Final</th>
1864:                     #else
1865:                         #set ($cPeriod = $document.valueOf("hkgame/status/@period"))
1866:                         <th style="width:110px;">#period($cPeriod) - $!clock</th>
1867:                     #end
1868:                 </tr>
1869: 
1870:             ## team scores
1871:                 #foreach ($team in $document.selectNodes("hkgame/team"))
1872:                     <tr>
1873:                         #set ($teamRecord = $team.valueOf("@record"))
1874:                         <td class="nowrap">$team.attributeValue("name") #if ($teamRecord.length() > 0)($teamRecord)#end</td>
1875:                         #foreach ($p in [1..$totalPeriods])
1876:                             <td class="align-center">$team.valueOf("linescore/lineprd[$p]/@score")</td>
1877:                         #end
1878:                         <td class="align-center">$team.valueOf("linescore/@score")</td>
1879:                     </tr>
1880:                 #end
1881:             </table>
1882:         </div>
1883: 
1884: 
1885:         ## TABS
1886:             #if ($hasPlayByPlay)
1887:             <div class="stats-tabs clearfix">
1888:                 <ul class="clearfix">
1889:                     <li #if (!($stats.view.length() > 0) || $stats.view == "boxscore") class="active" #end><a data-view="boxscore" href="${stats.pageUrl}">Box Score</a></li>
1890:                     <li #if ($stats.view == "plays") class="active" #end><a data-view="plays" href="${stats.pageUrl}${paramSep}view=plays" id="pbp">Play by Play</a></li>
1891:                     <li><a href="$stats.pageUrl${paramSep}tmpl=hkxml-monospace-template&dec=/printer-decorator" target="_blank">Coach's View</a></li>
1892:                 </ul>
1893:             </div>
1894:             #end
1895:         #end
1896: 
1897:         #macro (printTabPlayByPlay)
1898:         ## PLAY BY PLAY
1899: 
1900:             #set ($periods = $document.selectNodes("hkgame/plays/period"))
1901:         <div class="stats-fullbox clearfix">
1902:             <table>
1903:                 #if ($stats.view != "pdf")
1904:                     <tr>
1905:                         <td>
1906:                             <strong>Periods: </strong>
1907:                             #foreach ($period in $periods)
1908:                                 #if ($velocityCount > 1)&#160;|&#160;#end
1909:                                 #set ($prd = $period.valueOf("@number"))
1910:                                 <a href="#prd${prd}">#period($prd)</a>
1911:                             #end
1912:                         </td>
1913:                     </tr>
1914:                 #end
1915:                 #foreach ($period in $periods)
1916:                     #set ($prd = $period.valueOf("@number"))
1917:                     <tr><th id="prd${prd}" class="align-left">
1918:                         -- #period($prd) --
1919:                     </th></tr>
1920:                     #foreach ($play in $period.selectNodes("play"))
1921:                         #if ($velocityCount % 2 == 0)
1922:                             #set ($row = "even")
1923:                         #else
1924:                             #set ($row = "odd")
1925:                         #end
1926:                         #if ($play.valueOf("@goal") == "Y")
1927:                             <tr class="$row bold"><td>$play.valueOf("@text")</td></tr>
1928:                         #else
1929:                             <tr class="$row"><td>$play.valueOf("@text")</td></tr>
1930:                         #end
1931:                     #end
1932:                     #if ($stats.view != "pdf")
1933:                         <tr><td class="align-center"><a href="#pbp">back to top</a></td></tr>
1934:                     #end
1935:                 #end
1936:             </table>
1937:         </div>
1938:         #end
1939: 
1940:         #macro (printTabBoxscore)
1941:         ## DEFAULT VIEW
1942: 
1943:         ## SCORING SUMMARY
1944:         <div class="stats-fullbox clearfix">
1945:             <table>
1946:                 <tr><th colspan="3" class="align-left">Scoring Summary</th></tr>
1947:                 #foreach ($pd in [1..$totalPeriods])
1948:                     #set ($shownStats = "")
1949:                     <tr class="stats-highlight"><td colspan="3" class="align-center">-- <span class="bold">#period($pd)</span> -- </td></tr>
1950: 
1951:                     #foreach ($score in $document.selectNodes("hkgame/scores/score"))
1952:                         #if ($pd == $score.valueOf("@prd"))
1953:                             #set ($shownStats = "y")
1954:                             <tr>
1955:                                 <td>
1956:                                     #if($score.valueOf("@vh").equalsIgnoreCase('h')) $home #end
1957:                               #if($score.valueOf("@vh").equalsIgnoreCase('v')) $visitor #end
1958:                                 </td>
1959:                                 <td>$score.valueOf("@time")</td>
1960:                                 <td>
1961:                                     #if ($score.valueOf("@type") == 'PP')<span class="italic">PP - </span>#end
1962:                                     #if ($score.valueOf("@type") == 'SH')<span class="italic">SH - </span>#end
1963:                                     #if ($score.valueOf("@type") == 'PS')<span class="italic">PS - </span>#end
1964:                                     #if ($score.valueOf("@engoal") == 'Y')<span class="italic">EN - </span>#end
1965:                                     #if ($score.valueOf("@type") == 'EN')<span class="italic">EN - </span>#end
1966:                                     #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1967:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@playerId")}">
1968:                                     #end
1969:                                     $score.valueOf("@name")
1970:                                     #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1971:                                     </a>
1972:                                     #end
1973:                                     (#if($score.valueOf("@assist1").length() > 0)
1974:                                     #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1975:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@assist1Id")}">#end
1976:                                     $score.valueOf("@assist1")#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1977:                                     </a>#end
1978:                                 #else
1979:                                     unassisted#end#if($score.valueOf("@assist2").length() > 0)
1980:                                     &amp;
1981:                                     #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1982:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@assist2Id")}">#end
1983:                                     $score.valueOf("@assist2")#if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1984:                                     </a>#end
1985:                                 #end)
1986: 
1987:                                 </td>
1988:                             </tr>
1989:                         #end ## if
1990:                     #end ## scoring foreach
1991: 
1992:                     #if ($shownStats == "") <tr><td colspan="3" class="align-center">(no scoring)</td></tr> #end
1993: 
1994:                 #end ## period range
1995:             </table>
1996:         </div>
1997: 
1998:         ## SHOOTOUTS
1999:             #if ($shootouts.size() > 0)
2000:             <div class="stats-fullbox clearfix">
2001:                 <table>
2002:                     <tr><th colspan="2" class="align-left">Shootout</th></tr>
2003:                     <tr>
2004:                         <th>${visitor}</td>
2005:                         <th>${home}</td>
2006:                     </tr>
2007:                     <tr>
2008:                         <td valign="top" width="50%">#shootout($shootouts "V")</td>
2009:                         <td valign="top" width="50%">#shootout($shootouts "H")</td>
2010:                     </tr>
2011:                     <tr class="stats-highlight">
2012:                         <td colspan="2" align="center">
2013:                             #if ($shootoutScores.get("V") > $shootoutScores.get("H"))
2014:                                 $visitor wins shootout ${shootoutScores.get("V")} - ${shootoutScores.get("H")}
2015:                             #else
2016:                                 $home wins shootout ${shootoutScores.get("H")} - ${shootoutScores.get("V")}
2017:                             #end
2018:                         </td>
2019:                     </tr>
2020:                 </table>
2021:             </div> ## fullbox div end
2022:             #end
2023: 
2024: 
2025:         ## THREE STARS
2026:             #if ($stats.final && $document.selectNodes("hkgame/stars/star").size() > 0)
2027:             <div class="stats-fullbox clearfix">
2028:                 <table>
2029:                     <tr><th colspan="3" class="align-left">Three Stars</th></tr>
2030:                     <tr><td colspan="3">
2031:                         #foreach ($star in $document.selectNodes("hkgame/stars/star"))
2032:                             #if ($velocityCount > 1)<br />#end
2033:                             #if ($star.valueOf("@playerId").length() > 0 and $linkPlayers)
2034:                             <a href="$!linkPlayersBase?id=${star.valueOf("@playerId")}">
2035:                             #end
2036:                             $star.valueOf("@name")
2037:                             #if ($star.valueOf("@playerId").length() > 0 and $linkPlayers)
2038:                             </a>
2039:                             #end
2040:                             #if($star.valueOf("@vh") == 'H')- $home #end
2041:                             #if($star.valueOf("@vh") == 'V')- $visitor #end
2042:                         #end
2043:                     </td></tr>
2044:                 </table>
2045:             </div>
2046:             #end
2047: 
2048:         ## TEAM SUMMARY
2049: 
2050:             #macro (playerstats $team)
2051:             <table>
2052:                 <tr><td colspan="9" class="align-center"><h4 class="align-center">$team.valueOf("@name")</h4></td></tr>
2053:                 <tr>
2054:                     <th class="align-left">#</th>
2055:                     <th class="align-left">Skaters</th>
2056:                     <th>POS</th>
2057:                     <th>G</th>
2058:                     <th>A</th>
2059:                     <th>+/-</th>
2060:                     <th>S</th>
2061:                     <th class="nowrap">FO</th>
2062:                     <th>PIM</th>
2063:                 </tr>
2064: 
2065:                 #foreach ($stat in $team.selectNodes("player/shots"))
2066:                     #if ($stat.numberValueOf("../@gp") != 0)
2067:                         #if ($velocityCount % 2 == 0)
2068:                             #set ($row = "even")
2069:                         #else
2070:                             #set ($row = "odd")
2071:                         #end
2072: 
2073:                         #set ($facewon = "$stat.valueOf('../misc/@facewon')")
2074:                         #set ($facelost = "$stat.valueOf('../misc/@facelost')")
2075:                         <tr class="$row">
2076:                             <td>$!stat.valueOf("../@uni")</td>
2077:                             <td class="nowrap">
2078:                                 #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
2079:                                     <a href="$!linkPlayersBase?id=${stat.valueOf('../@playerId')}">$stat.valueOf("../@name")</a>
2080:                                 #else
2081:                                     $stat.valueOf("../@name")
2082:                                 #end
2083:                                 #if ($stat.valueOf("../@gs") == 1)*#end
2084:                             </td>
2085:                             <td class="align-center">$stat.valueOf("../@pos")</td>
2086:                             <td class="align-center">$!stat.valueOf("@g")</td>
2087:                             <td class="align-center">$!stat.valueOf("@a")</td>
2088:                             <td class="align-center">$!stat.valueOf("../misc/@plusminus")</td>
2089:                             <td class="align-center">$!stat.valueOf("@sh")</td>
2090:                             <td class="align-center nowrap">$!stat.valueOf("../misc/@facewon")-$tool.math.add($stat.valueOf('../misc/@facewon'), $stat.valueOf('../misc/@facelost'))</td>
2091:                             <td class="align-center">$!stat.valueOf("../penalty/@minutes")</td>
2092:                         </tr>
2093:                     #end
2094:                 #end
2095:                 <tr class="stats-highlight totals">
2096:                     <td>&#160;</td>
2097:                     <td colspan="2">Totals</td>
2098:                     <td class="align-center">$team.valueOf("totals/shots/@g")</td>
2099:                     <td class="align-center">$team.valueOf("totals/shots/@a")</td>
2100:                     <td>&#160;</td>
2101:                     <td class="align-center">$team.valueOf("totals/shots/@sh")</td>
2102:                     <td class="align-center">$team.valueOf("totals/misc/@facewon")-$tool.math.add($team.valueOf("totals/misc/@facewon"),$team.valueOf("totals/misc/@facelost"))</td>
2103:                     <td class="align-center">$team.valueOf("totals/penalty/@minutes")</td>
2104:                 </tr>
2105: 
2106:                 <tr>
2107:                     <th class="align-left">#</th>
2108:                     <th class="align-left">Goalies</th>
2109:                     <th colspan="2">&#160;</th>
2110:                     <th>GA</th>
2111:                     <th>Min</th>
2112:                     <th>SV</th>
2113:                     <th>S</th>
2114:                     <th>PIM</th>
2115:                 </tr>
2116: 
2117:                 #foreach ($stat in $team.selectNodes("player/goalie"))
2118:                     #if ($stat.numberValueOf("@gp") != 0)
2119:                         #if ($velocityCount % 2 == 0)
2120:                             #set ($row = "even")
2121:                         #else
2122:                             #set ($row = "odd")
2123:                         #end
2124:                         <tr class="$row">
2125:                             #if($stat.valueOf("../@uni") == "TM")
2126:                                 <td></td><td class="nowrap">Empty net</td>
2127:                             #else
2128:                                 <td>$!stat.valueOf("../@uni")</td>
2129:                                 <td class="nowrap">
2130:                                     #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
2131:                                         <a href="$!linkPlayersBase?id=${stat.valueOf('../@playerId')}">$stat.valueOf("../@name")</a>
2132:                                     #else
2133:                                         $stat.valueOf("../@name")
2134:                                     #end
2135:                                     #if($stat.valueOf("@win").length() > 0)(W, $stat.valueOf("@win"))#end
2136:                                     #if($stat.valueOf("@loss").length() > 0)(L, $stat.valueOf("@loss"))#end
2137:                                     #if($stat.valueOf("@tie").length() > 0)(T, $stat.valueOf("@tie"))#end
2138:                                 </td>
2139:                             #end
2140:                             <td colspan="2">&#160;</td>
2141:                             #set ($ga = $stat.numberValueOf("@ga"))
2142:                             <td class="align-center">$!formatter.formatNumber($ga, "#")</td>
2143:                             <td class="align-center">$!stat.valueOf("@minutes")</td>
2144:                             <td class="align-center">$!stat.valueOf("@saves")</td>
2145:                             <td class="align-center">#shots($stat.valueOf("@ga") $stat.valueOf("@saves"))</td>
2146:                             <td class="align-center">$!stat.valueOf("@pen")</td>
2147:                         </tr>
2148:                     #end
2149:                 #end
2150: 
2151:                 #if ($team.selectNodes("player/goalie").size() > 1)
2152:                     <tr class="stats-highlight totals">
2153:                         <td>&#160;</td>
2154:                         <td colspan="3">Totals</td>
2155:                         <td class="align-center">$team.valueOf("totals/goalie/@ga")</td>
2156:                         <td class="align-center">$team.valueOf("totals/goalie/@minutes")</td>
2157:                         <td class="align-center">$team.valueOf("totals/goalie/@saves")</td>
2158:                         <td class="align-center">#shots($team.valueOf("totals/goalie/@ga") $team.valueOf("totals/goalie/@saves"))</td>
2159:                         <td class="align-center">$team.valueOf("totals/goalie/@pen")</td>
2160:                     </tr>
2161:                 #end
2162:             </table>
2163: 
2164:             #end ##macro
2165: 
2166:         <div class="clearfix">
2167: 
2168:         ## VISITOR STATISTICS
2169:             <div class="stats-fullbox clearfix">#playerstats($visitorTeam)</div>
2170:         ## HOME STATISTICS
2171:             <div class="stats-fullbox clearfix">#playerstats($homeTeam)</div>
2172: 
2173:         </div> ## clearfix
2174: 
2175:         ## PENALTY SUMMARY
2176:         <div class="stats-fullbox clearfix">
2177:             <table>
2178:                 <tr><th colspan="5" class="align-left">Penalty Summary</th></tr>
2179:                 #foreach ($pd in [1..$totalPeriods])
2180:                     #set ($shownStats = "")
2181:                     <tr class="stats-highlight"><td colspan="5" class="align-center">-- <span class="bold">#period($pd)</span> -- </td></tr>
2182: 
2183:                     #foreach ($penalty in $document.selectNodes("hkgame/penalties/pen"))
2184:                         #if ($pd == $penalty.valueOf("@prd"))
2185:                             #set ($shownStats = "y")
2186:                             <tr>
2187:                                 <td>
2188:                                     #if($penalty.valueOf("@vh") == 'H') $home #end
2189:                             #if($penalty.valueOf("@vh") == 'V') $visitor #end
2190:                                 </td>
2191:                                 <td>$penalty.valueOf("@time")</td>
2192:                                 <td>
2193:                                     $penalty.valueOf("@name"): $!penalty.valueOf("@desc")
2194:                                 </td>
2195:                                 <td>$penalty.valueOf("@type")</td>
2196:                                 <td>$penalty.valueOf("@minutes") minutes</td>
2197:                             </tr>
2198:                         #end ## if
2199:                     #end ## penalty foreach
2200: 
2201:                     #if ($shownStats == "")
2202:                         <tr><td colspan="5" class="align-center">(no penalties)</td></tr>
2203:                     #end
2204: 
2205:                 #end ## period range
2206: 
2207:             ## penalty minutes
2208:                 <tr><th colspan="5">Penalty Totals</th></tr>
2209:                 <tr>
2210:                     <td colspan="5">
2211:                         <table>
2212:                             <tr>
2213:                                 #foreach ($team in $document.selectNodes("hkgame/team"))
2214:                                     <td class="totals align-center">$team.attributeValue("name"): $team.valueOf("totals/penalty/@minutes") minutes on $team.valueOf("totals/penalty/@count") infraction(s)</td>
2215:                                 #end
2216:                             </tr>
2217:                         </table>
2218:                     </td>
2219:                 </tr>
2220:             </table>
2221:         </div>
2222: 
2223:         <div class="clearfix">
2224: 
2225:         ## SHOTS BY PERIOD
2226:             <div class="stats-halfbox-left">
2227:                 <table>
2228:                     <tr>
2229:                         <th class="align-left">Shots</th>
2230:                         #foreach ($p in [1..$totalPeriods])
2231:                             <th style="width:40px">#printPeriodCount($p)</th>
2232:                         #end
2233:                         <th style="width:60px;">Total</th>
2234:                     </tr>
2235: 
2236:                 ## team shots
2237:                     #foreach ($team in $document.selectNodes("hkgame/team"))
2238:                         <tr>
2239:                             <td class="nowrap">$team.attributeValue("name")</td>
2240:                             #foreach ($p in [1..$totalPeriods])
2241:                                 <td class="align-center">$team.valueOf("linescore/lineprd[$p]/@shots")</td>
2242:                             #end
2243:                             <td class="align-center">$team.valueOf("linescore/@shots")</td>
2244:                         </tr>
2245:                     #end
2246:                 </table>
2247:             </div>
2248: 
2249:         ## POWER PLAYS
2250:             <div class="stats-halfbox-right">
2251:                 <table>
2252:                     <tr><th colspan="3" class="align-left">Power Plays</th></tr>
2253:                     <tr>
2254:                         <td colspan="3">
2255:                             <table>
2256:                                 <tr>
2257:                                     #foreach ($team in $document.selectNodes("hkgame/team"))
2258:                                         <td class="totals align-center">
2259:                                             $team.valueOf("@name"): $team.valueOf("totals/powerplay/@ppg") for $team.valueOf("totals/powerplay/@ppopp")
2260:                                             (#pp($team.valueOf("totals/powerplay/@ppopp") $team.valueOf("totals/powerplay/@ppg")))
2261:                                         </td>
2262:                                     #end
2263:                                 </tr>
2264:                             </table>
2265:                         </td>
2266:                     </tr>
2267:                 </table>
2268:             </div>
2269:             <div class="clear"></div>
2270:         </div> ## clearfix
2271: 
2272:         ## OTHER INFORMATION
2273:         <div class="stats-fullbox summary clearfix">
2274:             <table>
2275:                 <tr><th class="align-left">Other Information</th></tr>
2276:                 <tr>
2277:                     <td>
2278:                         <span class="bold">Game Length: </span>$document.valueOf("hkgame/venue/@duration")<br />
2279:                         <span class="bold">Attendance: </span>$document.valueOf("hkgame/venue/@attend")<br />
2280:                         #foreach ($official in $document.selectNodes("hkgame/venue/officials/official"))
2281:                             <span class="bold">$official.valueOf("@title"): </span>$official.valueOf("@name")<br />
2282:                         #end
2283:                     </td>
2284:                 </tr>
2285:             </table>
2286:         </div>
2287: 
2288:         <div class="legend">* Starter</div>
2289:         #end
2290: 
2291:         #if ($stats.view == "plays" && $hasPlayByPlay)
2292:             #printTabPlayByPlay()
2293:         #elseif ($stats.view == "pdf")
2294:             #parse("hkxml-monospace-template")
2295:             #if ($hasPlayByPlay)
2296:             <p class="pagebreak">&nbsp;</p>
2297:                 #printPdfHeader("Play by Play")
2298:                 #printTabPlayByPlay()
2299:             #end
2300:         #else
2301:             #printTabBoxscore()
2302:         #end ## ends view check
2303: 
2304:     </div>
2305: 
2306:         #if ($stats.view == "pdf")
2307:             #set ($showWiki = true)
2308:             #set ($showWiki = $showWikiVar)
2309: 
2310:             #if ($showWiki == true)
2311:                 $!wiki.su
2312:             #end
2313: 
2314:         ## CORRECT WRONG VIEW WITH REPLACESTATE
2315:             #changeViewScript()
2316:         #end
2317:     </body>
2318:     </html>
2319: 
2320:     #end ## mobile check
2321: #end
2322: 
2323: ## GLOBAL ADS SERVER
2324: #if ($website.ads.isAdvertisingEnabled('BOX_SCORES'))
2325: 	$website.includeAgain("global-adserver-slots?adSlot=box_scores")
2326: #end