1 <script type="text/javascript">
2 var brokenContentSize = $("content").offsetWidth == 0;
4 function resizeContent() {
5 var content = $("content");
6 var leftMargin = parseInt(getStyle(content, "left"));
7 var rightMargin = parseInt(getStyle(content, "right"));
8 var bottomMargin = parseInt(getStyle(content, "bottom"));
10 <% if t('html.dir') == "ltr" -%>
11 content.style.width = document.documentElement.clientWidth - content.offsetLeft - rightMargin;
13 content.style.width = document.documentElement.clientWidth - content.offsetRight - leftMargin;
15 content.style.height = document.documentElement.clientHeight - content.offsetTop - bottomMargin;
18 function resizeMap() {
19 var sidebar_width = $("sidebar").offsetWidth;
21 if (sidebar_width > 0) {
22 sidebar_width = sidebar_width + 5
25 <% if t('html.dir') == "ltr" -%>
26 $("map").style.left = (sidebar_width) + "px";
28 $("map").style.right = (sidebar_width) + "px";
30 $("map").style.width = ($("content").offsetWidth - sidebar_width) + "px";
31 $("map").style.height = ($("content").offsetHeight - 2) + "px";
34 function handleResize() {
35 if (brokenContentSize) {