Trinity (Conn.)

Castleton

Wed, Jan. 2, 2019
5:00 PM EST

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


Overview

Trinity (Conn.)

Team Record Conf. Record Last Game
0-0 0-0 ${visitorStats.lastGame.APResult} at ${visitorStats.lastGame.opponent.name}

Castleton

Team Record Conf. Record Last Game
2-2-1 2-0-1 W, 3-1 vs. Southern Maine

Team Comparison

Trinity (Conn.)

Power Play Percentage

0.0

Penalty Kill Percentage

100.0

Castleton

Power Play Percentage

21.7

Penalty Kill Percentage

57.1


0.00GPG2.60
${formatter.formatNumber($visitorStats.teamStats['gaa'], $formats.get('gaa'))}GAA3.54
Trinity (Conn.) (based on 0 games)
Castleton (based on 5 games)

Key Contributors


Points

Karinna Cave-Hawkins
08
Jocelyn Forrest
Lauren Mac master
05
Jade Remillard

Goals

Karinna Cave-Hawkins
07
Jocelyn Forrest
Julia Lee
02
Ali Stevens

Plus Minus

Karinna Cave-Hawkins
04
Jocelyn Forrest
Julia Lee
04
Jade Remillard

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