<html>
<head>
<title>NTD</title>
<style>
BODY { font-family: Verdana; font-size: 11px; color: #000; }
</style>
</head>
<body>
<div id="div1"></div>
<div id="nb2"></div>
<div id="nb3"></div>
<div id="nb4"></div>
<script>
try {
v1 = 0;
w = 0;
nb2n = 0;
nb3n = 0;
nb4n = 0;
timeouttv = 10;
function movenewdivelement(dname, slope3, slope4) {
for(i = 0;i < v1;i++) {
if(Math.floor(document.getElementById('f' + i).style.left.replace('px', '')) > 600 || Math.floor(document.getElementById('f' + i).style.top.replace('px', '')) > 600) {
for(m = 0;m < v1;m++) {
document.body.removeChild(document.getElementById('f' + m));
v1 = 1;
setTimeout('makenewdivelement(Math.floor(Math.random() * 500), Math.floor(Math.random() * 500), Math.floor(Math.random() * 6), Math.floor(Math.random() * 6));', 100);
}
}
else {
if(Math.floor(document.getElementById(dname).style.left.replace('px', '')) > Math.floor(document.getElementById('f' + i).style.left.replace('px', ''))) {
if(Math.floor(document.getElementById(dname).style.top.replace('px', '')) > Math.floor(document.getElementById('f' + i).style.top.replace('px', ''))) {
if(Math.floor(document.getElementById(dname).style.left.replace('px', '')) < Math.floor(document.getElementById('f' + i).style.left.replace('px', '') + 10)) {
if(Math.floor(document.getElementById(dname).style.top.replace('px', '')) < Math.floor(document.getElementById('f' + i).style.top.replace('px', '') + 10)) {
}}}}
else {
document.getElementById(dname).style.left = (Math.floor(document.getElementById(dname).style.left.replace('px', '')) + slope3) + 'px';
document.getElementById(dname).style.top = (Math.floor(document.getElementById(dname).style.top.replace('px', '')) + slope4) + 'px';
document.getElementById(dname).style.background = '#ff0000';
}
}
}
setTimeout('movenewdivelement("' + dname + '", ' + slope3 + ', ' + slope4 + ');', timeouttv);
}
function makenewdivelement(mnl, mnt, slope1, slope2) {
document.getElementById('nb2').innerHTML = nb2n++;
document.getElementById('nb3').innerHTML = nb3n++;
a = document.createElement('div');
a.style = 'position:absolute;left:' + mnl + 'px;top:' + mnt + 'px;width:10px;height:10px;background:#' + Math.floor(Math.random() * 500) + ';';
a.id = 'f' + (v1++);
a.innerHTML = ' ';
document.body.appendChild(a);
setTimeout('movenewdivelement("' + a.id + '", ' + slope1 + ', ' + slope2 + ');', timeouttv);
}
for(j = 0;j < 16;j++) {
setTimeout('makenewdivelement(Math.floor(Math.random() * 500), Math.floor(Math.random() * 500), Math.floor(Math.random() * 6), Math.floor(Math.random() * 6));', timeouttv);
}
document.getElementById('nb4').innerHTML = nb4n++;
setTimeout('window.location = window.location;', timeouttv);
}
catch(errmsg) {
alert(errmsg);
}
</script>
</body>
</html>