<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


/////////////////////////////////////////////////////////////////////////////////////////////////
function getCookie(name){ 
 var nameOfCookie = name + "="; 
 var x = 0; 
 while ( x <= document.cookie.length ) { 
  var y = (x+nameOfCookie.length); 
  if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
   if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
   endOfCookie = document.cookie.length; 
   return unescape( document.cookie.substring( y, endOfCookie ) ); 
   }
  x = document.cookie.indexOf( " ", x ) + 1; 
  if ( x == 0 ) 
  break; 
  } 
 return ""; 
 } 

function setCookie(name, value, expiredays){
 var todayDate = new Date();
 todayDate.setDate( todayDate.getDate() + expiredays );
 document.cookie = name+"="+escape( value )+"; path=/;expires="+todayDate.toGMTString()+";"
 }

//////////////////////////////////////////////////////////////////////////////////////////////////
var TnTL_clickTime;
function DragResize_DN(it_Resize,evt,div_id){

    if(div_id){
        mv_act_objt=document.getElementById(div_id);
        if(mv_act_objt.style.position!='absolute'){
            mv_act_objt.style.left=TnT_get_objLeft(mv_act_objt);
            mv_act_objt.style.top=TnT_get_objTop(mv_act_objt);
            mv_act_objt.style.position='absolute';
        }
        mv_act_objt.style.zIndex=++iwinzidx;
    }
    else{mv_act_objt=iwindowLAYER;}

    DragResize_start=1;
    Drg_x=(this_browser=='n')? evt.pageX : event.clientX;
    Drg_y=(this_browser=='n')? evt.pageY : event.clientY;

    if(it_Resize<1){// Drag
        temp1=parseInt(mv_act_objt.style.left);
        temp2=parseInt(mv_act_objt.style.top);
        if(this_browser=='n')  document.onmousemove=TnTmoveAct_n;
        else document.onmousemove=TnTmoveAct;
    }
    else{// Resize
        iwindoWidth=parseInt(TntiwindowTable.width); // °¡·Î
        iwindoHeight=parseInt(TntiwindowTable.height); // ¼¼·Î
        if(this_browser=='n')  document.onmousemove=TnTresizeAct_n;
        else document.onmousemove=TnTresizeAct;
    }
    TnTL_clickTime=1;
}

function TnTmoveAct(){ // drag
    if(DragResize_start==1){
        mv_act_objt.style.left=temp1+event.clientX-Drg_x;
        mv_act_objt.style.top=temp2+event.clientY-Drg_y;
        return false;
    }
}

// resize move
function TnTresizeAct(){
    if(DragResize_start==1){
        var re_x=iwindoWidth+event.clientX-Drg_x;
        var re_y=iwindoHeight+event.clientY-Drg_y;
        if(re_x<50 || re_y<50) return false;
        iwindow_RESIZE(re_x,re_y);
        return false;
    }
}


////////////////////////////////////////////////////////////////////////////////////////////////////

function divbanneropen()
{
 if(getCookie("Event12") != "no" ){
  banner_main.style.display = "block";
 

 }
}

function divbannerclose()
{
 banner_main.style.display = "none";
 
 if(window.document.divbanner.chkdivbanner.checked == true)
 {
  setCookie("Event12", "no", 1);


 }
}

function divbanneropen2()
{
 if(getCookie("Event12_2") != "no" ){
  banner_main2.style.display = "block";
 }
}

function divbannerclose2()
{
 banner_main2.style.display = "none";
 if(window.document.divbanner2.chkdivbanner2.checked == true)
 {
  setCookie("Event12_2", "no", 1);
 }
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 document.onclick=iwindow_CLOSE_AUTO;
function iwindow_CLOSE_AUTO(){
 DragResize_start=0;
 if(TnTL_clickTime==1) return; // iwindow ¸¦ µå·¡±× ro Å©±âº¯°æ µ¿ÀÛÈÄ¿¡´Â ÀÚµ¿´Ý±â Àû¿ë¾ÈÇÔ(¹«Á¶°Ç ÀÚµ¿´Ý±â Àû¿ëÇÏ·Á¸é ÀÌ ¶óÀÎÀ» »èÁ¦)
 if(this_browser=='e'){
  if (event.srcElement.className=="TnT_Layer_dragin") return; // iwindow: Drag, Resize
  if (event.srcElement.className=="TnT_Top_button") return; // iwindow : TopButton
  if (event.srcElement.className=="TnT_Editor_button") return; // editor : Button
 }
 if((TnTL_clickTime+500)<(new Date()).getTime()){iwindow_CLOSE();}
}


function TnTmoveAct_n(evt){ // drag
    if (DragResize_start==1){
        mv_act_objt.style.left=temp1+evt.pageX-Drg_x;
        mv_act_objt.style.top=temp2+evt.pageY-Drg_y;
        return false;
    }
}

// resize move
function TnTresizeAct_n(evt){
    if (DragResize_start==1){
        var re_x=iwindoWidth+evt.pageX-Drg_x;
        var re_y=iwindoHeight+evt.pageY-Drg_y;
        if(re_x<50 || re_y<50) return false;
        iwindow_RESIZE(re_x,re_y);
        return false;
    }
}

// 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);
}


mouseDN_X=0;
mouseDN_Y=0;
if(navigator.userAgent.indexOf('MSIE') == -1){
 this_browser='n';
 document.onmousedown=function(n_evt){
  mouseDN_X=n_evt.pageX;
  mouseDN_Y=n_evt.pageY;
 }
 it_img_tag='input type=image '; // iwindow title
}
else{
 this_browser='e';
 it_img_tag='img ';
}
iwinzidx=10;
tntactiwin='';
//-->
