diff --git a/html/include/focus.js b/html/include/focus.js
index 00ae1bb9a5dd47ba072c9514516a647cf67720f1..2c49901216b4d0ba905e39dcff35d85c991246ab 100644 (file)
--- a/html/include/focus.js
+++ b/html/include/focus.js
var browserType;
+var timeout;
if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
netscape= (ver.charAt(iln+1).toUpperCase() != "C");
+/* Toggle checkbox that matches regex */
+function chk_set_all(regex,value)
+{
+ for (var i = 0; i < document.mainform.elements.length; i++) {
+ var _id=document.mainform.elements[i].id;
+ if(_id.match(regex)) {
+ document.getElementById(_id).checked= value;
+ }
+ }
+}
+
+
+function scrollDown() {
+ document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight;
+ timeout= setTimeout("scrollDown()", 500);
+}
+
+/* Scroll down the body frame */
+function scrollDown2()
+{
+ document.body.scrollTop = document.body.scrollHeight - document.body.clientHeight;
+}
+
+
function keyPress(DnEvents) {
// determines whether Netscape or Internet Explorer
k = (netscape) ? DnEvents.keyCode : window.event.keyCode;
form.javascript.value = 'true';
}
-window.onload = adjust_width;
-window.onresize = adjust_width;
-window.onload = adjust_height;
-window.onresize = adjust_height;
+window.onload = adjust;
+window.onresize = adjust;
+
+function adjust (e) {
+ adjust_height(e);
+ adjust_width(e);
+}
// Automatic resize (height) of divlists
function adjust_height(e) {
// Resize the Header cells (only the relative-width ones)
document.getElementById('t_scrollhead').style.width=div_width+"px";
}
+ } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")) {
+ // Resize the div
+ var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width'));
+ var width= parseInt(window.innerWidth);
+
+ // Resize the body cells
+ var diff= width-div_width-470;
+
+ // window has been upscaled
+ if(div_width+diff>=600) {
+ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px";
+ document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px";
+
+ // Resize the Header cells (only the relative-width ones)
+ document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px";
+
+ // window has been downscaled, we must reset the div to 600px
+ } else if (width < 930) {
+ // Reset layout (set width to 600px)
+ div_width=600;
+ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px";
+ document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px";
+
+ // Resize the Header cells (only the relative-width ones)
+ document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px";
+ }
} else {
// IE