document.writeln('The CAPTCHA image') function captchas_image_error (image) { if (!image.timeout) return true; image.src = image.src.replace (/^http:\/\/image\.captchas\.net/, 'http://image.backup.captchas.net'); return captchas_image_loaded (image); } function captchas_image_loaded (image) { if (!image.timeout) return true; window.clearTimeout (image.timeout); image.timeout = false; return true; } var image = document.getElementById ('captchas.net'); image.onerror = function() {return captchas_image_error (image);}; image.onload = function() {return captchas_image_loaded (image);}; image.timeout = window.setTimeout( "captchas_image_error (document.getElementById ('captchas.net'))", 10000); image.src = image.src;