document.write("<style>");
document.write("#footer_btn { margin-bottom:23px; margin-top:50px;text-align:right; border-bottom:1px solid #ccc; padding-bottom:7px;}");
document.write("ul.footerlink li{  float:left; padding-right:12px;  }");
document.write("#footer1 {float:left; width:742px; border-top:0px solid #ccc; text-align:left;}");
document.write("#footer1 .fmnew {float:left; padding-top:0px; margin:0; border:none; text-align:left;}");
document.write("#footer1 .fmnew li {float:left;  padding:0 7px 0 7px; margin:0; background:url('/octogallery/img/newmain/footer_bg.gif') no-repeat 3px right; text-align:left; cursor:hand;}");
document.write("#footer1 li.firstnew {padding-left:0;}");
document.write("#footer1 li.lastnew {float:left; background:none;}");
document.write("#footer1 li.copynew {clear:left; background:none; padding:2px 2px 2px 0px; text-align:left; cursor:none;}");
document.write("</style>");

document.write("<div id='footer_btn'>");
document.write("	<a href='javascript:cntLayer(SLayer_Comment);'><img src='/image/common/button/btn_comment.gif' border='0' alt='ÇÑÁÙÀÇ°ß' align='absmiddle' /></a><a href='#top'><img src='/image/common/button/btn_top.gif' border='0' alt='topÀ¸·Î ÀÌµ¿' align='absmiddle' /></a>");
document.write("</div>");

document.write("<div id='footer1' style='width:686px; '>");
document.write("	<div style='float:right; margin-top:-9px;'>");
document.write("		<img src='/octogallery/img/newmain/footer_logo.gif ' border='0' alt='' align='absmiddle' vspace='10' />");
document.write("	</div>");
document.write("	<ul class='fmnew'>");
document.write("		<li class='firstnew'><a href='/guide/new/stipul/privacyinfo.html?fview=01'><img src='/octogallery/img/newmain/txt_footer01.gif' border='0' alt='°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§' align='absmiddle' /></a></li>");
document.write("		<li><a href='/guide/download/trading.html'><img src='/octogallery/img/newmain/txt_footer02.gif' border='0' alt='´Ù¿î·Îµå' align='absmiddle' /></a></li>");
document.write("		<li><a href='/certif/guide.jsp'><img src='/octogallery/img/newmain/txt_footer03.gif' border='0' alt='°øÀÎÀÎÁõ¼¾ÅÍ' align='absmiddle' /></a></li>");
document.write("		<li><a href='/sitemap/sitemap.jsp'><img src='/octogallery/img/newmain/txt_footer04.gif' border='0' alt='»çÀÌÆ®¸Ê' align='absmiddle' /></a></li>");
document.write("		<li><a href='/company/branch/local.html'><img src='/octogallery/img/newmain/txt_footer05.gif' border='0' alt='¿µ¾÷Á¡¾È³»' align='absmiddle' /></a></li>");
document.write("		<li class='lastnew'><a href='/guide/say/center.html'><img src='/octogallery/img/newmain/txt_footer06.gif' border='0' alt='°í°´Áö¿ø¼¾ÅÍ1544-0000' align='absmiddle' /></a></li>");
document.write("		<li class='copynew'><img src='/octogallery/img/newmain/footer_copy.gif' border='0' alt='' align='absmiddle' /></li>");
document.write("	</ul>");
document.write("</div>");
document.write("<p class='m03'></p>");

document.write("<!-- ·¹ÀÌ¾îÆË¾÷ - ÇÑÁÙÀÇ°ß -->");
document.write("<script type=text/javascript language=javascript src=/js/layer/SLayer_Comment.js></script>");
document.write("<script type=text/javascript language=javascript src=/js/layer/SLayer_Comment_2.js></script>");
document.write("	<script type=text/javascript language=javascript src=/js/layer/BLayer_Board_Detail03.js></script>");

