как то так
<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<div id='ky'></div>
<div id='status'></div>
<script>
var ky = document.getElementById('ky');
var i = 'ky', j = 0,timerID;
(function closing() {
i += ' ky';
ky.innerHTML = i;
timerID = setTimeout(closing,1000)
if (j == 5) {
timerID = clearTimeout(timerID);
}
j++;
}());
var st = document.getElementById('status');
(function clos(){
st.innerHTML = !!timerID;
if (!timerID) return;
setTimeout(clos,500);
}());
</script>
</body>
</html>