// These scripts form part of the Probe Bandwidth monitoring application // copyright (c) Alive Technology 1998 // scans all the images in current document to find the one matching this name function find(lookingfor) { r = document.images.length - 1; // images count from 0 to length-1 lookinglen = lookingfor.length; while (r >= 0) { if (document.images[r] != null) { endlen = document.images[r].src.length; startlen = endlen-lookinglen if (document.images[r].src.substring(startlen, endlen) == lookingfor) return r; } r = r - 1; } return -1; } // this changes an icon to its litup form function on(button) { lookingfor = "images/but-"+button+"-0.png"; r = find(lookingfor); if (r != -1) document.images[r].src = "images/but-"+button+"-1.png"; } // this dims a button once the mouse moves off function off(button) { lookingfor = "images/but-"+button+"-1.png"; r = find(lookingfor); if (r != -1) document.images[r].src = "images/but-"+button+"-0.png"; } // Move to first element in form fields function SetFocus() { if ((document.forms[0].elements[0] != null)&&(document.forms[0].elements[0].type == 'text')) { document.forms[0].elements[0].focus(); } } // Pageload runs scripts for current page function pageloaded() { if ((document.forms.length > 0)&&(document.forms[0] != null)) SetFocus(); return; }