ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

if (ie4) {
	if (navigator.userAgent.indexOf('MSIE 5')>0) {
		ie5 = true;
	} else {
		ie5 = false; }
} else { ie5 = false; }

// ¸ð±Ù¿ø (mogiman@orgio.net)
// http://lomohome.com
// http://devqna.com
// À­ºÎºÐÀº »èÁ¦ÇÏÁö ¸»¾ÆÁÖ¼¼¿ä

//------------------------------------ÀÌºÎºÐ¸¸ ¼öÁ¤ÇØÁÖ¼¼¿ä-----------------------------------------
//ÆË¾÷Ã¢ÀÇ ½ºÅ¸ÀÏ Á¶Á¤ ½ÃÀÛ

var width = 70; //ÆË¾÷Ã¢ÀÇ °¡·ÎÅ©±â¸¦ °áÁ¤ÇÕ´Ï´Ù.
var border = "0"; //ÆË¾÷Ã¢ÀÇ Å×µÎ¸® µÎ²²¸¦ °áÁ¤ÇÕ´Ï´Ù.
var offsetx = 5; //ÆË¾÷Ã¢ÀÇ ¸¶¿ì½º¿¡¼­ºÎÅÍÀÇ ¼öÆò À§Ä¡¸¦ °áÁ¤ÇÕ´Ï´Ù.
var offsety = 15; //ÆË¾÷Ã¢ÀÇ ¸¶¿ì½º¿¡¼­ºÎÅÍÀÇ ¼öÁ÷ À§Ä¡¸¦ °áÁ¤ÇÕ´Ï´Ù.

var fcolor = "#000000"; //ÆË¾÷Ã¢ÀÇ º»¹® ¹è°æ»öÀÔ´Ï´Ù.
var backcolor = "#FF9000"; //ÆË¾÷Ã¢ÀÇ Á¦¸ñºÎºÐ ¹è°æ»öÀÔ´Ï´Ù.

var textcolor = "#FFFFFF"; //ÆË¾÷Ã¢ÀÇ ³»¿ë±ÛÀÚ»öÀÔ´Ï´Ù.
var capcolor = "#490000"; //ÆË¾÷Ã¢ÀÇ Á¦¸ñºÎºÐ ±ÛÀÚ»öÀÔ´Ï´Ù.

var copyrStyle = "font-size:11px";		//mogiman@orgio.net ÀÇ ½ºÅ¸ÀÏ
var copycolor = "#FFFFFF"; //mogiman@orgio.net ÀÇ ÆùÆ® »öÀÔ´Ï´Ù.

var b_color="#101010" //ÆË¾÷Ã¢ÀÇ Å×µÎ¸® »öÀÔ´Ï´Ù.

var fontstyle_s = "font-size:12px"; //ÆË¾÷Ã¢ÀÇ Á¦¸ñ ÆùÆ® ½ºÅ¸ÀÏÀÔ´Ï´Ù.
var fontstyle_c = "font-size:12px;line-height:16px;"; //ÆË¾÷Ã¢ÀÇ º»¹® ÆùÆ® ½ºÅ¸ÀÏÀÔ´Ï´Ù.
var alpha = "80"; //ÆË¾÷Ã¢ÀÇ Åõ¸íµµ ÀÔ´Ï´Ù.

//½ºÅ¸ÀÏ Á¶Á¤ ³¡
//---------------------------------------------------------------------------------------------------

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_pop;

	if (ns4) document.captureEvents(Event.MOUSEMOVE)
}

var popupWin;

function nd_pop() {
	if ( (ns4) || (ie4) )
	{
		snow = 0;
		hideObject_pop(over);
	}
}

function drc_pop(title, text)
{
	txt = "<TABLE id=popup border=0 WIDTH="+width+" STYLE=\"filter:alpha(opacity=0); border:1 "+b_color+" solid\" CELLPADDING="+border+" CELLSPACING=0><TR><TD BGCOLOR=\""+backcolor+"\"><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD align=center><SPAN ID=\"PTT\">&nbsp;<FONT style="+fontstyle_s+" 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=center><SPAN ID=\"PST\"><FONT COLOR=\""+textcolor+"\" style="+fontstyle_c+">"+text+"</FONT><SPAN></TD></TR></TABLE></TD></TR></TABLE>"	
	layerWrite_pop(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_pop();
}

function disp_pop()
{
	if ( (ns4) || (ie4) )
	{
		if (snow == 0)
		{
			moveTo_pop(over,tmpX,y+offsety);
			showObject_pop(over);
			snow = 1;
		}
	}
}

function mouseMove_pop(e)
{
	if (ns4) {x=e.pageX; y=e.pageY}
	//if (ie4) {x=event.x; y=event.y}
	if (ie4) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;} //ie 60ÀÇ ÄÚµå¸¦ ¾ò¾î³»±â Àü±îÁö´Â 4.0À¸·Î ÀÎ½Ä
	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_pop(over,tmpX,y+offsety);
	}
}

function layerWrite_pop(txt) {

	if (ns4)
	{
		var lyr = document.overDiv.document
		lyr.write(txt)
		lyr.close()
	}
	else if (ie4) document.all["overDiv"].innerHTML = txt

}

function showObject_pop(obj) {
	if (ns4) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}

function hideObject_pop(obj) {
	if (ns4) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}

function moveTo_pop(obj,xL,yL) {
	obj.left = xL;
	obj.top = yL;
}

function high_pop(which2)
{
	if (window.lowlighting) clearInterval(lowlighting);
	if (window.highlighting) clearInterval(highlighting);

	theobject=which2;
	highlighting=setInterval("highlightit_pop(theobject )",20);
}

function low_pop(which2)
{
	if (window.lowlighting) clearInterval(lowlighting);
	if (window.highlighting) clearInterval(highlighting);

	theobject=which2;
	lowlighting=setInterval("lowlightit_pop(theobject )",1)
}

function highlightit_pop(cur2)
{
	if (cur2.filters.alpha.opacity<alpha) cur2.filters.alpha.opacity+=10;
}

function lowlightit_pop(cur2)
{
	try
	{
		if (cur2.filters.alpha.opacity>=0) cur2.filters.alpha.opacity-=100;

		if (cur2.filters.alpha.opacity<1)
		{
			if (lowlighting) clearInterval(highlighting);
			if (highlighting) clearInterval(highlighting);
			nd_pop();
		}
	} catch (e) {
		nd_pop();
	}
}
