ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) { //IE 5.0 ÀÌ»ó¿¡¼­¸¸ ÀÛµ¿ÇÑ´Ù´Â ¶æÀÔ´Ï´Ù. 4.0 ¿¡¼­´Â Å×½ºÆ® ¾ÈÇØºÃ¾î¿ä~! _-_;
		ie5 = true;
	} else {
		ie5 = false; }
} else { ie5 = false; }

var width = 250; // ³ªÅ¸³¯ È­¸éÀÇ °¡·Î±æÀÌÀÔ´Ï´Ù. 
var border = "0"; // ±ò½ÓÇÑ È­¸éÀ» ¿øÇÏ½Å´Ù¸é ±×³É ³öµÎ¼¼¿ä;;;
var offsetx = 4; //¿ª½Ã °Çµå¸®½Ç ÇÊ¿ä ¾ø½À´Ï´Ù.
var offsety = 4; // Á¤ ±Ã±ÝÇÏ½Ã¸é °Çµå·Á º¸½Ã°í ±×·¸Áö ¾ÊÀ¸½ÅºÐµéÀº ±×³É ³öµÎ¼¼¿ä ^^ (Àú´Â ±ÍÂú¾Æ¼­;;; ¾È°Çµå·È½À´Ï´Ù)
var fcolor = "brown"; // Á¦¸ñÀÌ µé¾î°¡´Â ºÎºÐÀ» Á¦¿ÜÇÑ ±× ¹ØÀÇ º»¹®ÀÇ ¹è°æ»öÀ» ÁöÁ¤ÇØÁÖ´Â ºÎºÐÀÔ´Ï´Ù. ¸¶À½¿¡ µå´Â »öÀ¸·Î ÂïÀ¸¼¼¿©;;;
var backcolor = "#ffcc00"; // Á¦¸ñÀÌ µé¾î°¡´Â ºÎºÐÀÇ ¹è°æ»öÀÔ´Ï´Ù.
var textcolor = "#FFFFFF"; // º»¹®¿¡¼­ ±ÛÀÚ»öÀÔ´Ï´Ù.
var capcolor = "black"; // Á¦¸ñ(Å¸ÀÌÆ²)ÀÇ »ö±òÀ» Á¤ÇØÁÝ´Ï´Ù.  
var fontstyle = "font-size:9pt;µ¸¿ò"; // ±âº»ÀûÀÎ ÆùÆ®ÀÇ »çÇ×À» Ãß°¡ÇÏ¿© Á¤ÇÏ½Ç¼ö ÀÖ½À´Ï´Ù.

var x = 0;
var y = 0;
var snow = 0;
var tmpX, tmpY;
var newWin = null;
var doc_width=800, doc_height=600

if ( (ns4) || (ie4) )
{
	if (ns4) over = document.overDiv
	if (ie4) over = overDiv.style

	document.onmousemove = mouseMove;
	
	if (ns4) document.captureEvents(Event.MOUSEMOVE)
}


function nd() {
	if ( (ns4) || (ie4) )
	{
		snow = 0;
		hideObject(over);
	}
}

function drc(title, text)
{
	txt = "<TABLE id=popup border=0 WIDTH="+width+" STYLE=\"filter:alpha(opacity=30); border:1 #101010 solid\" CELLPADDING="+border+" CELLSPACING=0><TR><TD BGCOLOR=\""+backcolor+"\"><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD align=right><SPAN ID=\"PTT\">&nbsp;<FONT style="+fontstyle+" COLOR=\""+capcolor+"\"><B>"+title+"</B> &nbsp;</FONT></SPAN></TD></TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\""+fcolor+"\"><TR><TD align=left><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\" style="+fontstyle+">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>" //±âº»ÀûÀÎ ¸ð¾çÀ» º¯°æÇÏ½Ç¶§ ÀÌºÎºÐÀ» ¼öÁ¤ÇÏ½Ã¸é µÇ°ÚÁö¸¸ ¾ÆÂ÷~! Àß¸øÇÏ½Ã¸é ³¯¸®½Ã´Â °æ¿ì°¡ ¸¹À¸¹Ç·Î °Á ³öµÎ½Ã´Â°Ô ¾ÈÀüÇÒµí ÇÕ´Ï´Ù...
	layerWrite(txt);

	if(ns4)
	{
		doc_width=self.innerWidth;
		doc_height=self.innerHeight;
	}
	else
	{
		if(ie4)
		{
			doc_width=document.body.clientWidth;
			doc_height=document.body.clientHeight;
		}
	}
	
	disp();
}

