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