﻿
function SetToolTip(id, atitle, adate, acount, adetail, imgBase) {
    //<div class=pbTipTitle>' + atitle + '</div>'
    var aText = "";
    
    var iNo = 0;
    for (var i = 6; i < arguments.length; i++) {
        aText += GetImgTag(imgBase, arguments[i]);
        if (i == 9) {
            //iNo = 0;
            aText += "<div style='clear: both;'/>";
        }
        iNo++;
    }
    aText += '<div style="clear: both;"/>';
    
    aText += '<div class=pbTitle2>' + adate + '</div><center>' + acount + '</center><br />' + adetail;    
    var obj = $('#' + id);
    //obj.attr("title", aText);
    //tooltip.show(aText);
    Tip(aText, FADEIN, 400, FADEOUT, 300, BGIMG, '../images/toolTipBg.jpg', BGCOLOR,'#9D9D9D',
        BORDERCOLOR, '#303030', BORDERWIDTH, 2, PADDING, 5, TITLE, atitle, TITLEFONTSIZE, '12px');
}


function GetImgTag(basePath, imgSrc) {
    if (imgSrc == "") return "";
    return '<div class="tipItem"><div class="tipPhoto"><span></span><img src="' + basePath + '/small50/' + imgSrc + '" /></div></div>';
}


/*
function SetToolTip(id,atitle,adate,acount,adetail) {
    $('#' + id).qtip({
    content: '<div class=pbTitle2>' + adate + '</div><div class=pbTipTitle>' + atitle + '</div>' + acount + '<br />' + adetail,
        style: {
        name: 'light', // Inherit from preset style
            show: { delay: 1500 },
            tip: { // Now an object instead of a string
                corner: 'leftTop', 
                size: {
                    x: 8, 
                    y: 10 
                }
            }
        }

    });
}*/