I'm currently developing in a closed environment a web based "slide show" of sorts, using Javascript to move to the next slide (specifically document.location, after showing the current page for a delay of X seconds). An issue I'm having is that if the next page is for some reason offline, the entire slideshow breaks (page unavailable error, etc).
Is there a way using javascript to check to see if the next page is online before redirecting to it?
edit: I'm controlling the environment (intranet) - so no chance of Javascript being switched off.