var theTimeout = new Array();

function loadwork(location2){
    window.location=location2;
}

function showDetails(whichOne,append){
    if (!document.getElementById('theDetails'+append)){
        hideDetails();
        newX = findLeft(whichOne);
        newY = findTop(whichOne);
        var theDet = document.createElement('div');
        theDet.setAttribute('id','theDetails'+append);
        theDet.className = 'theDetails';
        theDet.onmouseover = function onmouseover(event){showDetails(whichOne,append);};
        theDet.onmouseout = function onmouseout(event){hideDetails(append);};
        whichOne.onmouseout = function onmouseout(event){hideDetails(append);};
        theDet.style.top = newY+'px';
        var browser=navigator.appName
        var version=parseFloat(navigator.appVersion);
        if (browser=="Microsoft Internet Explorer" && version <=4){
            theDet.innerHTML = whichOne.parentNode.childNodes[2].innerHTML;
            newX=newX+3;
            theDet.style.left = newX + 'px';
        }
        else {
            theDet.innerHTML = whichOne.parentNode.childNodes[3].innerHTML;
            newX=newX+1;
            theDet.style.left = newX + 'px';
        }
        document.body.appendChild(theDet);
    }
    else {
        clearTimeout(theTimeout[append]);
    }
}

function findTop(obj) {
    var curtop = 0;
    if (obj.offsetParent) {
        curtop = obj.offsetTop
        while (obj = obj.offsetParent) {
            curtop += obj.offsetTop
        }
    }
    return curtop-1;
}

function findLeft(obj) {
    var curleft = 0;
    if (obj.offsetParent) {
        curleft = obj.offsetLeft
        while (obj = obj.offsetParent) {
            curleft += obj.offsetLeft
        }
    }
    return curleft-1;
}

function hideDetails(append){
//    if (showing != append){
        if(document.getElementById('theDetails'+append)){
 //           alert('remove '+append);
//            rDet = document.getElementById('theDetails'+append);
//            rDet.parentNode.removeChild(rDet);
            theTimeout[append] = setTimeout(function(){try{rDet = document.getElementById('theDetails'+append);rDet.parentNode.removeChild(rDet);}catch(e){}},'100')
        }
		

//    }
}
