var mmenu = new Array(); // Data¸¦ ´ãÀ» ¹è¿­

// 2Â÷¹è¿­À» ¸¸µé±â À§ÇÑ function
function addData(sseq,uupperSeq,ttile,uurl,ttarget, ssubYn, eengTitle){
	mmenu[sseq] = new Array();
	mmenu[sseq][0] = uupperSeq; // »óÀ§seq
	mmenu[sseq][1] = ttile;     // ¸Þ´º Á¦¸ñ
	mmenu[sseq][2] = uurl;      // URL
	mmenu[sseq][3] = ttarget;   // URLÀÇ Target
	mmenu[sseq][4] = ssubYn;    // ÇÏÀ§¸Þ´º Á¸Àç¿©ºÎ
	mmenu[sseq][5] = eengTitle; // ¸Þ´º ¿µ¹®Á¦¸ñ
	return;
}

// ¸Þ´ºÀÇ Á¦¸ñÀ» ÆäÀÌÁö¿¡ ÀÛ¼ºÇÏ´Â function
function getTitle(sseq){
	document.write(mmenu[sseq][1]);
	return;
}

// ¼­ºêÆäÀÌÁöÀÇ Å« Á¦¸ñÇ¥½Ã function
function getTitleWithSpace(sseq) {
	var temp = mmenu[sseq][1];
	var result = '';

	for (var i=0; i<temp.length; i++) {
		result = result + temp.charAt(i);
		if (i < (temp.length-1)) {
			result = result + "&nbsp;";
		}
	}

	document.write(result);
	return;
}

// history¸¦ ±¸¼ºÇÏ±â À§ÇÑ function
function historyWrite(sseq){
	var HistoryTmp  = "";
	var seqTmp      = sseq;
	var upperSeqTmp = -1;

	// ¹«ÇÑ¹Ýº¹À» ¸·±âÀ§ÇØ for¹®ÀÌ¿ë 1000¹øÀ¸·Î Á¦ÇÑ
	for(i=0; i<1000 && seqTmp!=upperSeqTmp; i++){
		if(HistoryTmp=="")
			HistoryTmp  = " / " + "<a href=\""+mmenu[seqTmp][2]+"\" target=\""+mmenu[seqTmp][3]+"\" style=\"font-family:Arial;font-size:8pt; FONT-WEIGHT:bold;color:#777777;text-decoration:none;\">"+mmenu[seqTmp][1]+"</a>" + HistoryTmp;
		else
			HistoryTmp  = " / " + "<a href=\""+mmenu[seqTmp][2]+"\" target=\""+mmenu[seqTmp][3]+"\" style=\"font-family:Arial;font-size:8pt;color:#777777;text-decoration:none;\">"+mmenu[seqTmp][1]+"</a>" + HistoryTmp;

		seqTmp      = mmenu[seqTmp][0];
		upperSeqTmp = mmenu[seqTmp][0];
	}
	if(sseq!=0)
	HistoryTmp = " / <a href=\"/info_tech/\" target=\"_top\" style=\"font-family:Arial;font-size:8pt;color:#777777;text-decoration:none;\">Á¤º¸±â¼ú¿ø</a>"+HistoryTmp;

	document.write(HistoryTmp);
	return;
}

