window.onload = function() { // Verify the browser DOM supports the required methods if (!document.getElementsByTagName) return false; // Grab all links in the document and find class="popup" var lnks = document.getElementsByTagName("a"); for (var i=0; i