I love creating modular code. Francis didn't want to abandon people without SVG capability and so created PDF versions of the maps being used for the demo. He requested that I come up with a way to have the IE users go to the SVG version while everyone else goes to the PDF version. The knee-jerk reaction would have been to set up a function that could be applied to each link's onClick event handler to take care of this. But that seemed like a waste of time and effort. I came up with the brilliant (if I do say so myself) method of linking to the PDF version and using the DOM to add an event listener to the document object that captures the click and redirects if necessary. On page load a script runs (obtained from a third-party source, see internal reference) that sets a variable indicating whether or not the browser has SVG support. Then, once the page has loaded completely, an event listener is added to the document that captures onClick events. This event checks to see if the event has an href property (meaning it's a link), prevents the default action (visiting the link), and then directs the browser to open the desired document based on whether or not it supports SVG (and the user is trying to access a map).
Unfortunately IE's event model (bottom-to-top) is different from the W3 recommended (top-to-bottom-to-top). So I had to add modify the script for IE using a loop that adds the event capture to each and every link tag. A little annoying, but the code is pretty much just as concise. Also had to take into account the IE event object which is slightly different from the standard.
Still, the functionality appears to work perfectly across platform. The only glitch now is that Mac OS 10.3 has no browser plug-in from Adobe, meaning the PDF version are pretty to look at but little else (as they are loaded externally).