// ¸Þ´º¸¦ ±¸¼ºÇÏ´Â function
function menuWrite(sseq){
	var sseq2 = -100; // ½ÇÁ¦ ¸Þ´º¸¦ º¸¿©ÁÖ°Ô µÉ seq¸¦ ´ãÀ» º¯¼ö ÄÚµåÀÇ ¸Þ´º°¡ ÇÏÀ§¸Þ´º¸¦ °®´À³Ä ¾È°®´À³Ä¿¡ ´Þ·ÁÀÖ´Ù.
	if(mmenu[sseq][4]=='N') sseq2=mmenu[sseq][0]; // sseqÀÇ ¸Þ´º°¡ ÇÏÀ§¸Þ´º°¡ ¾øÀ»¶§´Â ±×°ÍÀÇ »óÀ§ ¸Þ´º°¡ º¸¿©Áø´Ù.
	else                    sseq2=sseq;           // sseqÀÇ ¸Þ´º°¡ ÇÏÀ§¸Þ´º°¡ ÀÖÀ»¶§´Â ÇØ´ç ¸Þ´º°¡ º¸¿©Áø´Ù.

	document.write("<table width=\"160\" bgcolor=\"#E5E5E5\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr>");
	document.write("<td height=\"58\" bgcolor=\"#CCCCCC\" style=\"PADDING-TOP:2px;BORDER-BOTTOM:2px solid #999999;\">");
	document.write("<table width=\"145\" cellspacing=\"0\" cellpadding=\"0\" style=\"COLOR:#777777;FILTER:blur(add=1,direction=90,strength=2);\">");
	document.write("<tr>");
	document.write("<td align=\"right\" style=\"FONT-FAMILY:¹ÙÅÁ;FONT-SIZE:16px;FONT-WEIGHT:bold;\">");
	document.write(mmenu[sseq2][1]);
	document.write("</td>");
	document.write("</tr>");
	//document.write("<tr>");
	//document.write("<td align=\"right\" style=\"FONT-FAMILY:±¼¸²;FONT-SIZE:12px;\">");
	//document.write(mmenu[sseq2][5]);
	//document.write("</td>");
	//document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td align=\"center\">");
	document.write("<table width=\"145\" cellspacing=\"0\" cellpadding=\"0\" style=\"FONT-FAMILY:±¼¸²; FONT-SIZE:12px; FILTER: blur(add=1,direction=90, strength=2);\">");

	for(i=0; i<mmenu.length; i++){
		if(mmenu[i]!=null&&mmenu[i][0]==sseq2&&i!=0){
			document.write("<tr>");
			document.write("<td align=\"right\" height=\"29\"style=\"border-bottom:1px dashed #999999;PADDING-TOP:4px;\">");
			document.write("<a href=\""+mmenu[i][2]+"\" target=\""+mmenu[i][3]+"\" style=\"color:#777777;text-decoration:none;\">");
			document.write(mmenu[i][1]);
			document.write("</a>");
			document.write("</td>");
			document.write("</tr>");
		}
	}

	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("<div id=\"ttop\" style=\"position:absolute;left:0px;top:0px;\"></div>");
	return;
}


// top ¹öÆ°À» À§ÇÑ ½ºÅ©¸³Æ® ===========================

var Hoffset=810; // È­¸éÀÇ ¿ÞÂÊ   ¿©¹é
var Voffset=25;  // È­¸éÀÇ ¾Æ·¡ÂÊ ¿©¹é


var ie_ccheck   = document.all && navigator.userAgent.indexOf("Opera") == -1; // ºê¶ó¿ìÀú Á¾·ùÈ®ÀÎ
var written_obj ; // htmlÀ» ¾²±âÀ§ÇÑ °´Ã¼
var dsocleft    ; // ½ºÅ©·ÑµÈ xÁÂÇ¥

function write_html(){
	var htmlString = "<table cellspacing='0' cellpadding='0' width='35' bgcolor='#FFFFFF'>";
	htmlString    += "<tr>";
	htmlString    += "<td align='center'>";
	htmlString    += "<a href='javascript:window.scroll(0,0)' style='font-family:Arial;font-size:12px;color:#666666;text-decoration:none;'><img src='/image/button_gotop.gif' border='0'></a>";
	htmlString    += "</td>";
	htmlString    += "</tr>";
	htmlString    += "</table>";
	if(written_obj!=null){
		if (ie_ccheck||document.getElementById){
			written_obj.innerHTML=htmlString;
		}
		else if (document.layers){
			written_obj.document.write(htmlString);
			written_obj.document.close();
		}
	}
}

function position_init(){
	written_obj = ie_ccheck? document.all.ttop : document.getElementById? document.getElementById("ttop") : document.ttop
	dsocleft = ie_ccheck ? document.body.scrollLeft : pageXOffset;

	var dsoctop  = ie_ccheck ? document.body.scrollTop  : pageYOffset;
	var window_height = ie_ccheck ? document.body.clientHeight : window.innerHeight;

	if(written_obj!=null){
		if (ie_ccheck || document.getElementById){
			written_obj.style.left = Hoffset;
			written_obj.style.top  = parseInt(dsoctop) + parseInt(window_height) - Voffset;
		}
		else if (document.layers){
			written_obj.left = Hoffset;
			written_obj.top  = dsoctop + window_height - Voffset;
		}
	}
}

