window.onload = initPage; // Make sure that no other javscripts assign a fuction to window.onload // There can be only one window.onload at a time function initPage() { initPopupLinks(); // place here any other code you wish to run when the page loads. } function initPopupLinks() { if (!document.getElementsByTagName) return true; var pageLinks = document.getElementsByTagName("a"); var pageButtons = document.getElementsByTagName("button"); for (var i = 0; i < pageLinks.length; i++) { if (((pageLinks[i].className != null) && (pageLinks[i].className != "")) || ((pageLinks[i].parentNode.className != null) && (pageLinks[i].parentNode.className != ""))) { var linkClass = " " + pageLinks[i].className + " "; if ((linkClass == " ") && (pageLinks[i].parentNode.className != "")) { linkClass = " " + pageLinks[i].parentNode.className + " "; } for (var theKey in popupLinkConfig) { if (linkClass.indexOf(" " + theKey + " ") > -1) { if ((pageLinks[i].target == "") || (pageLinks[i].target == null)) { pageLinks[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey; } pageLinks[i].settings = popupLinkConfig[theKey][1]; pageLinks[i].onclick = popUp; } } } } for (var i = 0; i < pageButtons.length; i++) { if (((pageButtons[i].className != null) && (pageButtons[i].className != "")) || ((pageButtons[i].parentNode.className != null) && (pageButtons[i].parentNode.className != ""))) { var linkClass = " " + pageButtons[i].className + " "; if ((linkClass == " ") && (pageButtons[i].parentNode.className != "")) { linkClass = " " + pageButtons[i].parentNode.className + " "; } for (var theKey in popupLinkConfig) { if (linkClass.indexOf(" " + theKey + " ") > -1) { if ((pageButtons[i].target == "") || (pageButtons[i].target == null)) { pageButtons[i].target = (popupLinkConfig[theKey][0] != "") ? popupLinkConfig[theKey][0] : theKey; } pageButtons[i].settings = popupLinkConfig[theKey][1]; pageButtons[i].onclick = popUp; } } } } return true; } function popUp() { eval(this.target + " = window.open(this.href, this.target, this.settings);"); eval(this.target + ".focus();"); return false; } var popupLinkConfig = new Array; // Delete/copy/modify the following lines to configure your popup windows. popupLinkConfig["vnews"] = new Array ("vnews", "width=450,height=500,resizable=yes,scrollbars=yes"); popupLinkConfig["vplayer"] = new Array ("vplayer", "width=300,height=310,resizable=yes,scrollbars=no"); popupLinkConfig["vdownload"] = new Array ("vdownload", "width=300,height=255,resizable=yes,scrollbars=no"); popupLinkConfig["help"] = new Array ("help", "width=350,height=450,scrollbars=yes,menubar=yes"); popupLinkConfig["vim"] = new Array ("vim", "width=450,height=340,scrollbars=no,menubar=no,resizable=no"); popupLinkConfig["printable"] = new Array ("printable", "width=800,height=600,scrollbars=yes,menubar=no,resizable=yes");