equal
deleted
inserted
replaced
|
1 /** |
|
2 * Infobox on load. Resize the window to show only content. |
|
3 */ |
|
4 function initInfo(event) { |
|
5 var box = document.getElementById("infobox"); |
|
6 var tables = document.getElementsByTagName("table"); |
|
7 if (box !== null && tables.length > 0) { |
|
8 var innerWidth = window.innerWidth || box.offsetHeight; |
|
9 var innerHeight = window.innerHeight || box.offsetHeight; |
|
10 var w; |
|
11 var h; |
|
12 if (window.outerWidth && window.outerHeight) { |
|
13 w = tables[0].clientWidth + 57; |
|
14 h = box.clientHeight; |
|
15 w += window.outerWidth - innerWidth; |
|
16 h += window.outerHeight - innerHeight; |
|
17 } else { |
|
18 w = tables[0].clientWidth + 57; |
|
19 h = innerHeight; |
|
20 w += 40; |
|
21 h += 40; |
|
22 } |
|
23 window.resizeTo(w, h); |
|
24 } |
|
25 } |