﻿function TooltipKeyword(keyword, definition) {
    this.keyword = keyword;
    this.definition = definition;
}
function ConstructTooltip(tooltipKeyObj) {

    var tooltip_body = '<table cellpadding="0" cellspacing="0" border="0" id="tooltiptable" >' +
										'<tr>' +
											'<td width="8"><img src="/images/tooltip/tool_01.gif" width="8" height="6"></td>' +
											'<td width="268" class="backtop"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td width="6"><img src="/images/tooltip/tool_03.gif" width="6" height="6"></td>' +
										'</tr>' +
										'<tr>' +
											'<td class="backleft"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td class="content"><span class="title">' + tooltipKeyObj.keyword + '</span> ' + tooltipKeyObj.definition + '</td>' +
											'<td class="backright"><img src="/images/b.gif" width="1" height="1"></td>' +
										'</tr>' +
										'<tr>' +
											'<td><img src="/images/tooltip/tool_07.gif" width="8" height="6"></td>' +
											'<td class="backbottom"><img src="/images/b.gif" width="1" height="1"></td>' +
											'<td><img src="/images/tooltip/tool_09.gif" width="6" height="6"></td>' +
										'</tr>' +
									'</table>';


    //alert(tooltip_body);
    return tooltip_body;
}

function TooltipConfig(e, width, xOffset, yOffset, above) {
    // In Koo Kim 20060104
    // the following configures the wz_tooltip
   //alert("here");
    if (xOffset && xOffset != null) {
        e.T_OFFSETX = xOffset;
    } else {
        e.T_OFFSETX = 10;
        e.T_OFFSETY = 10;
    }
    if (yOffset && yOffset != null) {
        e.T_OFFSETY = yOffset;
    } else {
        e.T_OFFSETY = 10;
    }
    if (above && above != null) {
        e.T_ABOVE = above;
    }
    e.T_DELAY = 300;
    e.T_BGCOLOR = '';
    e.T_BGIMG = '';
    e.T_BORDERWIDTH = 0;
    e.T_BORDERCOLOR = '';
    e.T_FONTCOLOR = '#333333';
    e.T_FONTFACE = 'Verdana, Geneva, Arial, Helvetica, sans-serif';
    e.T_FONTSIZE = '12px';
    e.T_OPACITY = 100;
    e.T_PADDING = 0;
    e.T_STATIC = true;
    e.T_TEXTALIGN = 'right';
    e.T_TITLE = '';
    e.T_TITLECOLOR = '#ff6666';
    e.T_WIDTH = width;
    //alert(e);
    return e;
}