diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/infobox.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/infobox.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ +/** + * Infobox on load. Resize the window to show only content. + */ +function initInfo(event) { + var box = document.getElementById("infobox"); + var tables = document.getElementsByTagName("table"); + if (box !== null && tables.length > 0) { + var innerWidth = window.innerWidth || box.offsetHeight; + var innerHeight = window.innerHeight || box.offsetHeight; + var w; + var h; + if (window.outerWidth && window.outerHeight) { + w = tables[0].clientWidth + 57; + h = box.clientHeight; + w += window.outerWidth - innerWidth; + h += window.outerHeight - innerHeight; + } else { + w = tables[0].clientWidth + 57; + h = innerHeight; + w += 40; + h += 40; + } + window.resizeTo(w, h); + } +}