function beingwatermark(){
	position_init();
	setInterval("position_init()",500);
	write_html();
}

if (ie_ccheck||document.getElementById||document.layers) window.onload=beingwatermark;

// »çÀÌÆ®¸Ê ±¸¼ºÀ» À§ÇÑ ½ºÅ©¸³Æ® ===========================
/* ÄÃ·¯ÁöÁ¤
 * width - Å×ÀÌºí³Êºñ
 * color1 - Å«Á¦¸ñ ¹è°æ»ö
 * color2 - Å«Á¦¸ñ ±ÛÀÚ»ö, ÇÏÀ§¸Þ´º ±ÛÀÚ»ö, Á¡¼±»ö
 * color3 - ÇÏÀ§¸Þ´º ¹è°æ»ö
 * color4 - ÇÏÀ§ÀÇ ÇÏÀ§¸Þ´º ±ÛÀÚ»ö
 * color5 - ÇÏÀ§ÀÇ ÇÏÀ§¸Þ´º ¹è°æ»ö
 * color6 - °ø¹é»ö
*/
function sitemapWrite(sseq, width, color1, color2, color3, color4, color5, color6){

	document.write("<table width=\""+width+"\" height=\"100%\" bgcolor=\""+color6+"\" cellspacing=\"0\" cellpadding=\"0\">");
	document.write("<tr>");
	document.write("<td height=\"58\" bgcolor=\""+color1+"\" style=\"PADDING-TOP:2px;BORDER-BOTTOM:2px solid #6A9FAF;\">");
	document.write("<table width=\""+(width-6)+"\" cellspacing=\"0\" cellpadding=\"0\" style=\"COLOR:"+color2+";FILTER:blur(add=1,direction=90,strength=2);\">");
	document.write("<tr>");
	document.write("<td align=\"left\" style=\"FONT-FAMILY:¹ÙÅÁ;FONT-SIZE:16px;FONT-WEIGHT:bold;PADDING-LEFT:10px\">");
	document.write(mmenu[sseq][1]);
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td align=\"left\" style=\"FONT-FAMILY:±¼¸²;FONT-SIZE:12px;PADDING-LEFT:10px\">");
	document.write(mmenu[sseq][5]);
	document.write("</td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td align=\"center\" valign=\"top\">");
	document.write("<table width=\""+width+"\" cellspacing=\"0\" cellpadding=\"0\" style=\"FONT-FAMILY:±¼¸²; FONT-SIZE:12px; FILTER: blur(add=1,direction=90, strength=2);\">");

	for(i=0; i<mmenu.length; i++){
		if(mmenu[i]!=null&&mmenu[i][0]==sseq){
			document.write("<tr>");
			document.write("<td align=\"right\" height=\"29\"style=\"border-bottom:1px dashed "+color2+";PADDING-TOP:4px;PADDING-RIGHT:10px;\" bgcolor=\""+color3+"\">");
			document.write("<a href=\""+mmenu[i][2]+"\" target=\""+mmenu[i][3]+"\" style=\"color:"+color2+";text-decoration:none;\">"+mmenu[i][1]+"</a> <img src=\"/image/sub_history_01.gif\">");
			document.write("</td>");
			document.write("</tr>");

			if(mmenu[i][4] == 'Y'){
				for(j=0; j<mmenu.length; j++){
					if(mmenu[j]!=null&&mmenu[j][0]==i){
						document.write("<tr bgcolor=\"#"+color5+"\">");
						document.write("<td align=\"right\" height=\"29\"style=\"border-bottom:1px dashed "+color2+";PADDING-TOP:4px;PADDING-RIGHT:20px;\" bgcolor=\""+color5+"\">");
						document.write("<a href=\""+mmenu[j][2]+"\" target=\""+mmenu[j][3]+"\" style=\"color:"+color4+";text-decoration:none;\">"+mmenu[j][1]+"</a>");
						document.write("</td>");
						document.write("</tr>");
					}
				}
			}
		}
	}

	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr><td bgcolor=\""+color6+"\">&nbsp;</td></tr>");
	document.write("</table>");
	return;
}