//------------------------------------------------------------------------------------
//ÄÃ·¯ ÇÈÄ¿ Ã¢  onclick=colorpicker(this)
//------------------------------------------------------------------------------------
function colorpicker(name)
{
	var color = window.showModalDialog('_lib/colorpicker.html', name.value ,'dialogwidth:430px;dialogheight:255px;scroll:0;status:0;help:0;center:1;resizable:0');
	name.value = color;
	name.style.color = color;
}
function Viewimage(src) {
	var imgObj = new Image();
	imgObj.src = src;
	var wopt = "status=no,resizable=no";
	if(screen.width < imgObj.width || screen.height < imgObj.height){
		wopt += ",scrollbars=yes,width=100,height=100";
	}
	else{
		wopt += ",scrollbars=no";
		wopt += ",width=" + imgObj.width;
		wopt += ",height=" + imgObj.height;
	}
	var wbody = "<head><title>»çÁø º¸±â</title>";
	wbody += "<script language='javascript'>";
	wbody += "function finalResize(){";
	wbody += "  var oBody=document.body;";
	wbody += "  var oImg=document.images[0];";
	wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
	wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
	wbody += "if(xdiff > screen.width)xdiff = screen.width-110;";
	wbody += "if(ydiff > screen.height)ydiff = screen.height-120;";
	wbody += "  window.moveBy(0,0);";
	wbody += "  window.resizeBy(xdiff,ydiff);";
	wbody += "}";
	wbody += "</"+"script>";
	wbody += "</head>";
	wbody += "<body onLoad='finalResize()' style='margin:0;cursor:hand' onclick=javascript:window.close()>";
	wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	wbody += "</body>";
	winResult = window.open("about:blank","",wopt);
	winResult.document.open("text/html", "replace");
	winResult.document.write(wbody);
	winResult.document.close();
	return;
}
//------------------------------------------------------------------------------------
//ÄíÅ° Ã¼Å©  ¸®ÅÏ:0 ±ÝÁö 1:Çã¿ë 2:ÀÏºÎÇã¿ë
//------------------------------------------------------------------------------------
function check_cookie()
{
	if (window.document.all){
		if (navigator.cookieEnabled==true) return 1;
		else return 0;
	}
	else{
		netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesRead');
		if (navigator.preference('network.cookie.cookieBehavior') != 0)	return 1;
		else if (navigator.preference('network.cookie.cookieBehavior') != 1)return 2;
		else return 0;
	}
}
//------------------------------------------------------------------------------------
//ÄíÅ° ¼³Á¤  cookie_set(name, value) 
//------------------------------------------------------------------------------------
function set_cookie(name, value) 
{
	var argv = set_cookie.arguments;
	var argc = set_cookie.arguments.length;
	var expires = (2 < argc) ? argv[2] : null;
	var path = (3 < argc) ? argv[3] : null;
	var domain = (4 < argc) ? argv[4] : null;
	var secure = (5 < argc) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
		((expires == null) ? "" : 
		("; expires=" + expires.toGMTString())) +
		((path == null) ? "" : ("; path=" + path)) +
		((domain == null) ? "" : ("; domain=" + domain)) +
		((secure == true) ? "; secure" : "");
}
//------------------------------------------------------------------------------------
// ÄíÅ°¿¡ ¼³Á¤µÈ °ªÀ» ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function get_cookie(name) 
{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return get_cookieval (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
   }
   return null;
}
//------------------------------------------------------------------------------------
// ÄíÅ°¿¡ ¼³Á¤µÈ °ªÀ» ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function get_cookieval(offset) 
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­À» Ä¡È¯ÇÕ´Ï´Ù. (º¹¼ö °¡´É)
// ex ) var str = "¾È³çÇÏ¼¼¿ä. ÀúÀÇ ÀÌ¸§Àº xÀÔ´Ï´Ù.";
//        str.multi_replace("ÀÌ¸§","¾ÆÀÌµð"); // ÀÌ¸§ => ¾ÆÀÌµð
//        str.multi_replace("ÀÌ¸§","¾ÆÀÌµð",".","!"); // ÀÌ¸§ => ¾ÆÀÌµð , . => !
//------------------------------------------------------------------------------------
String.prototype.multi_replace = function() 
{
	var i;
	var argCount = arguments.length;
	if (argCount==0 || argCount%2!=0) return this;
	var strOutput = "";
	var strTemp = this;
	var strTemp2 = "";
	for(i=0; i<argCount; i+=2){
		strTemp2=arguments[i].replace(/([\^\\\$\*\+\?\.])/g,"\\$1");
		strTemp=strTemp.replace(eval("/("+strTemp2+")/g"),arguments[i+1]);
	}
	return strTemp;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­¿¡¼­ Æ¯Á¤ ¹®ÀÚ¿­À» »èÁ¦ÇÕ´Ï´Ù. (º¹¼ö °¡´É)
//------------------------------------------------------------------------------------
String.prototype.remove = function() 
{
	var i;
	var argCount = arguments.length;
	if (argCount==0) return this;
	var regStr = "";

	for(i=0; i<argCount; i++) 
	{
		regStr+="("+arguments[i].replace(/([\^\\\$\*\+\?\.])/g,"\\$1")+")|";
	}
	newstr =  this.replace(eval("/"+regStr.replace(/\|$/g,"")+"/g"),"");
	return newstr;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÌ Æ¯Á¤ ¹®ÀÚ¿­·Î ½ÃÀÛµÇ´ÂÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.start_str = function(str) 
{
	if (this.substr(0,str.length)==str) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÌ Æ¯Á¤ ¹®ÀÚ¿­·Î ³¡³ª´ÂÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.end_str = function(str) 
{
	if (this.substr(this.length-str.length)==str) return true;
	else return false;
}

//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ ½ÃÀÛºÎºÐ¿¡¼­ °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.ltrim = function()
{
	return this.replace(/(^\s*)/g, "");
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ ³¡¿¡¼­ °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.rtrim = function() 
{
	return this.replace(/(\s*$)/g, "");
}

//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ Ã³À½°ú ³¡¿¡ ÀÖ´Â °ø¹éÀ» Á¦°ÅÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.trim = function() 
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ ¿ÞÂÊºÎÅÍ ÁöÁ¤ÇÑ ¼ö¸¸Å­ÀÇ ¹®ÀÚ¿­¸¦ ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.left = function(len) 
{
	if (this==null || this=="") return this;
	var strLength=this.length;
	if (strLength<1 || len>=strLength) return this;
	else return this.substr(0,len);
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ ¿À¸¥ÂÊºÎÅÍ ÁöÁ¤ÇÑ ¼ö¸¸Å­ÀÇ ¹®ÀÚ¿­¸¦ ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.right = function(len) 
{
	if (this==null || this=="") return this;
	var strLength=this.length;
	if (len<=0 || len>=strLength) return this;
	else return this.substr(strLength-len);
}
//------------------------------------------------------------------------------------
// ÇÑ±ÛÀ» Æ÷ÇÔÇÑ ¹®ÀÚ¿­ ±æÀÌ ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.krlength = function() 
{
	var i,ch;
	var strLength = this.length;
	var count = 0;

	for(i=0;i<strLength;i++)
	{
		ch = escape(this.charAt(i));

		if(ch.length > 4)
			count += 2;
		else if(ch!='\r') 
			count++;
	}
	return count;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­À» Æ¯Á¤ ¹®ÀÚ¿­À» ³ª´² ¹è¿­ÇüÅÂÀÇ °ªÀ¸·Î ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function unarray(str,separator) 
{
	arrayOfStrings = str.split(separator);
	return arrayOfStrings;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­À» Çü½ÄÈ­(3ÀÚ¸®¸¶´Ù ÄÞ¸¶ »ðÀÔ)µÈ ½ÄÀ¸·Î ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.number_format = function() 
{
	var str = this.replace(/,/g,"");
	var strLength = str.length;

	if (strLength<=3) return str;
	
    var strOutput = "";
    var mod = 3 - (strLength % 3);
	var i;

    for (i=0; i<strLength; i++) 
	{
		strOutput+=str.charAt(i); 
        if (i < strLength - 1) 
		{
			mod++; 
            if ((mod % 3) == 0) 
			{ 
				strOutput +=","; 
                mod = 0; 
			}
		} 
	} 
	return strOutput;
}
//------------------------------------------------------------------------------------
// Æ¯Á¤ ¹®ÀÚ¿­À» ¿øÇÏ´Â ¸¸Å­ ¹Ýº¹½ÃÅ² °ªÀ» ¹ÝÈ¯ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function StrRepeat(str, multiplier)
{
	var strOutput = "";
	var i;

	for (i=1; i<=multiplier; i++)
	{
		strOutput+=str;
	}

	return strOutput;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÇ ¿øÇÏ´Â À§Ä¡¿¡ ÁöÁ¤ÇÑ ±æÀÌÀÇ ´Ù¸¥ ¹®ÀÚ¿­À» Ãß°¡½ÃÅµ´Ï´Ù.
// pad_type : 1 => ¿ÞÂÊ , 2 => ¿À¸¥ÂÊ , 3 => ¾çÂÊ
//------------------------------------------------------------------------------------
String.prototype.Pad = function(pad_string, pad_length, pad_type) 
{
	var i;
	if (pad_type==null) pad_type=2;
	var strOutput = "";

	strOutput = StrRepeat(pad_string,pad_length);

	if (pad_type==1)
	{
		return strOutput+this;
	}
	else if (pad_type==2)
	{
		return this+strOutput;
	}
	else if (pad_type==3)
	{
		return strOutput+this+strOutput;
	}	
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­¿¡¼­ ÅÂ±×¸¦ »èÁ¦ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
String.prototype.strip_tags = function() {
	return this.replace(/<[^<|>]*>/g,"");
}
//------------------------------------------------------------------------------------
// ´º¶óÀÎÀ» HTML ¶óÀÎ ºê·¹ÀÌÅ©(<BR>)·Î º¯È¯ÇÑ´Ù.
//------------------------------------------------------------------------------------
String.prototype.nl2br = function() {
	return this.replace(/\r\n/g,"<br>");
}

//------------------------------------------------------------------------------------
// ¿ÀÅä¸µÅ© autolink(id) id´Â html id
//------------------------------------------------------------------------------------
function autolink(id) 
{
	var container = document.getElementById(id);
	var doc = container.innerHTML;
	var regURL = new RegExp("(http|https|ftp|telnet|news|irc)://([-/.a-zA-Z0-9_~#%$?&=:200-377()]+)","gi");
	var regEmail = new RegExp("([xA1-xFEa-z0-9_-]+@[xA1-xFEa-z0-9-]+\.[a-z0-9-]+)","gi");
	container.innerHTML = doc.replace(regURL,"<a href='$1://$2' target='_blank'>$1://$2</a>").replace(regEmail,"<a href='mailto:$1'>$1</a>");
}
//------------------------------------------------------------------------------------
// Äù½ºÃÅ ÇÔ¼ö
//------------------------------------------------------------------------------------
function query(str){
	if(confirm(str)){
		return true;
	}
	return false;
}



/**
 * ÇÑ±Û ¸¶Áö¸· ±ÛÀÚÀÇ Áß¼º À¯¹«¸¦ Ã¼Å©ÇÕ´Ï´Ù.
 *
 * ex ) var str = "»çÅÁ";
 *        if (CheckFinalConsonant(str)) {
 *           window.alert(str+"À» ¸Ô¾ú½À´Ï´Ù.");
 *        }
 *        else {
 *           window.alert(str+"¸¦ ¸Ô¾ú½À´Ï´Ù.");
 *        }
 */
function CheckFinalConsonant(str) 
{
	var strTemp = str.substr(str.length-1);
	if ((strTemp.charCodeAt(0)-16)%28!=0) return true;
	else return false;
}

//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­¿¡ »ç¿ëÇØ¼­´Â ¾ÈµÇ´Â HTMLÅÂ±×°¡ ÀÖ´ÂÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isHTML(str) 
{
	var re = new RegExp("<[\/]{0,1}[^\f\n\r\t\v]*(html|table|tr|td|script|form|xmp|!|iframe|textarea|input|meta)[^\f\n\r\t\v]*","gi");
	var matchArray = str.match(re);
	if (matchArray) return false;
	else return true;
}

//------------------------------------------------------------------------------------
// ¿Ã¹Ù¸¥ ¸ÞÀÏÇü½ÄÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isEMAIL(str) 
{
	var re=new RegExp("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$","gi");
	var matchArray=str.match(re);
	if (matchArray) return true;
	else return false;
}

//------------------------------------------------------------------------------------
// ¿Ã¹Ù¸¥ È¨ÆäÀÌÁöÇü½ÄÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isHOMEPAGE(str) 
{
	var re=new RegExp("^((ht|f)tp:\/\/)((([a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3}))|(([0-9]{1,3}\.){3}([0-9]{1,3})))((\/|\\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)$","gi");
	var matchArray=str.match(re);
	if (matchArray) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¿Ã¹Ù¸¥ ÀüÈ­¹øÈ£ Çü½Ä(¼ýÀÚ-¼ýÀÚ-¼ýÀÚ)ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isTEL(str) 
{
	if (str.search(/^(\d+)-(\d+)-(\d+)$/g)!=-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¾ËÆÄºª¸¸À¸·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isID(str) 
{
	if(str.length < 4 || str.length > 20)  return false;
	if (str.search(/[^a-z0-9_]/g)==-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¾ËÆÄºªÀÎÁö È®ÀÎ
//------------------------------------------------------------------------------------
function isALPHA(str) 
{
	if (str.search(/[^a-zA-Z]/g)==-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ´ë¹®ÀÚ·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isUPPER(str) 
{
	if (str.search(/[^A-Z]/g)==-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¼Ò¹®ÀÚ·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isLOWER(str) 
{
	if (str.search(/[^a-z]/g)==-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ÇÑ±Û·Î¸¸ ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isKOR(str) 
{
	var strLength = str.length;
	var i;
	var Unicode;

	for (i=0;i<strLength;i++) 
	{
		Unicode = str.charCodeAt(i);
		if ( !(44032 <= Unicode && Unicode <= 55203) ) return false;	
	}
	return true;
}
//------------------------------------------------------------------------------------
// ¼ýÀÚ¸¸À¸·Î ±¸¼ºµÈ ¹®ÀÚ¿­ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isNUM(str) 
{
	if (str.search(/[^0-9]/g)==-1) return true;
	else return false;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­ÀÌ NULLÀÎÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isNULL(str) 
{
	str = str.remove(" ","");
    if (str == null || str == "") return true;
    else return false;
}
//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­¿¡ ÇÑÄ­ÀÌ»óÀÇ ½ºÆäÀÌ½º ÀÔ·ÂÀÌ ÀÖ´ÂÁö¸¦ Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isSPACE(str) 
{
	if (isNull(str)) return false;
	else
	{
		if (str.search(/[\s]{2,}/g)!=-1) return false;
		else return true;
	}
}

//------------------------------------------------------------------------------------
// ¹®ÀÚ¿­¿¡ ÇÑÄ­ÀÌ»óÀÇ ½ºÆäÀÌ½º ÀÔ·ÂÀÌ ÀÖ´ÂÁö¸¦ Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isIMG(str) 
{
	if(str.match(/\.(gif|jpg|jpeg|bmp|png)$/i)) return true;
	else return false;
}

//------------------------------------------------------------------------------------
// À©µµ¿ìÃ¢ Æã¼Ç
//------------------------------------------------------------------------------------
function MOwin(url,w,h){
	window.showModalDialog(url,'MODALWIN','dialogwidth:'+w+'px;dialogheight:'+h+'px;scroll:0;status:0;help:0;center:1;resizable:0');
}
function FUwin(url,win){
	FUw = window.open(url,win,'scrollbars=yes,fullscreen=1');
	FUw.focus();
} 
function Fwin(url,win,w,h){
	Fw = window.open(url,win,'scrollbars=yes,resizable=yes,width='+w+',height='+h);
	Fw.focus();
} 
function Mwin(url,win,w,h){
	Mw = window.open(url,win,'scrollbars=no,resizable=no,width='+w+',height='+h);
	Mw.focus();
} 
function Swin(url,win,w,h){
	Sw = window.open(url,win,'scrollbars=yes,resizable=no,width='+w+',height='+h);
	Sw.focus();
} 




//------------------------------------------------------------------------------------
// À©µµ¿ìÃ¢ Æã¼Ç
//------------------------------------------------------------------------------------
function GetBrowser() 
{
	var tempDocument = window.document;

	if (tempDocument.all && tempDocument.getElementById) // ÀÎÅÍ³Ý ÀÍ½ºÇÃ·Î·¯ 5.x
	{ 
		return 1;
	}
	else if (tempDocument.all && !tempDocument.getElementById) // ÀÎÅÍ³Ý ÀÍ½ºÇÃ·Î·¯ 4.x
	{ 
		return 2;
	}
	else if (tempDocument.getElementById && !tempDocument.all) // ³Ý½ºÄÉÀÌÇÁ 6
	{ 
		return 3;
	}
	else if (tempDocument.layers) // ³Ý½ºÄÉÀÌÇÁ 4.x
	{	 
		return 4;
	}
}
//------------------------------------------------------------------------------------
// * ÆË¾÷Ã¢À» ¿øÇÏ´Â À§Ä¡¿¡ »ý¼ºÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function OpenWindow(url, name, width, height, align, valign, option) 
{
    var x,y;
	var window_option = "width="+width+",height="+height;

	if (option!=null) window_option+=","+option;
    if (align==null) align="center";
    if (valign==null) valign="center";

    if (align=="left") x=0;
    else if (align=="right") x=(screen.width-width);
    else if (align=="center") x=(screen.width-width)/2

    if (valign=="top") y=0;
    else if (valign=="bottom") y=(screen.height-height);
    else if (valign=="center") y=(screen.height-height)/2

    window_option+=",left="+x+",top="+y;

    var win = window.open(url,name,window_option);

	focus();
    win.focus();
	return win;
}

//------------------------------------------------------------------------------------
// * À©µµ¿ì°¡ ¿­·ÁÀÖ´ÂÁö Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function isAliveWindow(win)
{
	if (!win.closed) return true;
	else return false;
}

//------------------------------------------------------------------------------------
// * »ç¿îµå¸¦ µéÀ»¼ö ÀÖ´ÂÁö È¯°æÀÎÁö Ã¼Å©ÇÕ´Ï´Ù. (IEÀü¿ë)
//------------------------------------------------------------------------------------
function EnableSound()
{
  document.write("<OBJECT ID='Player64' CLASSID='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' STYLE='display:none'></OBJECT>");
  return Player64.IsSoundCardEnabled();
}

//------------------------------------------------------------------------------------
// * ¸®¾óÇÃ·¹ÀÌ¾î(RealPlayer) ¼³Ä¡ ¿©ºÎ Ã¼Å©ÇÕ´Ï´Ù.
//------------------------------------------------------------------------------------
function EnableRealPlayer()
{
	var nRealMode=0;
	var nRealPlayer5=0;
	var nRealPlayer4=0;
	var nRealPlayerG2=0;

	if (window.document.all) // IE
	{
		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('nRealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n');
		document.write('nRealPlayer5 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))\n');
		document.write('nRealPlayer4 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))\n');
		document.write('</SCRIPT\> \n');
	}
	else // NS
	{
		var numPlugins = navigator.plugins.length;
		for (var i = 0; i < numPlugins; i++)
		{
			plugin = navigator.plugins[i];
			if (plugin.name.substring(0,10)=="RealPlayer")
			{
				nRealMode=1;
			}
		}
	}

	if (nRealMode || nRealPlayerG2 || nRealPlayer5 || nRealPlayer4) 
		return true;
	else 
		return false;
}

//------------------------------------------------------------------------------------
// * ÆäÀÌÁö ÀÌµ¿À» ÇÕ´Ï´Ù.
// * @param		delay		ÆäÀÌÁö ÀÌµ¿ Áö¿¬ ½Ã°£ (milliseconds)
//------------------------------------------------------------------------------------
function MovePage(str,delay)
{
	if (delay==null) 
		window.location.href=str;
	else 
		window.setInterval("window.location.href='"+str+"'",delay);
}

//------------------------------------------------------------------------------------
// * ÇöÀç È÷½ºÅä¸® ¿£Æ®¸®¿¡ ÆäÀÌÁö¸¦ ÀÐ¾îµéÀÔ´Ï´Ù. (µÚ·Î°¡±â ¹öÆ° ºñÈ°¼ºÈ­)
//------------------------------------------------------------------------------------
function ReplacePage(str,delay)
{
	if (delay==null) 
		window.location.replace(str);
	else 
		window.setInterval("window.location.replace('"+str+"')",delay);
}

//------------------------------------------------------------------------------------
// * ÇöÀç ÆäÀÌÁö »õ·Î °íÄ§
//------------------------------------------------------------------------------------
function ReloadPage(delay)
{
if (delay==null) 
		window.location.reload();
	else 
		window.setInterval("window.location.reload()",delay);
}

//------------------------------------------------------------------------------------
// * ¹®ÀÚ¿­À» Å¬¸³º¸µå¿¡ º¹»çÇÕ´Ï´Ù. (IEÀü¿ë)
//------------------------------------------------------------------------------------
function CopyToClip(str) 
{
	if (window.document.all) // IEÀÏ¶§
		window.clipboardData.setData('Text',str);
}

/**
 * ºê¶ó¿ìÀúÀÇ ½ÃÀÛÆäÀÌÁö º¯°æÃ¢À» ¶ç¿ó´Ï´Ù. (IEÀü¿ë)
 */
function SetHomePage(url) 
{
	window.document.write("<SPAN ID='objHomePage' STYLE='behavior:url(#default#homepage); display:none;' >s</SPAN>");
	window.document.all.objHomePage.setHomePage(url);
}

/**
 * ºê¶ó¿ìÀúÀÇ Áñ°ÜÃ£±â Ãß°¡Ã¢À» ¶ç¿ó´Ï´Ù. (IEÀü¿ë)
 */
function AddFavorite(url, homename) 
{
	window.external.AddFavorite(url, homename);
}

/**
 * ¸ð´ÏÅÍ ÇØ»óµµ¸¦ ±¸ÇÕ´Ï´Ù.
 */
function get_winsize() 
{
	if (window.screen)
	{
		var returnArray = new Array(2);
		returnArray[0] = window.screen.width;
		returnArray[1] = window.screen.height;
		return returnArray;
	}
	else return false;
}

/**
 * »ç¿ëÀÚÀÇ »ö»ó ¼³Á¤À» ±¸ÇÕ´Ï´Ù.
 * @return		»ö»óºñÆ®¼ö¸¦ ¹ÝÈ¯ÇÕ´Ï´Ù. ( 8ºñÆ® : 256»ö, 16ºñÆ® : ÇÏÀÌÄÃ·¯ , 24ºñÆ® : Æ®·çÄÃ·¯ )
 */
function GetWindowColor() 
{
	if (window.screen)
	{
		return screen.colorDepth;
	}
}

/**
 * ºê¶ó¿ìÀúÀÇ Á¦¸ñÇ¥½ÃÁÙÀ» ¼³Á¤ÇÕ´Ï´Ù.
 */
function SetWindowTitle(str) 
{
	document.title = str;
}

/**
 * ºê¶ó¿ìÀúÀÇ Á¦¸ñÇ¥½ÃÁÙÀÇ ¹®ÀÚ¿­À» ¹ÝÈ¯ÇÕ´Ï´Ù.
 */
function GetWindowTitle() 
{
	return document.title;
}

/**
 * ºê¶ó¿ìÀúÀÇ »óÅÂÇ¥½ÃÁÙÀ» ¼³Á¤ÇÕ´Ï´Ù.
 */
function SetStatusTitle(str) 
{
	window.status = str;
}

/**
 * ºê¶ó¿ìÀúÀÇ »óÅÂÇ¥½ÃÁÙÀÇ ¹®ÀÚ¿­À» ¹ÝÈ¯ÇÕ´Ï´Ù.
 */
function GetStatusTitle() 
{
	return window.status;
}
