
// thisobj 의 Top
function TnT_get_objTop(thisobj) {
    if (thisobj.offsetParent === document.body) {
        return thisobj.offsetTop;
    } else {
        return thisobj.offsetTop + TnT_get_objTop(thisobj.offsetParent);
    }
}

// thisobj 의 Left
function TnT_get_objLeft(thisobj) {
    if (thisobj.offsetParent === document.body) {
        return thisobj.offsetLeft;
    } else {
        return thisobj.offsetLeft + TnT_get_objLeft(thisobj.offsetParent);
    }
}

// 풍선도움말 html 2014.10.17 By YoungJun Cho.
function balloon_html(str) {
    var balloonHtml = "";
    balloonHtml = balloonHtml + "<div style='width: 800px;'>";
    balloonHtml = balloonHtml + "<div>";
    balloonHtml = balloonHtml + "    <span style='float: left; width: 3px; height: 24px; background: url(\"/totsys/common/images/bg_balloon_left.jpg\") no-repeat; margin:0;'></span>";
    balloonHtml = balloonHtml + "    <span style='float: left; width: auto; height: 24px; background: url(\"/totsys/common/images/bg_balloon_center.jpg\") repeat-x; margin:0; line-height: 25px; padding: 0 3px 0 3px; font-size: 10.2pt; letter-spacing:-1; font-family: dotum; color: #666666;'>" + str + "</span>";
    balloonHtml = balloonHtml + "    <span style='float: left; width: 4px; height: 24px; background: url(\"/totsys/common/images/bg_balloon_right.jpg\") 0 0 no-repeat; margin:0;'></span>";
    balloonHtml = balloonHtml + "    <span style='clear: both;'></span>";
    balloonHtml = balloonHtml + "</div>";
    return balloonHtml;
}

// 링크ALT (풍선 도움말)
function balloon_on(str,obj,mv_right,mv_up) {
    var alt_balloon = document.getElementById('TnT_TempLayer2');
    //alt_balloon.innerHTML="<div style='color:#000000; font-size:11pt; letter-spacing:-1; font-family:돋움;background:#F4FFFF;'>" + str + "</div>";
    //alt_balloon.innerHTML="<div style='color:#000000; font-size:11pt; letter-spacing:-1; font-family:Dotum; background:#F4FFFF; border:1px dashed skyblue; padding:4px 2px 0 2px;'>" + str + "</div>";
    //alt_balloon.innerHTML="<div style='color:#000000; font-size:11pt; letter-spacing:-1; font-family:Dotum; background:#F4FFFF;'>" + str + "</div>";
    //alt_balloon.innerHTML = html;
    
    alt_balloon.innerHTML = balloon_html(str);

    //alt_balloon.style.left=TnT_get_objLeft(obj)+mv_right;
    //alt_balloon.style.top=TnT_get_objTop(obj)-20-mv_up;
    alt_balloon.style.left = TnT_get_objLeft(obj) + mv_right + "px";
    //alt_balloon.style.top=TnT_get_objTop(obj)-20-mv_up+"px";
    alt_balloon.style.top = TnT_get_objTop(obj) - 23 - mv_up + "px";
    alt_balloon.style.visibility = 'visible';
}

function balloon_off() {
    document.getElementById('TnT_TempLayer2').style.visibility = 'hidden';
}

// onload 기본모드
nsEvent='rest'; // Netscape event

if(navigator.userAgent.indexOf('MSIE') === -1) {
    this_browser = 'n';
    document.onmousedown = function(n_evt) {
        nsEvent = n_evt;
    };
    it_img_tag = 'input type=image '; // iwindow title
} else {
    this_browser = 'e';
    it_img_tag = 'img ';
}

document.write("<div id='TnT_TempLayer' style='width:50px; position:absolute; visibility:hidden; z-Index:11; padding:0;'></div>");
document.write("<div id='TnT_TempLayer2' style='position:absolute; visibility:hidden; z-Index:8; padding:0;'></div>");

