index 69f0a1ee83c908e13585e368ef4c38d2da007859..6ade45d20b410747c990c79de7a3296855b52a40 100644 (file)
// document.defaultView allows access to the rendered size of elements and should be supported by modern browsers
if(document.defaultView) {
- var menu_height=parseInt(document.defaultView.getComputedStyle(document.getElementById("menucell"),"").getPropertyValue('height'));
-
- // Minimum height for divlist should be the bottom edge of the menu
- min_height= menu_height-197;
- suggested= min_height;
- if((inner_height-230)-suggested>0) {
- suggested= inner_height-230;
- }
+ var menu_height= 0;
+ if (document.getElementById("d_height")){
+ suggested= parseInt(document.getElementById("d_height").value);
+ } else {
+ menu_height=parseInt(document.defaultView.getComputedStyle(document.getElementById("menucell"),"").getPropertyValue('height'));
+ // Minimum height for divlist should be the bottom edge of the menu
+ min_height= menu_height-197;
+ suggested= min_height;
+ if((inner_height-230)-suggested>0) {
+ suggested= inner_height-230;
+ }
+ }
+
// IE uses other height specifications
} else if (browserType == "ie") {
suggested= document.all.menucell.offsetHeight;
var width= parseInt(window.innerWidth);
// Resize the body cells, 470 represents the info box and the navigation part
- var diff= width - div_width - 470;
-
+ var save= 470;
+ if(document.getElementById('d_save')) {
+ save= document.getElementById('d_save').value;
+ }
+ var space= 600;
+ if(document.getElementById('d_space')) {
+ space= document.getElementById('d_space').value;
+ }
+ var diff= width - div_width - save;
+
// window has been upscaled
- if(div_width+diff>=600) {
- document.getElementById('d_scrollbody').style.width=div_width+diff+"px";
- document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
+ if(div_width+diff>=space) {
+ if (width - save > space) {
+ document.getElementById('d_scrollbody').style.width=div_width+diff+"px";
+ document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
- // Resize the Header cells (only the relative-width ones)
- document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
+ // Resize the Header cells (only the relative-width ones)
+ document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
+ } else {
+ document.getElementById('d_scrollbody').style.width=div_width+"px";
+ document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
+
+ // Resize the Header cells (only the relative-width ones)
+ document.getElementById('t_scrollhead').style.width=div_width+"px";
+ }
// window has been downscaled, we must reset the div to 600px
- } else if (width < 930) {
+ } else if (width < 1200) {
// Reset layout (set width to 600px)
- div_width=600;
+ div_width=space;
document.getElementById('d_scrollbody').style.width=div_width+"px";
document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";