var NotLoadedCount=0;
function ReLoadImages3() {
	// this function works perfectly.  2008-05-15
	// this function get called every time the onload event is raised.   
	//
	// <head>
	// <title>My Home Page</title>
	// <script src=http://swanson.jp/JS/reloadImage.js></script>
	// </head>
	// <body onload='setTimeout("ReLoadImages3()",5000)'>
	//
	// if more than 10 images is not loaded
	// window.location.reload(); get run & the onload event is raised again 
	for 	(var i=0; i<document.images.length; i++) {
		if	(document.images[i].height < 50) {
			NotLoadedCount += 1
		}
	}

	if	( NotLoadedCount > 10 ) {
		// my page have over 2200 images; 10 or so not loaded is OK with me
		window.location.reload();
	}
	else	{
		// in IE "Thu May 15 23:22:22 2008" get displayed on window.status when all images are loaded
		// in FF "Done"                     get displayed on window.status when all images are loaded
		window.status 	= Date();
	}
}
function listAllImagesInfo() {
	for 	(var i=0; i<document.images.length; i++) {
		document.writeln(i + " " + document.images[i].src + " " + document.images[i].complete + " " + document.images[i].width + "x" + document.images[i].height + " <br />");
	}
	document.writeln("NotLoadedCount=" + NotLoadedCount);
}

