function init() {
    var tip = $(this).attr('title');
    if (!tip) {
        tip = $(this).find('span').text();
        $(this).find('span').remove();
    }
    $(this).attr('title', '');
    $(this).append("<span style='position:absolute; display:none; z-index:90;'><nobr>"+tip+"</nobr></span>");
    $(this).mouseover(onLinkOver);
    $(this).mouseout(onLinkOut);
    $(this).mousemove(onLinkMove);
}
     
function onLinkOver() {
    $(this).find('span').css('display', 'block');
}
      
function onLinkOut() {
//alert('as');
    $(this).find('span').css('display', 'none');
}
      
function onLinkMove(cursor) {
    if(!cursor) var cursor = window.event;
    if (cursor.pageX || cursor.pageY) {
        mx = cursor.pageX;
        my = cursor.pageY;
    } else if (cursor.clientX || cursor.clientY) {
        mx = cursor.clientX + document.body.scrollLeft;
        my = cursor.clientY + document.body.scrollTop;
    }
    
    x = findPosX(this);
    y = findPosY(this);
    
    //alert('x: '+x+'  y: '+y+'  mx: '+mx+'  my: '+my);
    
    var tip_x = mx-x+1;
    var tip_y = my-y-13;
    $(this).find('span').css('left', tip_x);
    $(this).find('span').css('top', tip_y);
}
      
function findPosX(obj) {
    var currleft = 0;
    if (obj.offsetParent)
        while (obj.offsetParent) {
            currleft += obj.offsetLeft
            obj = obj.offsetParent;
        }
    else if (obj.x) currleft += obj.x;
    return currleft;
}

function findPosY(obj) {
    var currtop = 0;
    if (obj.offsetParent)
        while (obj.offsetParent) {
            currtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    else if (obj.y) currtop += obj.y;
    return currtop;
}