var op = 0;
function mousepos(e) {
        
        x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
        y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
        if (tooltip != null) {
            var scrWidth = (document.offsetWidth || document.body.offsetWidth);
            //tooltip.style.left = (x - 200) + "px";
            tooltip.style.left = (scrWidth - 38 - 300) + "px";
            tooltip.style.top  = (y - 275) + "px";
            
    }
}
function appear(id) {
    var wObj = document.getElementById(id);
    if(op < 1) {
        op += 0.1;
        wObj.style.opacity = op;
        wObj.style.filter='alpha(opacity='+op*100+')';
        t = setTimeout('appear("' + id + '")', 30);
    }
    else
    {
        op = 0;
    }
}
function showtooltip(id) {
 //alert (id);
    tooltip = document.getElementById(id);
    document.onmouseover = mousepos;  
    tooltip.style.display = "block";
    appear(id);
}
function hide(id)
{
        
    tooltip = document.getElementById(id);
    tooltip.style.display = "none";
}





/////////////////////////////////////////////////////////////////////////

var speed=15; // scroll speed (bigger = faster)
var dR=false; // reverse direction

// Vertical Scroller Javascript
// copyright 24th September 2005, by Stephen Chapman
// permission to use this Javascript on your web page is granted
// provided that all of the code below (as well as these
// comments) is used without any alteration
var step = 2;
function objWidth(obj)
{
    if(obj.offsetWidth) return obj.offsetWidth;
    if (obj.clip) return obj.clip.width;
    return 0;
}
function objHeight(obj)
{
    if(obj.offsetHeight) return obj.offsetHeight;
    if (obj.clip) return obj.clip.height;
    return 0;
}
function scrF(i,sH,eH)
{
    var x=parseInt(i.top)+(dR? step: -step);
    if(dR && x>sH)x=-eH;
    else if(x<2-eH)x=sH;
    i.top = x+'px';
}
function startScroll(sN,txt)
{
    var scr=document.getElementById(sN);
    var sW = objWidth(scr)-6;
    var sH = objHeight(scr);
    scr.innerHTML = '<div id="'+sN+'in" style="position:absolute;z-index:5000;background: white; left:3px; width:'+sW+';">'+txt+'<\/div>';
    var sTxt=document.getElementById(sN+'in');
    var eH=objHeight(sTxt);
    //sTxt.style.top=(dR? -eH : sH)+'px';
    sTxt.style.top=(20)+'px';
    sTxt.style.clip='rect(0,'+sW+'px,'+eH+'px,0)';
    setInterval(function() {
        scrF(sTxt.style,sH,eH);
        },1200/speed);
    }
