//////////////////////////////////////////////////////
// Configurable JS style functions                  //
//////////////////////////////////////////////////////

    function TooltipConfig(e, width, xOffset, yOffset, above) {
        // In Koo Kim 200605
        // the following configures the wz_tooltip
        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;
        return e;
    }
    function TooltipKeyword(keyword, definition) {
        // In Koo Kim 200605
        // this js object delivers the keyword and definition
        // to the tooltip constructor
        this.keyword=keyword;
        this.definition=definition;
    }
   //modified one
    function ConstructTooltip(tooltipKeyObj) {
        // In Koo Kim 200605
        // this method accepts a TooltipKeyword object
        // and constructs the tooltip table as a string
        var tooltip_body_str_1 = "<table cellpadding=\'0\' cellspacing=\'0\' border=\'0\'><tr valign=\'top\'><td width=\'6\' height=\'6\'><img src=\'images\/tooltip_corner_ul.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><td class=\'tooltip_t\'><img src=\'images\/shim.gif\' width=\'1\' height=\'6\' border=\'0\'><\/td><td width=\'6\'><img src=\'images\/tooltip_corner_ur.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><\/tr><tr><td class=\'tooltip_l\' width=\'6\'><img src=\'images\/shim.gif\' width=\'6\' height=\'1\' border=\'0\'><\/td><td bgcolor=\'#FEFEE5\'><table cellpadding=\'3\' cellspacing=\'0\' border=\'0\' width=\'100%\'><tr><td><table cellpadding=\'1\' cellspacing=\'0\' border=\'0\' width=\'100%\'><tr><td class=\'tooltip_body\' colspan=\'2\'><span class=\'tooltip_highlight\'>";
        var tooltip_body_str_2 = "<\/span>&nbsp;&nbsp;";
        var tooltip_body_str_3 = "<\/td><\/tr><tr valign=\'bottom\'><img src=\'images\/i_icon.gif\' width=\'18\' height=\'14\' border=\'0\' align=\'left\'><td class=\'tooltip_foot\' nowrap><\/td><td width=\'18\'><\/td><\/tr><\/table><\/td><\/tr><\/table><\/td><td class=\'tooltip_r\'><img src=\'images\/shim.gif\' width=\'6\' height=\'1\' border=\'0\'><\/td><\/tr><tr valign=\'top\'><td width=\'6\' height=\'6\'><img src=\'images\/tooltip_corner_ll.gif\' width=\'6\' height=\'6\'><\/td><td class=\'tooltip_b\'><img src=\'images\/shim.gif\' width=\'1\' height=\'6\' border=\'0\'><\/td><td><img src=\'images\/tooltip_corner_lr.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><\/tr><\/table>";
        var tooltip_buffer;
        if (tooltipKeyObj.keyword != '') {
            tooltip_buffer = tooltip_body_str_1 + tooltipKeyObj.keyword + tooltip_body_str_2 + tooltipKeyObj.definition + tooltip_body_str_3;
        } else {
            tooltip_buffer = tooltip_body_str_1 + tooltipKeyObj.definition + tooltip_body_str_3;
        }
        return tooltip_buffer;
    }
    
    // Original one
//    function ConstructTooltip(tooltipKeyObj) {
//        // In Koo Kim 200605
//        // this method accepts a TooltipKeyword object
//        // and constructs the tooltip table as a string
//        var tooltip_body_str_1 = "<table cellpadding=\'0\' cellspacing=\'0\' border=\'0\'><tr valign=\'top\'><td width=\'6\' height=\'6\'><img src=\'\/images\/tooltip_corner_ul.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><td class=\'tooltip_t\'><img src=\'\/images\/x.gif\' width=\'1\' height=\'6\' border=\'0\'><\/td><td width=\'6\'><img src=\'\/images\/tooltip_corner_ur.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><\/tr><tr><td class=\'tooltip_l\' width=\'6\'><img src=\'\/images\/x.gif\' width=\'6\' height=\'1\' border=\'0\'><\/td><td bgcolor=\'#FFFFFF\'><table cellpadding=\'3\' cellspacing=\'0\' border=\'0\' width=\'100%\'><tr><td><table cellpadding=\'1\' cellspacing=\'0\' border=\'0\' width=\'100%\'><tr><td class=\'tooltip_body\' colspan=\'2\'><div style=\'float:left; padding-right:4px; width:20px;\'><img src=\'\/images\/i_icon.gif\' width=\'18\' height=\'14\' border=\'0\'></div>";
//        var tooltip_body_str_2 = "<\/td><\/tr><\/table><\/td><\/tr><\/table><\/td><td class=\'tooltip_r\'><img src=\'\/images\/x.gif\' width=\'6\' height=\'1\' border=\'0\'><\/td><\/tr><tr valign=\'top\'><td width=\'6\' height=\'6\'><img src=\'\/images\/tooltip_corner_ll.gif\' width=\'6\' height=\'6\'><\/td><td class=\'tooltip_b\'><img src=\'\/images\/x.gif\' width=\'1\' height=\'6\' border=\'0\'><\/td><td><img src=\'\/images\/tooltip_corner_lr.gif\' width=\'6\' height=\'6\' border=\'0\'><\/td><\/tr><\/table>";
//        var tooltip_buffer;
//        tooltip_buffer = tooltip_body_str_1 + tooltipKeyObj.definition + tooltip_body_str_2;
//        return tooltip_buffer;
//    }
    
    var subModalTargetPage = '/vendors/loading.html';
    function updateSubmodal(targetPage, submodalTitle) {
        if (targetPage && targetPage != '') {
            subModalTargetPage = targetPage;
        }
        scroll(0,0);
        if (document.getElementById('popupTitle')) {
            document.getElementById('popupTitle').innerHTML = submodalTitle;
        }
        showPopWin(subModalTargetPage, 700, 500);
        if (ua.ie) {
            changeOpac(70,'popupMask');
        } else {
            pageChronometer.addTask(new ChronometerTask("fade(0, 70, \'popupMaskFadeIn\')", null, 50, 5), 'popupMaskFadeIn');
        }
    }
    function confirmSubmodal(targetPage, submodalTitle) {
        if (targetPage && targetPage != '') {
            subModalTargetPage = targetPage;
        }
        if (document.getElementById('popupTitle')) {
            document.getElementById('popupTitle').innerHTML = submodalTitle;
        }
        showPopWin(subModalTargetPage, 400, 130);
        changeOpac(30,'popupMask');
    }
    
    