/********************************************************************************************************
	Layer Popup Function
********************************************************************************************************/
// Layer Popup Áß¾Ó¿¡ ¸ÂÃß±â
function quickSelectHidden() {
	try {
		selectCnt = contents.document.body.getElementsByTagName("select").length;
		for (i = 0; i < selectCnt; i++)
			contents.document.body.getElementsByTagName("select")[i].style.display = "none";
	} catch(e) {
	}
}
function quickSelectBlock() {
	try {
		selectCnt = contents.document.body.getElementsByTagName("select").length;
		for (i = 0; i < selectCnt; i++)
			contents.document.body.getElementsByTagName("select")[i].style.display = "";
	} catch(e) {
		//alert(e.message);
	}
} 
//ÀüÃ¼º¸±â ¸Þ´º º¸ÀÌ´Â ½ºÅ©¸³Æ® ±è¿¬¼º 20100108
function menuView(args) {
	var allView = document.getElementById('allView');
	if(args == "0") {	// flash div ¿­±â
		if (allView.innerHTML == "") {
			try {
				// ÁÖ½Ä¼±¹°¿É¼Ç SelectBox Á¦°Å
				quickSelectHidden();
				document.body.style.overflow='hidden';
				if (totalmenuseq == undefined) {
					totalmenuseq = "0000000000";
				}
				var one=totalmenuseq.substring(0,2);
				var two=totalmenuseq.substring(2,4);
				var three=totalmenuseq.substring(4,6);
				
				flash = new SWFObject("/octogallery/flash/newflash/total_menu.swf?oneDepth="+one+"&twoDepth="+two+"&threeDepth="+three, "allMenu", "711", "512", "9.0.47", "#FFFFFF");
				flash.addParam("quality", "best");
				flash.addParam("wmode", "transparent");
				flash.write(allView);
				allView.style.width = "711";
				allView.style.height = "512";
				top.iflg_body.iflg_main.iflg_contents.scrollTo(0,0);
				if (document.getElementById("mplayerid") != null) {
					document.getElementById("MediaPlayer1").Stop();
				}
			} catch(e) {
				//alert(e.message);
			}
		}
	} else {	// flash div ´Ý±â
		try {
			// ÁÖ½Ä¼±¹°¿É¼Ç SelectBox º¸±â
			quickSelectBlock();
			document.body.style.overflow='';
			allView.innerHTML = "";
			allView.style.width = "0";
			allView.style.height = "0";
			if (document.getElementById("mplayerid") != null) {
				document.getElementById("MediaPlayer1").Play();
			}
		} catch(e) {
			//alert(e.message);
		}
	}
}

function flashLocation(url, seq, xecureLink) {
	if(url.indexOf("^popup^") > -1) {
		var realUrl = url.replace("^popup^", "");
		if(url.indexOf("/stocks/SG0100/SG0110/stocks_total1.htm") > -1) {
			if($.cookie("IFLGUID") == null) {
				alert("·Î±×ÀÎ ÈÄ \"ÁÖ½ÄÁ¾ÇÕÈ­¸é\"¸Þ´º¸¦ ´Ù½Ã Å¬¸¯ÇØ ÁÖ¼¼¿ä.");
			} else {
				window.open(realUrl, "stocks_total1", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=1,top=0,left=0,width=1010,height=710");
			}
		} else {
			var popupName = realUrl.substring(realUrl.lastIndexOf("/")+1).split(".")[0];
			//alert(realUrl);
			window.open(realUrl, popupName, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=1,top=0,left=0,width=1010,height=710");
		}
	} else if(url.indexOf("/octogallery/main_octogallery.html") > -1) {
		top.iflg_body.location.href = "/include/main_krim.jsp?url="+escapeUrl(url)+"&seq="+seq+"&xecureLink="+xecureLink;
	} else {
		if(url == "/eng/index.jsp") {	//¿µ¹®(English)À» Å¬¸¯ÇßÀ»¶§
			location.href = url;
		} else {
			url = escapeUrl(url);
			if (url.indexOf("?") > -1)
				location.href= url.replace("%26","&") + "&seq="+seq+"&xecureLink="+xecureLink;
			else
            	location.href= url + "?seq="+seq+"&xecureLink="+xecureLink;
		}
	}
}

function cntLayer(obj) {
	var w = obj.style.width;
	var h = obj.style.height;
	w = parseInt(w.substring(0,w.length-2));
	h = parseInt(h.substring(0,h.length-2));

	var posW = ((686 - w) / 2) + 24;
	var posH = (( document.body.clientHeight - h) / 2 )+ document.body.scrollTop;

	if(posH < 20){
		posH = 20;
	}
	obj.style.display = "block";
	obj.style.left = posW;
	obj.style.top = posH;
}

function includeJs(url, callback){
	var html_doc = document.getElementsByTagName('head')[0];

	var js = document.createElement('script');
	js.setAttribute('type', 'text/javascript');
	js.setAttribute('src', url);
	html_doc.appendChild(js);

	if(/WebKit|Khtml/i.test(navigator.userAgent)){
		var iframe = document.createElement('iframe');
		iframe.style.display = 'none';
		iframe.setAttribute('src',url);

		document.getElementsByTagName('body').item(1).appendChild(iframe);

		// Fires in Saf
		iframe.onload = function() {

			 callback();
			 //alert('JS iframe fired');
		};
	}
	// Fires in IE, also modified the test to cover both states
	js.onreadystatechange = function () {
		if (/complete|loaded/.test(js.readyState)) {
			callback();
			//alert('JS onreadystate fired');
		}
	};
	// Fires in FF
	js.onload = function (){

		callback();
		//alert('JS onload fired');
	};
}
function init1(){
	includeJs("/js/common/jquery.js", init2);
}
function init2(){
	includeJs("/js/common/common.js", init3);
}
function init3(){
	if(typeof(PrintObjectTag)=="function"){
		includeJs("/flash/toolbar/swfobject.js", init5);
	}else{
		includeJs("/flash/toolbar/swfobject.js", init4);
	}
}
function init4(){
	includeJs("/XecureObject/global_xecureweb.js", init5);
	//includeJs("/XecureObject/xecureweb.js", init5);
}
function init5(){
	includeJs("/js/common/toolbar_make.js", init6);
}
function init6(){
	includeJs("/js/common.js", flashMakeInit);
}

window.attachEvent("onload", init1);