Bunu dener misiniz?
<script type="text/javascript">
var img = new Image();
v=Math.random();
img.src = 'http://www.google.com.tr/images/srpr/logo3w.png?'+v;
img.onerror = function (x){
	//alert("internet yok");
	document.write('internet yok!')
}
img.onload = function (x){
	//alert("internet var");
	document.write('internet var, yonlendiriliyorsunuz...')
	setTimeout('top.location.href="http://www.kod5.com"',1000);
}
</script>
Burada resim her seferinde tekrardan çağırılıyor