1 | {html_head} |
---|
2 | <link rel="stylesheet" type="text/css" href="themes/kardon/slideshow.css"> |
---|
3 | {/html_head} |
---|
4 | |
---|
5 | <div id="imageHeaderBar"> |
---|
6 | <div class="browsePath"> |
---|
7 | {if isset($U_SLIDESHOW_STOP) } |
---|
8 | [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ] |
---|
9 | {/if} |
---|
10 | </div> |
---|
11 | <div class="imageNumber">{$PHOTO}</div> |
---|
12 | {if $SHOW_PICTURE_NAME_ON_TITLE } |
---|
13 | <h2 class="showtitle">{$current.TITLE}</h2> |
---|
14 | {/if} |
---|
15 | </div> |
---|
16 | |
---|
17 | <div id="imageToolBar"> |
---|
18 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
19 | </div> |
---|
20 | |
---|
21 | <div id="theImage"> |
---|
22 | {literal} |
---|
23 | <script type="text/javascript">//<!-- |
---|
24 | |
---|
25 | var maxWidth = maxHeight = margin = 0; |
---|
26 | var finalW = w = {/literal}{$WIDTH_IMG}{literal}, finalH = h = {/literal}{$HEIGHT_IMG}{literal}; |
---|
27 | if( typeof( window.innerWidth ) == 'number' ) { |
---|
28 | //Non-IE |
---|
29 | maxWidth = window.innerWidth; |
---|
30 | maxHeight = window.innerHeight; |
---|
31 | } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { |
---|
32 | //IE 6+ in 'standards compliant mode' |
---|
33 | maxWidth = document.documentElement.clientWidth; |
---|
34 | maxHeight = document.documentElement.clientHeight; |
---|
35 | } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { |
---|
36 | //IE 4 compatible |
---|
37 | maxWidth = document.body.clientWidth; |
---|
38 | maxHeight = document.body.clientHeight; |
---|
39 | } |
---|
40 | maxHeight = maxHeight-32; |
---|
41 | if ((h > maxHeight) || (w > maxWidth)) { |
---|
42 | if ((h > maxHeight) && (w > maxWidth)) { |
---|
43 | if (maxHeight-h < maxWidth-w) { |
---|
44 | finalH = maxHeight; |
---|
45 | finalW = w * finalH / h; |
---|
46 | } |
---|
47 | else { |
---|
48 | finalW = maxWidth; |
---|
49 | finalH = h * finalW / w; |
---|
50 | } |
---|
51 | } |
---|
52 | else if ((h > maxHeight) && (w < maxWidth)) { |
---|
53 | finalH = maxHeight; |
---|
54 | finalW = w * finalH / h; |
---|
55 | } |
---|
56 | else if ((h < maxHeight) && (w > maxWidth)) { |
---|
57 | finalW = maxWidth; |
---|
58 | finalH = h * finalW / w; |
---|
59 | } |
---|
60 | } |
---|
61 | if ((maxHeight-finalH) > 0) { |
---|
62 | margin = Math.round((maxHeight-finalH) / 2) |
---|
63 | } |
---|
64 | document.writeln("<img style=\"margin-top:"+margin+"px; width:"+finalW+"px;height:"+finalH+"px\" src=\"{/literal}{$SRC_IMG}{literal}\" alt=\"\">"); |
---|
65 | |
---|
66 | //--> |
---|
67 | </script> |
---|
68 | {/literal} |
---|
69 | <noscript> |
---|
70 | <div> |
---|
71 | <img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"> |
---|
72 | </div> |
---|
73 | </noscript> |
---|
74 | </div> <!-- theImage --> |
---|