window.onload = stopRotate;

var homeImages = new Array("images/indexHouse/001.jpg", "images/indexHouse/002.jpg", "images/indexHouse/003.jpg", "images/indexHouse/004.jpg");
var thisImage = 0;
var k = 30;
var f = true;
var g;

function rotate () {
	document.getElementById("homeImage").src = homeImages[thisImage];
	thisImage++;
	if (thisImage == homeImages.length) {
		thisImage = 0;
	}
}
function stopRotate() {
	if (f) {
		rotate();
		k = 30;
	} else {
		clearTimeout(g);
		k = 1;
	}
	g = setTimeout("stopRotate()",  k * 100);
}
