function insertExternalFile(fname,W,H) {
if (navigator.appName.indexOf("Microsoft")!=-1
  || navigator.appName=="Netscape"
     && parseInt(navigator.appVersion)>4
)
{
  document.write(''
  +'<IFRAME src="'+fname+'" scrolling="yes" frameborder=1 border=1'
  +(W==null ? '' : ' width='+W)
  +(H==null ? '' : ' height='+H)
  +'></IFRAME>'
  )
}

if (navigator.appName=="Netscape"
     && parseInt(navigator.appVersion)==4) {
  document.write(''
  +'<ILAYER>'
  +'<LAYER src="'+fname+'" '
  +(W==null ? '' : ' width='+W)
  +(H==null ? '' : ' height='+H)
  +'></LAYER></ILAYER>'
  )
}
}

var IE5=(document.getElementById && document.all)? true: false;
var W3C=(document.getElementById)? true: false;
var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;

function trackmouse(evt){
  if((currIDb!=null) && (currIDs!=null)){
    var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
    var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
    currIDb.style.left=x+xoff+'px';
    currIDs.style.left=x+xoff+10+'px';
    currIDb.style.top=y+yoff+'px';
    currIDs.style.top=y+yoff+10+'px';
    return false;
  }
}

function stopdrag(){
  currIDb=null;
  currIDs=null;
  NS6bugfix();
}

function grab_id(evt){
  xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
  yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY);
  currIDb=this.IDb;
  currIDs=this.IDs;
}

function NS6bugfix(){
  if(!IE5){
    self.resizeBy(0,1);
    self.resizeBy(0,-1);
  }
}

function incrzindex(){
  zctr=zctr+2;
  this.subb.style.zIndex=zctr;
  this.subs.style.zIndex=zctr-1;
}

function createPopup(id, width, height, x, y, text){
  if(W3C){
    zctr+=2;
    totz=zctr;
    var txt='';
    txt+='<div id="'+id+'_s" style="position:absolute; left:'+(x+7)+'px; top:'+(y+7)+'px; width:'+width+'px; height:'+height+'px;visibility:visible"> </div>';
    /* ÇÏ´Ü¿¡ "¿À´ÃÇÏ·ç±×¸¸º¸±â" ÀÇ Å©±â¸¸Å­ height 30 px Áõ°¡½ÃÅ´ */
    txt+='<div id="'+id+'_b" style="position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; overflow:hidden; height:'+(height+30)+'px; visibility:visible">';
    /* ·¹ÀÌ¾î Ã¢À» ´ÝÀ» ¶§, "¿À´ÃÇÏ·ç±×¸¸º¸±â" Ã¼Å©¿©ºÎ¿¡ µû¶ó ÄíÅ° ÀúÀå½ÃÅ°±â.. */
    txt+='<div id="'+id+'_h"></div>';
    txt+='<div id="'+id+'_ov" width:'+width+'px;">'+text+'</div>';
    /* ·¹ÀÌ¾î Ã¢¿¡ "¿À´ÃÇÏ·ç±×¸¸º¸±â" Ãß°¡ */
    txt+='<div id="'+id+'_d" width:'+width+'px;"><table width="'+width+'" border="0" cellpadding="0" cellspacing="0"><tr bgcolor="#000000"><td style="color:#ffffff;"><input type=checkbox id=showToday_'+id+' style="border:0px;">¿À´ÃÇÏ·ç±×¸¸º¸±â</td><td align="right" style="padding-right:5px;color:#ffffff;"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';showToday(document.getElementById(\'showToday_'+id+'\'));return false"><font color="#ffffff" style="cursor:pointer;"><b>[´Ý±â]</b></font></a></td></tr></table></div></div>';
    if(document.cookie.indexOf('showToday_'+id+'=off') >= 0){
      document.getElementById('showToday_'+id).checked = true;
      this.IDh.IDs.style.display = 'none';
      this.IDh.IDb.style.display = 'none';
    }
	document.write(txt);
    this.IDh=document.getElementById(id+'_h');
    this.IDh.IDb=document.getElementById(id+'_b');
    this.IDh.IDs=document.getElementById(id+'_s');
    this.IDh.IDb.subs=this.IDh.IDs;
    this.IDh.IDb.subb=this.IDh.IDb;
    this.IDh.IDb.IDov=document.getElementById(id+'_ov');
    if(IE5){
      this.IDh.IDb.IDov.style.width=width;
      this.IDh.IDb.IDov.style.height=height;
      this.IDh.IDb.IDov.style.overflow="hidden";
    }else{
      this.IDh.IDs.style.MozOpacity=.5;
    }
    /* ÀúÀåµÈ ÄíÅ°ÀÇ °ª¿¡ µû¶ó Ã³À½ ÆäÀÌÁö ¶ç¿ï ¶§ º¸ÀÌÁö ¾Êµµ·Ï Ã³¸®. */
    
  }
}

if(W3C)document.onmousemove=trackmouse;
if(!IE5 && W3C)window.onload=NS6bugfix;      
      
/* "¿À´ÃÇÏ·ç±×¸¸º¸±â" ÀÇ Ã¼Å©¿©ºÎ¿¡ µû¶ó ÄíÅ°¸¦ ÀúÀåÇÏ´Â ÇÔ¼ö */
function showToday(obj){
  if(obj.checked){
    var cur = new Date();
    cur.setHours(23);
    cur.setMinutes(59);
    cur.setSeconds(59);
    document.cookie = obj.id + "=off; expires=" + cur.toGMTString() + ";";
  }else{
    document.cookie = obj.id + "=;";
  }
}