Mount Allison

St. Thomas

Sat, Nov. 23, 2019
7:00 PM AST

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


Overview

Mount Allison

Team Record Conf. Record Last Game
0-4 0-4 L, 3-0 vs. St. Thomas

St. Thomas

Team Record Conf. Record Last Game
1-3 1-3 W, 3-0 at Mount Allison

Team Comparison

Mount Allison

Power Play Percentage

4.3

Penalty Kill Percentage

100.0

St. Thomas

Power Play Percentage

0.0

Penalty Kill Percentage

95.2


0.25GPG0.75
4.00GAA1.25
Mount Allison (based on 4 games)
St. Thomas (based on 4 games)

Key Contributors


Points

Jenna Miller
11
Florence Awde
Mariah Linehan
11
Emily Oleksuk

Goals

Jenna Miller
11
Florence Awde
Abbie Wisener
01
Lauren Legault

Plus Minus

Bianca Zak
01
Erin Arsenault
Josée Cormier
01
Kaylee Vader

Save Percentage

There was a problem with a Velocity script
Pagestatcrew-hkxml-template
ErrorError invoking method 'get(java.lang.Integer)' in java.util.ArrayList at statcrew-hkxml-template[line 443, column 68]
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: 
1824:     <div class="stats-wrapper clearfix">
1825:         #if ($stats.view != "pdf")
1826:         ## GAME INFORMATION
1827:         <div class="align-center">
1828:             <span class="bold">$visitor #if($isNeutralGame)vs.#else at #end $home</span><br />at $document.valueOf("hkgame/venue/@location")<br />
1829:             #if ($gamePlayedOn.length() > 0)$gamePlayedOn #end #if ($gameStartedAt.length() > 0)at $gameStartedAt #end
1830:             #if ($schedNote.length() > 0)<br />$schedNote #end
1831:         </div>
1832:         <br />
1833: 
1834:         ## TEAM SCORES
1835:         <table class="all-center">
1836:             <tr>
1837:                 #foreach ($team in $document.selectNodes("hkgame/team"))
1838:                     <td style="width:50%">
1839:                         #if ($team.attributeValue("link").length() > 0 and $linkTeams)
1840:                         <a href="$!linkTeamsBase?id=${team.attributeValue("teamId")}">
1841:                         #end
1842:                         <span class="stats-header">$team.attributeValue("name")</span>
1843:                         #if ($team.attributeValue("link").length() > 0 and $linkTeams)
1844:                         </a>
1845:                         #end
1846:                         <br /><span class="stats-header">$team.valueOf("linescore/@score")</span>
1847:                     </td>
1848:                 #end
1849:             </tr>
1850:         </table>
1851: 
1852:         <div class="stats-fullbox clearfix">
1853:         ## PERIOD SUMMARY
1854:             <table>
1855:                 <tr>
1856:                     <th class="align-left">Scoring</th>
1857:                     #foreach ($p in [1..$totalPeriods])
1858:                         <th style="width:40px">#printPeriodCount($p)</th>
1859:                     #end
1860:                     #if ($stats.final)
1861:                         <th style="width:60px;">Final</th>
1862:                     #else
1863:                         #set ($cPeriod = $document.valueOf("hkgame/status/@period"))
1864:                         <th style="width:110px;">#period($cPeriod) - $!clock</th>
1865:                     #end
1866:                 </tr>
1867: 
1868:             ## team scores
1869:                 #foreach ($team in $document.selectNodes("hkgame/team"))
1870:                     <tr>
1871:                         #set ($teamRecord = $team.valueOf("@record"))
1872:                         <td class="nowrap">$team.attributeValue("name") #if ($teamRecord.length() > 0)($teamRecord)#end</td>
1873:                         #foreach ($p in [1..$totalPeriods])
1874:                             <td class="align-center">$team.valueOf("linescore/lineprd[$p]/@score")</td>
1875:                         #end
1876:                         <td class="align-center">$team.valueOf("linescore/@score")</td>
1877:                     </tr>
1878:                 #end
1879:             </table>
1880:         </div>
1881: 
1882: 
1883:         ## TABS
1884:             #if ($hasPlayByPlay)
1885:             <div class="stats-tabs clearfix">
1886:                 <ul class="clearfix">
1887:                     <li #if (!($stats.view.length() > 0) || $stats.view == "boxscore") class="active" #end><a data-view="boxscore" href="${stats.pageUrl}">Box Score</a></li>
1888:                     <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>
1889:                     <li><a href="$stats.pageUrl${paramSep}tmpl=hkxml-monospace-template&dec=/printer-decorator" target="_blank">Coach's View</a></li>
1890:                 </ul>
1891:             </div>
1892:             #end
1893:         #end
1894: 
1895:         #macro (printTabPlayByPlay)
1896:         ## PLAY BY PLAY
1897: 
1898:             #set ($periods = $document.selectNodes("hkgame/plays/period"))
1899:         <div class="stats-fullbox clearfix">
1900:             <table>
1901:                 #if ($stats.view != "pdf")
1902:                     <tr>
1903:                         <td>
1904:                             <strong>Periods: </strong>
1905:                             #foreach ($period in $periods)
1906:                                 #if ($velocityCount > 1)&#160;|&#160;#end
1907:                                 #set ($prd = $period.valueOf("@number"))
1908:                                 <a href="#prd${prd}">#period($prd)</a>
1909:                             #end
1910:                         </td>
1911:                     </tr>
1912:                 #end
1913:                 #foreach ($period in $periods)
1914:                     #set ($prd = $period.valueOf("@number"))
1915:                     <tr><th id="prd${prd}" class="align-left">
1916:                         -- #period($prd) --
1917:                     </th></tr>
1918:                     #foreach ($play in $period.selectNodes("play"))
1919:                         #if ($velocityCount % 2 == 0)
1920:                             #set ($row = "even")
1921:                         #else
1922:                             #set ($row = "odd")
1923:                         #end
1924:                         #if ($play.valueOf("@goal") == "Y")
1925:                             <tr class="$row bold"><td>$play.valueOf("@text")</td></tr>
1926:                         #else
1927:                             <tr class="$row"><td>$play.valueOf("@text")</td></tr>
1928:                         #end
1929:                     #end
1930:                     #if ($stats.view != "pdf")
1931:                         <tr><td class="align-center"><a href="#pbp">back to top</a></td></tr>
1932:                     #end
1933:                 #end
1934:             </table>
1935:         </div>
1936:         #end
1937: 
1938:         #macro (printTabBoxscore)
1939:         ## DEFAULT VIEW
1940: 
1941:         ## SCORING SUMMARY
1942:         <div class="stats-fullbox clearfix">
1943:             <table>
1944:                 <tr><th colspan="3" class="align-left">Scoring Summary</th></tr>
1945:                 #foreach ($pd in [1..$totalPeriods])
1946:                     #set ($shownStats = "")
1947:                     <tr class="stats-highlight"><td colspan="3" class="align-center">-- <span class="bold">#period($pd)</span> -- </td></tr>
1948: 
1949:                     #foreach ($score in $document.selectNodes("hkgame/scores/score"))
1950:                         #if ($pd == $score.valueOf("@prd"))
1951:                             #set ($shownStats = "y")
1952:                             <tr>
1953:                                 <td>
1954:                                     #if($score.valueOf("@vh").equalsIgnoreCase('h')) $home #end
1955:                               #if($score.valueOf("@vh").equalsIgnoreCase('v')) $visitor #end
1956:                                 </td>
1957:                                 <td>$score.valueOf("@time")</td>
1958:                                 <td>
1959:                                     #if ($score.valueOf("@type") == 'PP')<span class="italic">PP - </span>#end
1960:                                     #if ($score.valueOf("@type") == 'SH')<span class="italic">SH - </span>#end
1961:                                     #if ($score.valueOf("@type") == 'PS')<span class="italic">PS - </span>#end
1962:                                     #if ($score.valueOf("@engoal") == 'Y')<span class="italic">EN - </span>#end
1963:                                     #if ($score.valueOf("@type") == 'EN')<span class="italic">EN - </span>#end
1964:                                     #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1965:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@playerId")}">
1966:                                     #end
1967:                                     $score.valueOf("@name")
1968:                                     #if ($score.valueOf("@playerId").length() > 0 and $linkPlayers)
1969:                                     </a>
1970:                                     #end
1971:                                     (#if($score.valueOf("@assist1").length() > 0)
1972:                                     #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1973:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@assist1Id")}">#end
1974:                                     $score.valueOf("@assist1")#if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)
1975:                                     </a>#end
1976:                                 #else
1977:                                     unassisted#end#if($score.valueOf("@assist2").length() > 0)
1978:                                     &amp;
1979:                                     #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1980:                                     <a href="$!linkPlayersBase?id=${score.valueOf("@assist2Id")}">#end
1981:                                     $score.valueOf("@assist2")#if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)
1982:                                     </a>#end
1983:                                 #end)
1984: 
1985:                                 </td>
1986:                             </tr>
1987:                         #end ## if
1988:                     #end ## scoring foreach
1989: 
1990:                     #if ($shownStats == "") <tr><td colspan="3" class="align-center">(no scoring)</td></tr> #end
1991: 
1992:                 #end ## period range
1993:             </table>
1994:         </div>
1995: 
1996:         ## SHOOTOUTS
1997:             #if ($shootouts.size() > 0)
1998:             <div class="stats-fullbox clearfix">
1999:                 <table>
2000:                     <tr><th colspan="2" class="align-left">Shootout</th></tr>
2001:                     <tr>
2002:                         <th>${visitor}</td>
2003:                         <th>${home}</td>
2004:                     </tr>
2005:                     <tr>
2006:                         <td valign="top" width="50%">#shootout($shootouts "V")</td>
2007:                         <td valign="top" width="50%">#shootout($shootouts "H")</td>
2008:                     </tr>
2009:                     <tr class="stats-highlight">
2010:                         <td colspan="2" align="center">
2011:                             #if ($shootoutScores.get("V") > $shootoutScores.get("H"))
2012:                                 $visitor wins shootout ${shootoutScores.get("V")} - ${shootoutScores.get("H")}
2013:                             #else
2014:                                 $home wins shootout ${shootoutScores.get("H")} - ${shootoutScores.get("V")}
2015:                             #end
2016:                         </td>
2017:                     </tr>
2018:                 </table>
2019:             </div> ## fullbox div end
2020:             #end
2021: 
2022: 
2023:         ## THREE STARS
2024:             #if ($stats.final && $document.selectNodes("hkgame/stars/star").size() > 0)
2025:             <div class="stats-fullbox clearfix">
2026:                 <table>
2027:                     <tr><th colspan="3" class="align-left">Three Stars</th></tr>
2028:                     <tr><td colspan="3">
2029:                         #foreach ($star in $document.selectNodes("hkgame/stars/star"))
2030:                             #if ($velocityCount > 1)<br />#end
2031:                             #if ($star.valueOf("@playerId").length() > 0 and $linkPlayers)
2032:                             <a href="$!linkPlayersBase?id=${star.valueOf("@playerId")}">
2033:                             #end
2034:                             $star.valueOf("@name")
2035:                             #if ($star.valueOf("@playerId").length() > 0 and $linkPlayers)
2036:                             </a>
2037:                             #end
2038:                             #if($star.valueOf("@vh") == 'H')- $home #end
2039:                             #if($star.valueOf("@vh") == 'V')- $visitor #end
2040:                         #end
2041:                     </td></tr>
2042:                 </table>
2043:             </div>
2044:             #end
2045: 
2046:         ## TEAM SUMMARY
2047: 
2048:             #macro (playerstats $team)
2049:             <table>
2050:                 <tr><td colspan="9" class="align-center"><h4 class="align-center">$team.valueOf("@name")</h4></td></tr>
2051:                 <tr>
2052:                     <th class="align-left">#</th>
2053:                     <th class="align-left">Skaters</th>
2054:                     <th>POS</th>
2055:                     <th>G</th>
2056:                     <th>A</th>
2057:                     <th>+/-</th>
2058:                     <th>S</th>
2059:                     <th class="nowrap">FO</th>
2060:                     <th>PIM</th>
2061:                 </tr>
2062: 
2063:                 #foreach ($stat in $team.selectNodes("player/shots"))
2064:                     #if ($stat.numberValueOf("../@gp") != 0)
2065:                         #if ($velocityCount % 2 == 0)
2066:                             #set ($row = "even")
2067:                         #else
2068:                             #set ($row = "odd")
2069:                         #end
2070: 
2071:                         #set ($facewon = "$stat.valueOf('../misc/@facewon')")
2072:                         #set ($facelost = "$stat.valueOf('../misc/@facelost')")
2073:                         <tr class="$row">
2074:                             <td>$!stat.valueOf("../@uni")</td>
2075:                             <td class="nowrap">
2076:                                 #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
2077:                                     <a href="$!linkPlayersBase?id=${stat.valueOf('../@playerId')}">$stat.valueOf("../@name")</a>
2078:                                 #else
2079:                                     $stat.valueOf("../@name")
2080:                                 #end
2081:                                 #if ($stat.valueOf("../@gs") == 1)*#end
2082:                             </td>
2083:                             <td class="align-center">$stat.valueOf("../@pos")</td>
2084:                             <td class="align-center">$!stat.valueOf("@g")</td>
2085:                             <td class="align-center">$!stat.valueOf("@a")</td>
2086:                             <td class="align-center">$!stat.valueOf("../misc/@plusminus")</td>
2087:                             <td class="align-center">$!stat.valueOf("@sh")</td>
2088:                             <td class="align-center nowrap">$!stat.valueOf("../misc/@facewon")-$tool.math.add($stat.valueOf('../misc/@facewon'), $stat.valueOf('../misc/@facelost'))</td>
2089:                             <td class="align-center">$!stat.valueOf("../penalty/@minutes")</td>
2090:                         </tr>
2091:                     #end
2092:                 #end
2093:                 <tr class="stats-highlight totals">
2094:                     <td>&#160;</td>
2095:                     <td colspan="2">Totals</td>
2096:                     <td class="align-center">$team.valueOf("totals/shots/@g")</td>
2097:                     <td class="align-center">$team.valueOf("totals/shots/@a")</td>
2098:                     <td>&#160;</td>
2099:                     <td class="align-center">$team.valueOf("totals/shots/@sh")</td>
2100:                     <td class="align-center">$team.valueOf("totals/misc/@facewon")-$tool.math.add($team.valueOf("totals/misc/@facewon"),$team.valueOf("totals/misc/@facelost"))</td>
2101:                     <td class="align-center">$team.valueOf("totals/penalty/@minutes")</td>
2102:                 </tr>
2103: 
2104:                 <tr>
2105:                     <th class="align-left">#</th>
2106:                     <th class="align-left">Goalies</th>
2107:                     <th colspan="2">&#160;</th>
2108:                     <th>GA</th>
2109:                     <th>Min</th>
2110:                     <th>SV</th>
2111:                     <th>S</th>
2112:                     <th>PIM</th>
2113:                 </tr>
2114: 
2115:                 #foreach ($stat in $team.selectNodes("player/goalie"))
2116:                     #if ($stat.numberValueOf("@gp") != 0)
2117:                         #if ($velocityCount % 2 == 0)
2118:                             #set ($row = "even")
2119:                         #else
2120:                             #set ($row = "odd")
2121:                         #end
2122:                         <tr class="$row">
2123:                             #if($stat.valueOf("../@uni") == "TM")
2124:                                 <td></td><td class="nowrap">Empty net</td>
2125:                             #else
2126:                                 <td>$!stat.valueOf("../@uni")</td>
2127:                                 <td class="nowrap">
2128:                                     #if ($stat.valueOf("../@playerId").length() > 0 and $linkPlayers and $stat.valueOf("../../@link").length() > 0)
2129:                                         <a href="$!linkPlayersBase?id=${stat.valueOf('../@playerId')}">$stat.valueOf("../@name")</a>
2130:                                     #else
2131:                                         $stat.valueOf("../@name")
2132:                                     #end
2133:                                     #if($stat.valueOf("@win").length() > 0)(W, $stat.valueOf("@win"))#end
2134:                                     #if($stat.valueOf("@loss").length() > 0)(L, $stat.valueOf("@loss"))#end
2135:                                     #if($stat.valueOf("@tie").length() > 0)(T, $stat.valueOf("@tie"))#end
2136:                                 </td>
2137:                             #end
2138:                             <td colspan="2">&#160;</td>
2139:                             #set ($ga = $stat.numberValueOf("@ga"))
2140:                             <td class="align-center">$!formatter.formatNumber($ga, "#")</td>
2141:                             <td class="align-center">$!stat.valueOf("@minutes")</td>
2142:                             <td class="align-center">$!stat.valueOf("@saves")</td>
2143:                             <td class="align-center">#shots($stat.valueOf("@ga") $stat.valueOf("@saves"))</td>
2144:                             <td class="align-center">$!stat.valueOf("@pen")</td>
2145:                         </tr>
2146:                     #end
2147:                 #end
2148: 
2149:                 #if ($team.selectNodes("player/goalie").size() > 1)
2150:                     <tr class="stats-highlight totals">
2151:                         <td>&#160;</td>
2152:                         <td colspan="3">Totals</td>
2153:                         <td class="align-center">$team.valueOf("totals/goalie/@ga")</td>
2154:                         <td class="align-center">$team.valueOf("totals/goalie/@minutes")</td>
2155:                         <td class="align-center">$team.valueOf("totals/goalie/@saves")</td>
2156:                         <td class="align-center">#shots($team.valueOf("totals/goalie/@ga") $team.valueOf("totals/goalie/@saves"))</td>
2157:                         <td class="align-center">$team.valueOf("totals/goalie/@pen")</td>
2158:                     </tr>
2159:                 #end
2160:             </table>
2161: 
2162:             #end ##macro
2163: 
2164:         <div class="clearfix">
2165: 
2166:         ## VISITOR STATISTICS
2167:             <div class="stats-fullbox clearfix">#playerstats($visitorTeam)</div>
2168:         ## HOME STATISTICS
2169:             <div class="stats-fullbox clearfix">#playerstats($homeTeam)</div>
2170: 
2171:         </div> ## clearfix
2172: 
2173:         ## PENALTY SUMMARY
2174:         <div class="stats-fullbox clearfix">
2175:             <table>
2176:                 <tr><th colspan="5" class="align-left">Penalty Summary</th></tr>
2177:                 #foreach ($pd in [1..$totalPeriods])
2178:                     #set ($shownStats = "")
2179:                     <tr class="stats-highlight"><td colspan="5" class="align-center">-- <span class="bold">#period($pd)</span> -- </td></tr>
2180: 
2181:                     #foreach ($penalty in $document.selectNodes("hkgame/penalties/pen"))
2182:                         #if ($pd == $penalty.valueOf("@prd"))
2183:                             #set ($shownStats = "y")
2184:                             <tr>
2185:                                 <td>
2186:                                     #if($penalty.valueOf("@vh") == 'H') $home #end
2187:                             #if($penalty.valueOf("@vh") == 'V') $visitor #end
2188:                                 </td>
2189:                                 <td>$penalty.valueOf("@time")</td>
2190:                                 <td>
2191:                                     $penalty.valueOf("@name"): $!penalty.valueOf("@desc")
2192:                                 </td>
2193:                                 <td>$penalty.valueOf("@type")</td>
2194:                                 <td>$penalty.valueOf("@minutes") minutes</td>
2195:                             </tr>
2196:                         #end ## if
2197:                     #end ## penalty foreach
2198: 
2199:                     #if ($shownStats == "")
2200:                         <tr><td colspan="5" class="align-center">(no penalties)</td></tr>
2201:                     #end
2202: 
2203:                 #end ## period range
2204: 
2205:             ## penalty minutes
2206:                 <tr><th colspan="5">Penalty Totals</th></tr>
2207:                 <tr>
2208:                     <td colspan="5">
2209:                         <table>
2210:                             <tr>
2211:                                 #foreach ($team in $document.selectNodes("hkgame/team"))
2212:                                     <td class="totals align-center">$team.attributeValue("name"): $team.valueOf("totals/penalty/@minutes") minutes on $team.valueOf("totals/penalty/@count") infraction(s)</td>
2213:                                 #end
2214:                             </tr>
2215:                         </table>
2216:                     </td>
2217:                 </tr>
2218:             </table>
2219:         </div>
2220: 
2221:         <div class="clearfix">
2222: 
2223:         ## SHOTS BY PERIOD
2224:             <div class="stats-halfbox-left">
2225:                 <table>
2226:                     <tr>
2227:                         <th class="align-left">Shots</th>
2228:                         #foreach ($p in [1..$totalPeriods])
2229:                             <th style="width:40px">#printPeriodCount($p)</th>
2230:                         #end
2231:                         <th style="width:60px;">Total</th>
2232:                     </tr>
2233: 
2234:                 ## team shots
2235:                     #foreach ($team in $document.selectNodes("hkgame/team"))
2236:                         <tr>
2237:                             <td class="nowrap">$team.attributeValue("name")</td>
2238:                             #foreach ($p in [1..$totalPeriods])
2239:                                 <td class="align-center">$team.valueOf("linescore/lineprd[$p]/@shots")</td>
2240:                             #end
2241:                             <td class="align-center">$team.valueOf("linescore/@shots")</td>
2242:                         </tr>
2243:                     #end
2244:                 </table>
2245:             </div>
2246: 
2247:         ## POWER PLAYS
2248:             <div class="stats-halfbox-right">
2249:                 <table>
2250:                     <tr><th colspan="3" class="align-left">Power Plays</th></tr>
2251:                     <tr>
2252:                         <td colspan="3">
2253:                             <table>
2254:                                 <tr>
2255:                                     #foreach ($team in $document.selectNodes("hkgame/team"))
2256:                                         <td class="totals align-center">
2257:                                             $team.valueOf("@name"): $team.valueOf("totals/powerplay/@ppg") for $team.valueOf("totals/powerplay/@ppopp")
2258:                                             (#pp($team.valueOf("totals/powerplay/@ppopp") $team.valueOf("totals/powerplay/@ppg")))
2259:                                         </td>
2260:                                     #end
2261:                                 </tr>
2262:                             </table>
2263:                         </td>
2264:                     </tr>
2265:                 </table>
2266:             </div>
2267:             <div class="clear"></div>
2268:         </div> ## clearfix
2269: 
2270:         ## OTHER INFORMATION
2271:         <div class="stats-fullbox summary clearfix">
2272:             <table>
2273:                 <tr><th class="align-left">Other Information</th></tr>
2274:                 <tr>
2275:                     <td>
2276:                         <span class="bold">Game Length: </span>$document.valueOf("hkgame/venue/@duration")<br />
2277:                         <span class="bold">Attendance: </span>$document.valueOf("hkgame/venue/@attend")<br />
2278:                         #foreach ($official in $document.selectNodes("hkgame/venue/officials/official"))
2279:                             <span class="bold">$official.valueOf("@title"): </span>$official.valueOf("@name")<br />
2280:                         #end
2281:                     </td>
2282:                 </tr>
2283:             </table>
2284:         </div>
2285: 
2286:         <div class="legend">* Starter</div>
2287:         #end
2288: 
2289:         #if ($stats.view == "plays" && $hasPlayByPlay)
2290:             #printTabPlayByPlay()
2291:         #elseif ($stats.view == "pdf")
2292:             #parse("hkxml-monospace-template")
2293:             #if ($hasPlayByPlay)
2294:             <p class="pagebreak">&nbsp;</p>
2295:                 #printPdfHeader("Play by Play")
2296:                 #printTabPlayByPlay()
2297:             #end
2298:         #else
2299:             #printTabBoxscore()
2300:         #end ## ends view check
2301: 
2302:     </div>
2303: 
2304:         #if ($stats.view == "pdf")
2305:             #set ($showWiki = true)
2306:             #set ($showWiki = $showWikiVar)
2307: 
2308:             #if ($showWiki == true)
2309:                 $!wiki.su
2310:             #end
2311: 
2312:         ## CORRECT WRONG VIEW WITH REPLACESTATE
2313:             #changeViewScript()
2314:         #end
2315:     </body>
2316:     </html>
2317: 
2318:     #end ## mobile check
2319: #end