	// ±âº» ¼³Á¤
	var isDOM = (document.getElementById ? true : false);
	var isIE4 = ((document.all && !isDOM) ? true : false);
	var isNS4 = (document.layers ? true : false);
	var isNS = navigator.appName == "Netscape";

	// ÁöÁ¤µÈ ´ë»óÀ» Ã£´Â´Ù.
	function getRef(id)
	{
		if(isDOM) return document.getElementById(id);
		if(isIE4) return document.all[id];
		if(isNS4) return document.layers[id];
	}


// showBtn(¹öÆ°width, ½ÇÇàµÉÇÔ¼ö,¹öÆ°TEXT, ¹öÆ°icon,type)
	function showBtn(func,text,type,width,icon)
	{
		   // width ¸¦ ³ÖÀ¸¸é ¾ÆÀÌÄÜÀÇ Å©±â¸¦ Á¶Á¤ÇÒ ¼ö °¡ÀÖ´Ù. Áï ¿©¹éÀ» ÁÙÀÏ ¼ö ÀÖ´Ù.
		   var btn = "";
		   if(icon) icon = "<img src='"+icon+"'> ";
		   else icon = "";
		   var button_style = "background-color:transparent; color:transparent; cursor:hand; border:none; width:" + width;
			
			 if(type == "a")
			{
				// A Type
				btn += "<button onfocus='this.blur()' style='" + button_style + "' onClick=\"" + func + "\">";
				btn += "  <table width='" + width + "' cellspacing='0' cellpadding='0'>";
				btn += "    <tr style='height:23px;'>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_a_l.gif'></td>";
				btn += "      <td style='font-size:9pt; text-align:center; padding:2 0 0 0;' background='/image/make_button/button_a_c.gif'>" + icon + text + "</td>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_a_r.gif'></td>";
				btn += "    </tr>";
				btn += "  </table>";
				btn += "</button>";
			}
			else if(type == "b")
			{
				// B Type
				btn += "<button onfocus='this.blur()' style='" + button_style + "' onClick=\"" + func + "\">";
				btn += "  <table width='" + width + "' cellspacing='0' cellpadding='0'>";
				btn += "    <tr style='height:22px;'>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_b_l.gif'></td>";
				btn += "      <td style='font-size:9pt; text-align:center; padding:2 0 0 0;' background='/image/make_button/button_b_c.gif'>" + icon + text + "</td>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_b_r.gif'></td>";
				btn += "    </tr>";
				btn += "  </table>";
				btn += "</button>";
			}
			else
			{
				// Default Type
				btn += "<button onfocus='this.blur()' style='" + button_style + "' onClick=\"" + func + "\">";
				btn += "  <table width='" + width + "' cellspacing='0' cellpadding='0'>";
				btn += "    <tr style='height:18px;'>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_l.gif'></td>";
				btn += "      <td style='font-size:9pt; text-align:center; padding:0 5 0 5;' background='/image/make_button/button_c.gif'>" + icon + text + "</td>";
				btn += "      <td style='width:5px;' background='/image/make_button/button_r.gif'></td>";
				btn += "    </tr>";
				btn += "  </table>";
				btn += "</button>";
			}
		   document.write(btn);
	}
	function goUrl(url){
		if(url.indexOf("?") == -1) url += "?"+new Date().getTime();
		else url += "&"+new Date().getTime();
		location.href = url;
	}
	function goUrlConfirm(str,url){
		if(!confirm(str)) return;
		if(url.indexOf("?") == -1) url += "?"+new Date().getTime();
		else url += "&"+new Date().getTime();
		location.href = url;
	}


// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	function write_flash_old(movie, width, height, quality, scale, wmode, FlashVars)
	{
		var tag = "<object width='"+width+"' height='"+height+"' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'>";
		tag += "<param name=movie value='"+movie+"'>";

		if(quality != "") tag += "<param name=quality value='"+quality+"'>";
		if(scale != "") tag += "<param NAME=scale VALUE='"+scale+"'> ";
		if(wmode != "") tag += "<param name='wmode' value='"+wmode+"'>";
		if(FlashVars != "") tag += "<param name=FlashVars value='"+FlashVars+"'>";

		tag += "<embed src='"+movie+"' width='"+width+"' height='"+height+"'";
		if(FlashVars != "") tag += " FlashVars='"+FlashVars+"'";
		if(quality != "") tag += " quality='"+quality+"'";
		tag += " pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'></embed>";

		tag += "</object>";

		document.write(tag);
	}

	function write_flash(movie, width, height, quality, scale, wmode, FlashVars)
	{
		var tag = "<object width='"+width+"' height='"+height+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' >";
		tag += "<param name=movie value='"+movie+"'>";
		
		if(scale != "") tag += "<param NAME=scale VALUE='"+scale+"'> ";
		if(wmode != "") tag += "<param name='wmode' value='"+wmode+"'>";
		if(FlashVars != "") tag += "<param name=FlashVars value='"+FlashVars+"'>";
		if(quality != "") tag += "<param name=quality value='"+quality+"'>";
		
		tag += "<embed src='"+movie+"' width='"+width+"' height='"+height+"'";
		if(FlashVars != "") tag += " FlashVars='"+FlashVars+"'";
		if(quality != "") tag += " quality='"+quality+"'";
		tag += " pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'  ></embed>";

		tag += "</object>";

		document.write(tag);
	}


	function write_flash_new(movie, width, height, quality, scale, wmode, FlashVars)
	{
		var tag = "<object width='"+width+"' height='"+height+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' >";
		tag += "<param name=movie value='"+movie+"'>";
		
		if(FlashVars != "") tag += "<param name=FlashVars value='"+FlashVars+"'>";
		if(quality != "") tag += "<param name=quality value='"+quality+"'>";
		
		tag += "<embed src='"+movie+"' width='"+width+"' height='"+height+"'";
		if(FlashVars != "") tag += " FlashVars='"+FlashVars+"'";
		if(quality != "") tag += " quality='"+quality+"'";
		tag += " pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'  ></embed>";

		tag += "</object>";

		document.write(tag);
	}


	// -- ÆäÀÌÁö ÀÌµ¿
	function setPage (){
		if(document.all["url_s"].selectedIndex == 0 ) {document.all["url_s"].selectedIndex = 0; return;}
		window.open("/popup/alim.aspx?url="+document.all["url_s"][document.all["url_s"].selectedIndex].value,"","");
		document.all["url_s"].selectedIndex = 0;
	}


//-- ÀÌ¹ÌÁö »çÀÌÁî·Î ÆË¾÷À» ¿­¾î¼­ º¸¿©ÁÖ±â --//
	function ViewImageOriginal(ifile,ix,iy,ititle) { 
		var win;
		var sWidth;
		var sHeight;
		var NS = (document.layers) ? 1 : 0;
		win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no,resizable=yes");
		if (NS) {
			sWidth = win.innerWidth;
			sHeight = win.innerHeight;
		} else {
			sWidth = win.document.body.clientWidth;
			sHeight = win.document.body.clientHeight;
		}
		/*
		if(sWidth!=ix || sHeight!=iy) {
			win.close();
			setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
			return;
		}
		*/
		win.document.open();
		win.document.write("<html><head><title>"+ititle+"</title>");
		win.document.write("</head><body>");
		win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
		win.document.write("<img src='"+ifile+"'></div></body></html>");
		win.document.close();
	}

	//-- ÀÌ¹ÌÁö »çÀÌÁî·Î ÆË¾÷À» ¿­¾î¼­ º¸¿©ÁÖ±â --//
	function ViewImage(ifile,ix,iy,ititle) { 
		var win;
		var sWidth;
		var sHeight;
		var NS = (document.layers) ? 1 : 0;
		
		if(ix > screen.availWidth) ix = screen.availWidth;
		if(iy > screen.availHeight) iy = screen.availHeight;

		win = window.open("","imageviewer","width="+ix+",height="+iy+",top=0,left=0,menubar=no,toolbar=no,resizable=yes");
		
		if (NS) {
			sWidth = win.innerWidth;
			sHeight = win.innerHeight;
		} else {
			sWidth = win.document.body.clientWidth;
			sHeight = win.document.body.clientHeight;
		}
		/*
		if(sWidth!=ix || sHeight!=iy) {
			win.close();
			setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
			return;
		}
		*/

		win.document.open();
		win.document.write("<html><head><title>"+ititle+"</title>");
		win.document.write("</head><body>");
		win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
		win.document.write("<img src='"+ifile+"' onclick='self.close();' width="+ix+" heght="+iy+" ></div></body></html>");
		win.document.close();
	}

	// ¹®ÀÚ¿­ÀÇ ±æÀÌ
	function strlen(str)
	{
		var len = 0;

		for(i=0; i < str.length; i++)
		{
			var ch = str.charAt(i);
			// 2bytes ¹®ÀÚ
			if(escape(ch).length > 4)
			{
				len += 2;
			}
			// ÁÙ¹Ù²Þ Ç¥½Ã
			else if(ch == '\n')
			{
				if(str.charAt(i-1) != '\r')
					len += 1;
			}
/*
			// HTML ÅÂ±× º¯È¯ (&lt;, &gt;)
			else if(ch == '<' || ch == '>')
			{
				len += 4;
			}
*/
			else
			{
				len += 1;
			}
		}

		return len;
	}