var list = document.getElementById("list");
var divs = list.getElementsByTagName("div");
var t;
for (var i = 0; i < divs.length; i++) {
divs[i].onmouseover = function (e) {
var tip = document.createElement("div");
var img = this.getElementsByTagName("img");
tip.innerHTML = img[0].getAttribute("alt");
var event = event||window.event;
tip.setAttribute("class", "tip");
tip.setAttribute("className", "tip");
tip.style.left = "-100px";
this.appendChild(tip);
t = setInterval(function(){showtip(tip);},10);
}
divs[i].onmouseout = function (e) {
clearInterval(t);
var tip = this.lastChild;
if (tip.tagName == "DIV"){
this.removeChild(tip);
}
}
}
function showtip(obj)
{
var left = gs(obj, "left");
var value = left+10;
if (value <= 0){
obj.style.left = value+"px";
}
else
clearInterval(t);
}
function gs(obj, a){
if (obj.currentStyle){
var curVal=obj.currentStyle[a]
}
else{
var curVal=document.defaultView.getComputedStyle(obj, null)[a]
}
return parseInt(curVal);
}