window.setInterval("Huan()",4000);
var n = document.getElementsByTagName("img").length-1;
var d =0;
function Huan()
{
var attr = document.getElementsByTagName("img");
d++;
if(d>n)
{
d = 0;
}
for(var i=0;i<=n;i++)
{
attr[i].style.display = "none";
}
attr[d].style.display = "block";
}