function disp()
{
	if ( (ns4) || (ie4) )
	{
		if (snow == 0)
		{
			moveTo(over,tmpX,y+offsety);
			showObject(over);
			snow = 1;
		}
	}
}

function mouseMove(e)
{
	if (ns4) {x=e.pageX; y=e.pageY}
	if (ie4) {x=event.x; y=event.y}
	if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}

	tmpX = (doc_width-x-offsetx-width < 0) ? (doc_width-width):(x+offsetx);
	
	if (snow)
	{
		moveTo(over,tmpX,y+offsety);
	}
}

function layerWrite(txt) {
	
	if (ns4)
	{
		var lyr = document.overDiv.document
		lyr.write(txt)
		lyr.close()
	}
	else if (ie4) document.all["overDiv"].innerHTML = txt
	
}

function showObject(obj) {
	if (ns4) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}

function hideObject(obj) {
	if (ns4) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}

function moveTo(obj,xL,yL) {
	obj.left = xL;
	obj.top = yL;
}

var popupWin;

function toHex(dec) {
	// create list of hex characters
  	var hexCharacters = "0123456789ABCDEF"
  	
  	// if number is out of range return limit
	if (dec < 0) return "00"
	if (dec > 255) return "FF"
	
	// decimal equivalent of first hex character in converted number
	var i = Math.floor(dec / 16)
	
	// decimal equivalent of second hex character in converted number
	var j = dec % 16
	
	// return hexadecimal equivalent
	return hexCharacters.charAt(i) + hexCharacters.charAt(j)
}
	
// set background color to specified descriptors
function setbgColor(red, green, blue) {
   	document.bgColor = "#" + toHex(red) + toHex(green) + toHex(blue)
}
	
// fade from start to end descriptors (increase step to increase transition speed)
function fade(sred, sgreen, sblue, ered, egreen, eblue, step) {
	// loop to create fade effect
    for(var i = 0; i <= step; ++i) {
    // set current red descriptor
    var red = Math.floor(sred * ((step - i) / step) + ered * (i / step))
    // set current green descriptor
    var green = Math.floor(sgreen * ((step - i) / step) + egreen * (i / step))
    // set current green descriptor
    var blue = Math.floor(sblue * ((step - i) / step) + eblue * (i / step))
    // set background color according to descriptors
    setbgColor(red, green, blue)
    }
}


function high(which2)
{ 
	if (window.lowlighting) clearInterval(lowlighting);
	if (window.highlighting) clearInterval(highlighting);

	theobject=which2;
	highlighting=setInterval("highlightit(theobject )",50);
} 

function low(which2)
{ 
	if (window.lowlighting) clearInterval(lowlighting);
	if (window.highlighting) clearInterval(highlighting);

	theobject=which2;
	lowlighting=setInterval("lowlightit(theobject )",50)
} 
 
function highlightit(cur2)
{ 
	if (cur2.filters.alpha.opacity<75) cur2.filters.alpha.opacity+=25;
} 

function lowlightit(cur2)
{ 
	try
	{
		if (cur2.filters.alpha.opacity>=40) cur2.filters.alpha.opacity-=40;

		if (cur2.filters.alpha.opacity<45)
		{
			if (lowlighting) clearInterval(highlighting);
			if (highlighting) clearInterval(highlighting);
			nd();
		}
	} catch (e) {
		nd();
	}
}