// GNB
function Navigation(seq, navID) {
	nav = document.getElementById(navID);
	nav.menu = new Array();
	nav.current = null;
	nav.menuseq = 0;
	navLen = nav.childNodes.length;
	allA = nav.getElementsByTagName("a")
	for(k = 0; k < allA.length; k++) {
		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
			nav.isOver = true;
		}
		allA.item(k).onmouseout = allA.item(k).onblur = function () {
			nav.isOver = false;
			setTimeout(function () {
				if (nav.isOver == false) {
					if (nav.menu[seq])
						nav.menu[seq].onmouseover();
					else if(nav.current) {

						if (nav.current.submenu)
							nav.current.submenu.style.visibility = "hidden";
						nav.current = null;
					}
				}
			}, 500);
		}
	}

	for (i = 0; i < navLen; i++) {
		navItem = nav.childNodes.item(i);
		if (navItem.tagName != "LI")
			continue;

		navAnchor = navItem.getElementsByTagName("a").item(0);
		navAnchor.submenu = navItem.getElementsByTagName("div").item(0);

		navAnchor.onmouseover = navAnchor.onfocus = function () {
			if (nav.current) {

				if (nav.current.submenu)
					nav.current.submenu.style.visibility = "hidden";
				nav.current = null;
			}
			if (nav.current != this) {

				if (this.submenu)
					this.submenu.style.visibility = "visible";
				nav.current = this;
			}
			nav.isOver = true;
		}
		nav.menuseq++;
		nav.menu[nav.menuseq] = navAnchor;
	}
	if (nav.menu[seq])
		nav.menu[seq].onmouseover();
}


// Tab Content
function initTabMenu3(tabContainerID, tabClassName){
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == tabClassName)
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);

		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_o.gif", ".gif");
					currentmenu.className = currentmenu.className.replace( "_over", "");
				} else {
					currentmenu.className = currentmenu.className.replace("_over", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_o.gif");
				this.className += "_over";
			} else {
				this.className += "_over";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

// Tab Content
function initTabMenu(tabContainerID, tabClassName, tabNum, tabBtnFormat) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == tabClassName)
			thismenu = tabAnchor.item(i);
		else
			continue;

		if (thismenu.href.split("#")[1] == "prev" || thismenu.href.split("#")[1] == "next") {

			thismenu.onclick = function btnNextClick() {

				currentmenu = tabContainer.current;

				var _prefix = "photo", _btnNum = 3;

				if (tabBtnFormat != null && tabBtnFormat != "") {
					_prefix = tabBtnFormat.split("^")[0];
					_btnNum = parseInt(tabBtnFormat.split("^")[1], 10);
				}
				_targetElId = parseInt(currentmenu.targetEl.id.replace(_prefix, ""), 10);
				if (this.href.split("#")[1] == "prev")
					_targetElId = (_targetElId - 1 == 0 ? _btnNum : (_targetElId - 1));
				else
					_targetElId = (_targetElId + 1 == (_btnNum + 1) ? 1 : (_targetElId + 1));
				_targetElId = _prefix + (_targetElId < 10 ? '0' + _targetElId : _targetElId);

				_tabAnchor = document.getElementById(tabContainerID).getElementsByTagName("a");
				for (i = 0; i < _tabAnchor.length; i++) {
					if (tabAnchor.item(i).className == tabClassName && tabAnchor.item(i).href.split("#")[1] == _targetElId) {
						tabAnchor.item(i).onclick();
						break;
					}
				}

				return false;
			};

			continue;
		}

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";

		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				currentmenu.className = currentmenu.className.replace("_over", "");
			}
			this.targetEl.style.display = "";
			this.className += "_over";

			this.container.current = this;

			return false;
		};

		 if (tabNum != null && tabNum != "" && tabNum == parseInt(tabAnchor.item(i).href.split("#")[1].substr(tabAnchor.item(i).href.split("#")[1].length - 2, 2), 10))
			thismenu.container.first = thismenu;
		else if (!thismenu.container.first)
   thismenu.container.first = thismenu;
}
if (tabContainer.first)
	tabContainer.first.onclick();
}


function initTabMenuOver(tabContainerID, tabClassName, tabNum, tabBtnFormat) {
	    var tabContainer = document.getElementById(tabContainerID);
	    var tabAnchor = tabContainer.getElementsByTagName("a");
	    var i = 0;

	    for(i=0; i<tabAnchor.length; i++) {
		    if (tabAnchor.item(i).className == tabClassName)
			    thismenu = tabAnchor.item(i);
		    else
			    continue;

            if (thismenu.href.split("#")[1] == "prev" || thismenu.href.split("#")[1] == "next") {

                thismenu.onclick = function btnNextClick() {

                    currentmenu = tabContainer.current;

                    var _prefix = "photo", _btnNum = 3;

                    if (tabBtnFormat != null && tabBtnFormat != "") {
                        _prefix = tabBtnFormat.split("^")[0];
                        _btnNum = parseInt(tabBtnFormat.split("^")[1], 10);
                    }
                    _targetElId = parseInt(currentmenu.targetEl.id.replace(_prefix, ""), 10);
                    if (this.href.split("#")[1] == "prev")
                        _targetElId = (_targetElId - 1 == 0 ? _btnNum : (_targetElId - 1));
                    else
                        _targetElId = (_targetElId + 1 == (_btnNum + 1) ? 1 : (_targetElId + 1));
                    _targetElId = _prefix + (_targetElId < 10 ? '0' + _targetElId : _targetElId);

                    _tabAnchor = document.getElementById(tabContainerID).getElementsByTagName("a");
                    for (i = 0; i < _tabAnchor.length; i++) {
                        if (tabAnchor.item(i).className == tabClassName && tabAnchor.item(i).href.split("#")[1] == _targetElId) {
                            tabAnchor.item(i).onclick();
                            break;
                        }
                    }

                    return false;
                };

                continue;
            }

		    thismenu.container = tabContainer;
		    thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		    thismenu.targetEl.style.display = "none";

		    thismenu.onmouseover = thismenu.onfocus = function tabMenuClick() {
			    currentmenu = this.container.current;
			    if (currentmenu == this)
				    return false;

			    if (currentmenu) {
				    currentmenu.targetEl.style.display = "none";
				    currentmenu.className = currentmenu.className.replace("_over", "");
			    }
			    this.targetEl.style.display = "";
			    this.className += "_over";

			    this.container.current = this;

			    return false;
		    };

			 if (tabNum != null && tabNum != "" && tabNum == parseInt(tabAnchor.item(i).href.split("#")[1].substr(tabAnchor.item(i).href.split("#")[1].length - 2, 2), 10))
                thismenu.container.first = thismenu;
            else if (!thismenu.container.first)
       thismenu.container.first = thismenu;
	}

}

function initTabMenuClick(tabContainerID, tabClassName, tabNum, tabBtnFormat) {
	    var tabContainer = document.getElementById(tabContainerID);
	    var tabAnchor = tabContainer.getElementsByTagName("a");
	    var i = 0;

	    for(i=0; i<tabAnchor.length; i++) {
		    if (tabAnchor.item(i).className == tabClassName)
			    thismenu = tabAnchor.item(i);
		    else
			    continue;

            if (thismenu.href.split("#")[1] == "prev" || thismenu.href.split("#")[1] == "next") {

                thismenu.onclick = function btnNextClick() {

                    currentmenu = tabContainer.current;

                    var _prefix = "photo", _btnNum = 3;

                    if (tabBtnFormat != null && tabBtnFormat != "") {
                        _prefix = tabBtnFormat.split("^")[0];
                        _btnNum = parseInt(tabBtnFormat.split("^")[1], 10);
                    }
                    _targetElId = parseInt(currentmenu.targetEl.id.replace(_prefix, ""), 10);
                    if (this.href.split("#")[1] == "prev")
                        _targetElId = (_targetElId - 1 == 0 ? _btnNum : (_targetElId - 1));
                    else
                        _targetElId = (_targetElId + 1 == (_btnNum + 1) ? 1 : (_targetElId + 1));
                    _targetElId = _prefix + (_targetElId < 10 ? '0' + _targetElId : _targetElId);

                    _tabAnchor = document.getElementById(tabContainerID).getElementsByTagName("a");
                    for (i = 0; i < _tabAnchor.length; i++) {
                        if (tabAnchor.item(i).className == tabClassName && tabAnchor.item(i).href.split("#")[1] == _targetElId) {
                            tabAnchor.item(i).onclick();
                            break;
                        }
                    }

                    return false;
                };

                continue;
            }

		    thismenu.container = tabContainer;
		    thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		    thismenu.targetEl.style.display = "none";

		    thismenu.onclick = function tabMenuClick() {
			    currentmenu = this.container.current;
			    if (currentmenu == this)
				    return false;

			    if (currentmenu) {
				    currentmenu.targetEl.style.display = "none";
				    currentmenu.className = currentmenu.className.replace("_over", "");
			    }
			    this.targetEl.style.display = "";
			    this.className += "_over";

			    this.container.current = this;

			    return false;
		    };

			 if (tabNum != null && tabNum != "" && tabNum == parseInt(tabAnchor.item(i).href.split("#")[1].substr(tabAnchor.item(i).href.split("#")[1].length - 2, 2), 10))
                thismenu.container.first = thismenu;
            else if (!thismenu.container.first)
       thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

// Adjust Layout
window.onload = function() {
	window.setInterval(function() {
		bodyEl = document.getElementById("body");
		subEl = document.getElementById("sub");
		if (!bodyEl || !subEl)
			return;
		if (bodyEl.offsetHeight < subEl.offsetHeight +  25) {
			bodyEl.style.height = subEl.offsetHeight + "px";
		}
	}, 200);
}


// LNB
function imgMenuOver(containderID) {
	var objwrap = document.getElementById(containderID);
	var imgMenu = objwrap.getElementsByTagName("a");

	for (i=0; i<imgMenu.length; i++) {
		if(imgMenu[i].getElementsByTagName("img").length == 0) continue;

		if (imgMenu[i].getElementsByTagName("img")[0].src.indexOf("_o.gif") != -1 ) {
			continue;
		}
		imgMenu[i].onmouseover = function() {
			subImage = this.getElementsByTagName("img")[0];
			if (subImage.src.indexOf("_o.gif") != -1) return false;
			subImage.src = subImage.src.replace(".gif","_o.gif");
		}
		imgMenu[i].onfocus = function() {
			subImage = this.getElementsByTagName("img")[0];
			if (subImage.src.indexOf("_o.gif") != -1) return false;
			subImage.src = subImage.src.replace(".gif","_o.gif");
		}
		imgMenu[i].onmouseout = function() {
			subImage = this.getElementsByTagName("img")[0];
			subImage.src = subImage.src.replace("_o.gif", ".gif");
		}
		imgMenu[i].onblur = function() {
			subImage = this.getElementsByTagName("img")[0];
			subImage.src = subImage.src.replace("_o.gif", ".gif");
		}
	}
}

function initOver(tabContainerID, tabClassName){
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == tabClassName)
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);

		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_o.gif", ".gif");
					currentmenu.className = currentmenu.className.replace( "_over", "");
				} else {
					currentmenu.className = currentmenu.className.replace("_over", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_o.gif");
				this.className += "_over";
			} else {
				this.className += "_over";
			}
			this.container.current = this;

			return false;
		};

	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}
// layer open,close
function intOpen(){
	if (document.getElementById("open").style.display == 'none')
	{
		document.getElementById("open").style.display = 'block';
		document.getElementById("onestop_panel").style.display = 'none';
	}
	else if (document.getElementById("open").style.display == 'block')
	{
		document.getElementById("onestop_panel").style.display = 'block';
		document.getElementById("open").style.display = 'none';
	}
}
function intClose(){
	document.getElementById("onestop_panel").style.display = 'none';
	document.getElementById("open").style.display = 'block';
	/* document.getElementById("main_head").style.height = '160px'; */
}

function intOpen2(){
	document.getElementById("open02").style.display = 'none';
	document.getElementById("onestop_panel02").style.display = 'block';
	/* document.getElementById("main_head").style.height = '370px'; */
}
function intClose2(){
	document.getElementById("onestop_panel02").style.display = 'none';
	document.getElementById("open02").style.display = 'block';
	/* document.getElementById("main_head").style.height = '160px'; */
}


//---보기
function View(Layer,cname) {
	document.getElementById(Layer).style.display = 'block';
	document.getElementById(Layer).className = cname;
}

function MouseOver(Layer,cname) {
var max = 6;
	for(i=1;i<=max;i++){
		document.getElementById(Layer+i).style.display = 'none';
	}
	document.getElementById(Layer).className = cname;
	document.getElementById(Layer+num).style.display = "block";
}


function Close(Layer) {
	document.getElementById(Layer).style.display = 'none';

}
//------   end


//--- 리플라이 오픈
function Reply(Layer) {
	document.getElementById(Layer).style.display = 'block';
}

function Close(Layer) {
	document.getElementById(Layer).style.display = 'none';

}
//------   end




function over(num,sub){
var max = 4;
for(i=1;i<=max;i++){
	document.getElementById("overLayer"+i).style.display = "none";
	if (sub == "busi") {
		document.getElementById("nums"+i).src = eval('"/images/icon/num20'+i+'.gif"');
	}
	else if (sub == "spc") {
		document.getElementById("nums"+i).src = eval('"/images/icon/num30'+i+'.gif"');
	}
	else if (sub == "en") {
		document.getElementById("nums"+i).src = eval('"/images/icon/num40'+i+'.gif"');
	}
	else if (sub == "sports") {
		document.getElementById("nums"+i).src = eval('"/images/icon/num50'+i+'.gif"');
	}
	else if (sub == "opi") {
		document.getElementById("nums"+i).src = eval('"/images/icon/num60'+i+'.gif"');
	}
	else {
		document.getElementById("nums"+i).src = eval('"/images/icon/num0'+i+'.gif"');
	}
}
	if (sub == "busi") {
		document.getElementById("nums"+num).src = eval('"/images/icon/num20'+num+'_on.gif"');
	}
	else if (sub == "spc") {
		document.getElementById("nums"+num).src = eval('"/images/icon/num30'+num+'_on.gif"');
	}
	else if (sub == "en") {
		document.getElementById("nums"+num).src = eval('"/images/icon/num40'+num+'_on.gif"');
	}
	else if (sub == "sports") {
		document.getElementById("nums"+num).src = eval('"/images/icon/num50'+num+'_on.gif"');
	}
	else if (sub == "opi") {
		document.getElementById("nums"+num).src = eval('"/images/icon/num60'+num+'_on.gif"');
	}
	else {
		document.getElementById("nums"+num).src = eval('"/images/icon/num0'+num+'_on.gif"');
	}
		document.getElementById("overLayer"+num).style.display = "block";
}


function subover(num,Layer){
	document.getElementById(Layer).src = eval('"/images/smp/smp0'+num+'.gif"');
}

function numover(num){
var max = 5;
	for(i=1;i<=max;i++){
		document.getElementById("overLayer"+i).style.display = "none";
		document.getElementById("nums"+i).src = eval('"/images/icon/num_0'+i+'_off.gif"');
	}
		document.getElementById("nums"+num).src = eval('"/images/icon/num_0'+num+'_on.gif"');
		document.getElementById("overLayer"+num).style.display = "block";
}

function change(){
	if (document.getElementById("open").style.display == 'none')
	{
		document.getElementById("open").style.display = 'block';
		document.getElementById("onestop_panel").style.display = 'none';
	}
	else if (document.getElementById("open").style.display == 'block')
	{
		document.getElementById("onestop_panel").style.display = 'block';
		document.getElementById("open").style.display = 'none';
	}
}

function change2(){
	if (document.getElementById("open02").style.display == 'none')
	{
		document.getElementById("open02").style.display = 'block';
		document.getElementById("onestop_panel02").style.display = 'none';
	}
	else if (document.getElementById("open02").style.display == 'block')
	{
		document.getElementById("onestop_panel02").style.display = 'block';
		document.getElementById("open02").style.display = 'none';
	}
}

/* 화살표 이동 */
function display_change(tn,n,t) {
	for (i=1; i<=t; i++) {
		if (i==n) document.getElementById(tn+i).style.display='block';
		else document.getElementById(tn+i).style.display='none';
	}
}


function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no,status=1') } //Popup(스크롤바없음)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(스크롤바있음)
function newwin(url){ window.open(url,'new','location=1,directories=1,resizable=1,status=1,toolbar=1,menubar=1,scrollbars=1') } //NewPopup(스크롤바없음)


// layer open,close

function LayerOpens(layerID,n){
	var Layer = document.getElementById(layerID);
	var Layer2 = document.getElementById("u"+layerID);

		if(Layer.style.display == 'block') {
			Layer.style.display = 'none';
			Layer2.className="plus";
		}
		else {
			Layer.style.display = 'block';
			Layer2.className="minus";
		}
}

//----------- footer

function footer(){
	document.write("\
	<div class='com_info'>\
		<div class='com_info_r'>\
			<ul>\
				<li><a href='#'><img src='/images/footer/t_foot_01.gif' alt='About Herald Media' width='114' height='14' /></a></li>\
				<li><a href='#'><img src='/images/footer/t_foot_02.gif' alt='About Korea Herald' width='115' height='14' /></a></li>\
				<li><a href='#'><img src='/images/footer/t_foot_03.gif' alt='CEO Message' width='81' height='14' /></a></li>\
				<li><a href='#'><img src='/images/footer/t_foot_04.gif' alt='History' width='43' height='14' /></a></li>\
				<li><a href='#'><img src='/images/footer/t_foot_05.gif' alt='Location' width='51' height='14' /></a></li>\
				<li class='last'><a href='#'><img src='/images/footer/t_foot_06.gif' alt='Contact Us' width='65' height='14' /></a></li>\
			</ul>\
			<a href=\"javascript:layerOpen('com_info_allmenu');\" class='btn'><img src='/images/footer/btn_menu_all.gif' alt='See All Menus' width='95' height='19' /></a>\
			<div id='com_info_allmenu'>\
				<div class='footerbox'>\
					<dl class='menu'>\
						<dt>National</dt>\
						<dd><a href='#'>Politics</a></dd>\
						<dd><a href='#'>Social affairs</a></dd>\
						<dd><a href='#'>Foreign  Affairs</a></dd>\
						<dd class='below'><a href='#'>- Diplomatic Circuit</a></dd>\
						<dd><a href='#'>North Korea</a></dd>\
						<dd><a href='#'>World</a></dd>\
						<dd></dd>\
						<dd></dd>\
						<dd></dd>\
						<dd></dd>\
					</dl>\
					<dl class='menu'>\
						<dt>Business</dt>\
						<dd><a href='#'>Economy</a></dd>\
						<dd><a href='#'>SFinance</a></dd>\
						<dd><a href='#'>Industry</a><br/></dd>\
						<dd><a href='#'>Companies</a></dd>\
						<dd class='below'><a href='#'>- Leaders\' Club</a></dd>\
						<dd class='dot'><a href='#'>  Member\'s Home </a></dd>\
						<dd class='below'><a href='#'>- Kosdaq Report</a></dd>\
						<dd class='below'><a href='#'>- Meet the CEO</a></dd>\
						<dd><a href='#'>World</a></dd>\
						<dd></dd>\
					</dl>\
					<dl class='menu'>\
							<dt>Life&amp;Style</dt>\
							<dd><a href='#'>Travel</a></dd>\
							<dd class='below'><a href='#'>- Rediscover Seoul</a></dd>\
							<dd><a href='#'>Fashion</a></dd>\
							<dd><a href='#'>Food &amp; Bevera</a></dd>\
							<dd class='below'><a href='#'>- Savor Korea</a></dd>\
							<dd class='below'><a href='#'>- Samia\'s Food Facts and Recipes</a></dd>\
							<dd><a href='#'>Books</a></dd>\
							<dd class='below'><a href='#'>- Books from The Korea Herald </a></dd>\
							<dd><a href='#'>People</a><br/></dd>\
							<dd class='below'><a href='#'>- Expat Living</a></dd>\
						</dl>\
						<dl class='menu'>\
							<dt>Entertainment</dt>\
							<dd><a href='#'>Film</a></dd>\
							<dd><a href='#'>Television</a></dd>\
							<dd><a href='#'>Music</a></dd>\
							<dd><a href='#'>Arts &amp; Stage</a></dd>\
							<dd><a href='#'>Hallyu</a></dd>\
							<dd><a href='#'>Annie’s Mailbox</a></dd>\
							<dd><a href='#'>Horoscope</a></dd>\
							<dd><a href='#'>Cartoon</a></dd>\
							<dd></dd>\
							<dd></dd>\
						</dl>\
						<dl class='menu'>\
							<dt>Sports</dt>\
							<dd><a href='#'>Soccer</a></dd>\
							<dd><a href='#'>Baseball</a></dd>\
							<dd><a href='#'>Golf</a></dd>\
							<dd><a href='#'>More sports</a></dd>\
							<dd></dd>\
							<dd></dd>\
							<dd></dd>\
							<dd></dd>\
							<dd></dd>\
							<dd></dd>\
						</dl>\
						<div class='clear'>\
							<dl class='menu'>\
								<dt>Opinion</dt>\
								<dd><a href='#'>Editorial</a></dd>\
								<dd><a href='#'>Columnists</a></dd>\
								<dd><a href='#'>Viewpoints</a><br/></dd>\
								<dd class='below'><a href='#'>- Letter to the Editor</a></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
							</dl>\
							<dl class='menu'>\
								<dt>Special Report</dt>\
								<dd><a href='#'>Social Cohesion </a></dd>\
								<dd class='sp1'><a href='#'>Global Financial Regulatory Reform</a></dd>\
								<dd><a href='#'>R&amp;D Policy in Korea</a></dd>\
								<dd><a href='#'>Green Growth</a></dd>\
								<dd><a href='#'>Regulatory Reform Agenda</a></dd>\
								<dd class='below'><a href='#'>-  View All</a></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
							</dl>\
							<dl class='menu'>\
								<dt>Multimedia</dt>\
								<dd><a href='#'>Most Popular</a></dd>\
								<dd><a href='#'>New Photos</a></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
							</dl>\
							<dl class='menu'>\
								<dt>Community</dt>\
								<dd><a href='#'>Today\'s Debate</a></dd>\
								<dd><a href='#'>Bulletine Board</a></dd>\
								<dd><a href='#'>Blogs</a></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
								<dd></dd>\
							</dl>\
							<dl class='menu'>\
								<dt>Community</dt>\
								<dd><a href='#'>오늘의 인기뉴스</a></dd>\
								<dd><a href='#'>영어뉴스 따라잡기</a></dd>\
								<dd class='below'><a href='#'>- 헤드라인뉴스</a></dd>\
								<dd class='below'><a href='#'>- 포토뉴스</a></dd>\
								<dd class='below'><a href='#'>- 애니즈 메일박스</a></dd>\
								<dd class='below'><a href='#'>- 쉽고 재미있는 영어</a></dd>\
								<dd class='below'><a href='#'>- 양승진 기자의 파워노트</a></dd>\
								<dd class='below'><a href='#'>- 영어뉴스 삼위일체</a></dd>\
								<dd class='below'><a href='#'>- 시사상식완전정복</a></dd>\
							</dl>\
						</div>\
					</div>\
				<a href=\"javascript:layerOpen('com_info_allmenu');\"><img src='/images/footer/close.gif' alt='close' width='14' height='14' class='close' />\
			</div>\
		</div>\
	</div>\
	<p class='logo'><img src='/images/footer/logo_foot.gif' alt='HERALD MEDIA' width='70' height='63' /></p>\
		<h2 class='foot_famlink'><img src='/images/footer/t_foot_fam.gif' alt='FAMILY SITE' width='66' height='8' /></h2>\
		<ul class='foot_famlink_li'>\
			<li><a href='http://www.koreaherald.co.kr/' target='_blank'><img src='/images/footer/t_foot_fam01.gif' alt='Herald Business'  width='86' height='11'/></a></li>\
			<li><a href='http://www.jherald.com/' target='_blank'><img src='/images/footer/t_foot_fam02.gif' alt=' Junior Herald ' width='71' height='11' /></a></li>\
			<li><a href='http://www.camhe.com/' target='_blank'><img src='/images/footer/t_foot_fam03.gif' alt='Campus Herald' width='80' height='11' /></a></li>\
			<li><a href='http://www.heraldtrans.com/' target='_blank'><img src='/images/footer/t_foot_fam04.gif' alt='Korea Herald Translation Center' width='168' height='11' /></a></li>\
			<li><a href='http://www.heraldschool.com/' target='_blank'><img src='/images/footer/t_foot_fam05.gif' alt='Herald School' width='73' height='11' /></a></li>\
			<li class='last'><a href='http://www.heraldchina.com/' target='_blank'><img src='/images/footer/t_foot_fam06.gif' alt='Herald China' width='67' height='11' /></a></li>\
		</ul>\
		<div class='friend_btn'>\
			<div class='friend_list'>\
				<ul>\
					<li><a href='http://www.people.com.cn/' target='_blank'>인민일보</a></li>\
					<li><a href='http://chinaeconomy.ce.cn/' target='_blank'>경제일보</a></li>\
					<li><a href='http://www2.chinadaily.com.cn/' target='_blank'>중국일보</a></li>\
					<li><a href='http://www.bjyouth.com/' target='_blank'>북경청년보</a></li>\
					<li><a href='http://www.nanfangdaily.com.cn/' target='_blank'>21세기경제보도</a></li>\
				</ul>\
			</div>\
		</div>\
		<ul class='foot_link'>\
			<li><a href='#'><img src='/images/footer/t_foot_info01.gif' alt='Announcement' width='80' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info02.gif' alt='Advertisement' width='76' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info03.gif' alt='Subscription' width='66' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info04.gif' alt='Privacy Statement' width='96' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info05.gif' alt='Copyright Policy' width='87' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info06.gif' alt='Herald Ombudsman' width='103' height='12' /></a></li>\
			<li><a href='#'><img src='/images/footer/t_foot_info07.gif' alt='SNS/RSS' width='69' height='12' /></a></li>\
			<li class='last'><a href='#'><img src='/images/footer/t_foot_info08.gif' alt='Sitemap' width='43' height='12' /></a></li>\
		</ul>\
	<p class='foot_author'><img src='/images/footer/t_foot.gif' alt='헤럴드미디어의 모든 기사(콘텐츠)는 저작건법의 보호를 받으며, 무단 전재\\복사\\배포 등을 금지합니다.' width='464' height='11' /></p>\
	<p class='copyright'>COPYRIGHT 2001 ~ 2010 HERALD MEDIA INC. ALL RIGHTS RESERVED.</p>\
 ");
}

function top(){
	document.write("\
<ul id='skip_nav'>\
	<li><a href='#search'>검색바로가기</a></li>\
	<li><a href='#head_news'>헤드라인뉴스바로가기</a></li>\
</ul>\
<div class='famlink01'>\
	<p><a href='#' target='_blank' title='새창'><img src='/images/common/top_logo_01.gif' width='69' height='15' alt='Helald media logo'/></a></p>\
	<ul>\
		<li><a href='#' target='_blank' title='새창'><img src='/images/common/top_link_01.gif' width='114' height='8' alt='The Hearal Business'/></a></li>\
		<li><a href='#' target='_blank' title='새창'><img src='/images/common/top_link_02.gif' width='97' height ='8' alt='The Junior Herald'/></a></li>\
		<li class='last'><a href='#' target='_blank' title='새창'><img src='/images/common/top_link_03.gif' width='84' height='11' alt='Campus Herald'/></a></li>\
	</ul>\
	<a href='#'><img src='/images/btn/btn_login.gif' class='login_btn' width='48' height='16' alt='login'/></a>\
</div>\
 ");
}

// -- 마우스오버
function contentIndexAnchor(v,n){

	var gIndex = document.getElementById("contentIndex");
	var gIndexLen = gIndex.getElementsByTagName("a")
	var gIndexDivNum = new Array;
	var gCntDiv = new Array;
	for(var i=0; i<gIndexLen.length; i++){
		gIndexLen[i].className = "";
		gIndexDivNum[i] = gIndexLen[i].getAttribute("href");
	}
	v.className = "select";

	for (i = 1; i <= document.getElementById("contentIndex2").getElementsByTagName("a").length; i++) {
	    if (i == n) {
	        document.getElementById("contentIndex2").getElementsByTagName("a")[n - 1].className = "on";
	        continue;
	    }
	    document.getElementById("contentIndex2").getElementsByTagName("a")[i - 1].className = "";
	}
	
	for(var i=0; i<gIndexLen.length; i++){

	    gCntDiv[i] = gIndexDivNum[i].substring((gIndexDivNum[i].length - 15), gIndexDivNum[i].length);
		document.getElementById(gCntDiv[i]).style.display = "none";
		document.getElementById("contentList" + gCntDiv[i].substring((gCntDiv[i].length - 3), gCntDiv[i].length)).style.display = "none";
    }
	document.getElementById(gCntDiv[n-1]).style.display = "block";
	document.getElementById("contentList" + gCntDiv[n - 1].substring((gCntDiv[n - 1].length - 3), gCntDiv[n - 1].length)).style.display = "block";

	/*
	#contentIndex_01
	#contentIndex_02
	#contentIndex_03
	*/
}

function contentIndexAnchor2(v, n) {
    var gIndex2 = document.getElementById("contentIndex2");
    var gIndexLen2 = gIndex2.getElementsByTagName("a")
    var gIndexDivNum2 = new Array;
    var gCntDiv2 = new Array;
    
    for (i = 1; i <= document.getElementById("contentIndex").getElementsByTagName("a").length; i++) {
        if (i == n) {
            document.getElementById("contentIndex").getElementsByTagName("a")[n - 1].className = "select";
        }
        else { 
            document.getElementById("contentIndex").getElementsByTagName("a")[i - 1].className = "";
        }
    }

    for (var i = 0; i < gIndexLen2.length; i++) {
        gIndexLen2[i].className = "";
        gIndexDivNum2[i] = gIndexLen2[i].getAttribute("href");
    }
    v.className = "on";
    for (var i = 0; i < gIndexLen2.length; i++) {

        gCntDiv2[i] = gIndexDivNum2[i].substring((gIndexDivNum2[i].length - 15), gIndexDivNum2[i].length);
        document.getElementById(gCntDiv2[i]).style.display = "none";
        document.getElementById("contentList" + gCntDiv2[i].substring((gCntDiv2[i].length - 3), gCntDiv2[i].length)).style.display = "none";
    }
    document.getElementById(gCntDiv2[n - 1]).style.display = "block";
    document.getElementById("contentList" + gCntDiv2[n - 1].substring((gCntDiv2[n - 1].length - 3), gCntDiv2[n - 1].length)).style.display = "block";
}



	//상,하로 이미지 슬라이딩 , 좌우슬라이딩 일경우 scrollLeft로 바꿔준다
	var sRepeat=null;
	function doScrollerIE(dir, src, amount) {
		if (amount==null) amount=85;
		if (dir=="up")
			 document.getElementById(src).scrollLeft-=amount;
		else
			if ( document.getElementById(src).scrollLeft < 160)
			{
				 document.getElementById(src).scrollLeft+=amount;
			}

		if (sRepeat==null)
			sRepeat = setInterval("doScrollerIE('" + dir + "','" + src + "'," + amount + ")",100);
		return false
	}
	window.document.onmouseout = new Function("clearInterval(sRepeat);sRepeat=null");
	window.document.ondragstart = new Function("return false");


function initImgMenu(imgContainerID, imgClassName){
	var imgContainer = document.getElementById(imgContainerID);
	var imgAnchor = imgContainer.getElementsByTagName("a");

	for(i=0; i<imgAnchor.length; i++) {
		if (imgAnchor.item(i).className == imgClassName)
			thismenu = imgAnchor.item(i);
		else
			continue;

		thismenu.container = imgContainer;
		thismenu.targetEl = document.getElementById("mainimg");
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);

		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function imgMenuClick() {

			if (imgContainer.current != this) {
				imgContainer.current.className = imgContainer.current.className.replace("_over", "");
			}

			imgContainer.current = this;
			currentmenu = this.imgEl;


			this.className += (this.className.toString().indexOf("_over") > 0 ? "" : "_over");
			if (currentmenu) {
				var imgSrc = currentmenu.src.split("/");
			
					this.targetEl.getElementsByTagName("img").item(0).src = currentmenu.src.replace(imgSrc[imgSrc.length - 1], imgSrc[imgSrc.length - 1].replace("_p", "_t"));
			

			}
			return true;

		};


		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}

	if (imgContainer.first) {
		imgContainer.current = imgContainer.first;
		imgContainer.current.onclick();
	}
}

function initImgMenu02(imgContainerID, imgClassName){
	var imgContainer = document.getElementById(imgContainerID);
	var imgAnchor = imgContainer.getElementsByTagName("a");

	for(i=0; i<imgAnchor.length; i++) {
		if (imgAnchor.item(i).className == imgClassName)
			thismenu = imgAnchor.item(i);
		else 
			continue;

		thismenu.container = imgContainer;
		thismenu.targetEl = document.getElementById("mainimg01");
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);

		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function imgMenuClick() {

			if (imgContainer.current != this) {
				imgContainer.current.className = imgContainer.current.className.replace("_over", "");
			}				

			imgContainer.current = this;
			currentmenu = this.imgEl;


			this.className += (this.className.toString().indexOf("_over") > 0 ? "" : "_over");
			if (currentmenu) {
				var imgSrc = currentmenu.src.split("/");
				this.targetEl.getElementsByTagName("img").item(0).src = currentmenu.src.replace(imgSrc[imgSrc.length - 1], imgSrc[imgSrc.length - 1].replace("_t", "_p"));

			}
			return true;

		};
		
		
		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}

	if (imgContainer.first) {
		imgContainer.current = imgContainer.first;
		imgContainer.current.onclick();
	}
}


// layer open,close

function layerOpen(layerID){
	var layer = document.getElementById(layerID);
		if(layer.style.display == 'block')
			layer.style.display = 'none';
		else
			layer.style.display = 'block';
}


function moveSlide(tabContainerID, tabClassName, tabNum, maxNum) {

        var tabContainer = document.getElementById(tabContainerID);
        var tabAnchor = tabContainer.getElementsByTagName("a");
	    var oLi = tabContainer.getElementsByTagName("li");
	    var i = 0, anchorIdx = -1, liStartIdx = -1, curIdx = -1;

	    // li style(display:none or display:block) init
	    for (i = 0; i < oLi.length; i++) {
	        oLi.item(i).style.display = (i > maxNum - 1 ? "none" : "block");
	        oLi.item(i).value = i + 1;

	    }





	    for (i = 0; i < tabAnchor.length; i++) {


	        if (tabAnchor.item(i).className == tabClassName ||
	            tabAnchor.item(i).href.split("#")[1] == "prev" ||
	            tabAnchor.item(i).href.split("#")[1] == "prev_main" ||
	            tabAnchor.item(i).href.split("#")[1] == "next" ||
	            tabAnchor.item(i).href.split("#")[1] == "next_main")
	            thismenu = tabAnchor.item(i);

	        else
	            continue;

	        // prev button eventhandler setting
	        if (thismenu.href.split("#")[1] == "prev" || thismenu.href.split("#")[1] == "prev_main") {


                thismenu.onclick = function() {
                    liStartIdx = -1; curIdx = -1;
	                for (i = 0; i < oLi.length; i++) {
	                    if (oLi.item(i).style.display != "block") continue;

	                    if (liStartIdx == -1) liStartIdx = i;

	                    if(oLi.item(i).getElementsByTagName("a").item(0).className.indexOf("_over") >= 0) curIdx = i;

	                    if(liStartIdx > -1 && curIdx > -1) break;
	                }

                    if (liStartIdx > 0) {
	                    oLi.item(liStartIdx - 1).style.display = "block";
	                    oLi.item(liStartIdx + maxNum - 1).style.display = "none";
	                }

	                if((this.href.split("#")[1] == "prev_main" && curIdx > 0) ||
	                   //(this.href.split("#")[1] == "prev" && liStartIdx > 0))
						(this.href.split("#")[1] == "prev" && curIdx > 0))
	                {
	                    oLi.item(curIdx - 1).getElementsByTagName("a").item(0).onclick();
	                }
	                else if(curIdx == 0 || liStartIdx == 0)
	                {
	                    PrevTest();
	                }
	            }

	            continue;
	        }
	        // next button eventhandler setting
	        if (thismenu.href.split("#")[1] == "next" || thismenu.href.split("#")[1] == "next_main") {
                thismenu.onclick = function() {
                    liStartIdx = -1; curIdx = -1;
	                for (i = 0; i < oLi.length; i++) {

	                    if (oLi.item(i).style.display != "block") continue;

	                    if (liStartIdx == -1) liStartIdx = i;

	                    if(oLi.item(i).getElementsByTagName("a").item(0).className.indexOf("_over") >= 0) curIdx = i;

	                    if(liStartIdx > -1 && curIdx > -1) break;
	                }

                    if (liStartIdx < oLi.length - maxNum) {
	                    oLi.item(liStartIdx).style.display = "none";
	                    oLi.item(liStartIdx + maxNum).style.display = "block";
	                }
	                if((this.href.split("#")[1] == "next_main" && curIdx < oLi.length - 1) ||
	                   //(this.href.split("#")[1] == "next" && liStartIdx < oLi.length - maxNum))
						(this.href.split("#")[1] == "next" && curIdx < oLi.length - 1))
	                {
	                    oLi.item(curIdx + 1).getElementsByTagName("a").item(0).onclick();
	                }
	                else if(curIdx == oLi.length - 1 || liStartIdx == oLi.length - maxNum)
	                {
	                    NextTest();
	                }
	            }
	            continue;
	        }



	        // img  onmouseover eventhandler setting
	        anchorIdx++;
	        thismenu.container = tabContainer;


			thismenu.onclick =  function(){
             currentmenu = this.container.current;

             if (currentmenu == this)
                 return false;

             if (currentmenu) {
                 currentmenu.className = currentmenu.className.replace("_over", "");

                 if (currentmenu.getElementsByTagName("p").length > 0)
                     currentmenu.getElementsByTagName("p").item(0).className = currentmenu.getElementsByTagName("p").item(0).className.replace("_over", "");
                 if (currentmenu.getElementsByTagName("span").length > 0)
                     currentmenu.getElementsByTagName("span").item(0).className = currentmenu.getElementsByTagName("span").item(0).className.replace("_over", "");
             }
             oImg = this.getElementsByTagName("img").item(0);

			if (document.getElementById("mainimg"))
			{
				document.getElementById("mainimg").src =  oImg.src.substring(0, oImg.src.lastIndexOf("/") + 1) + oImg.src.substring(oImg.src.lastIndexOf("/") +1 , oImg.src.length-6 )+"_p.jpg" ;

			}

             this.className += "_over";
             if (this.getElementsByTagName("p").length > 0)
                 this.getElementsByTagName("p").item(0).className += "_over";
             if (this.getElementsByTagName("span").length > 0)
                 this.getElementsByTagName("span").item(0).className += "_over";
             this.container.current = this;
             return false;
         };

	        if (tabNum != null && tabNum == anchorIdx + 1)
	            thismenu.container.first = thismenu;
	        else if (!thismenu.container.first)
	            thismenu.container.first = thismenu;

	    }

	    if (tabContainer.first)
	        tabContainer.first.onclick();
    }

function moveLi(tabContainerID, tabClassName, tabNum, maxNum) {

        var tabContainer = document.getElementById(tabContainerID);
        var tabAnchor = tabContainer.getElementsByTagName("a");
	    var oLi = tabContainer.getElementsByTagName("li");
	    var i = 0, anchorIdx = 0, liStartIdx = 0;

	    // li style(display:none or display:block) init
	    for (i = 0; i < oLi.length; i++) {
	        oLi.item(i).style.display = (i > maxNum - 1 ? "none" : "block");
	    }

	    for (i = 0; i < tabAnchor.length; i++) {
	        if (tabAnchor.item(i).className == tabClassName || tabAnchor.item(i).href.split("#")[1] == "prev" || tabAnchor.item(i).href.split("#")[1] == "next")
	            thismenu = tabAnchor.item(i);
	        else
	            continue;

	        // prev,next button eventhandler setting
            if (thismenu.href.split("#")[1] == "prev" || thismenu.href.split("#")[1] == "next") {



                thismenu.onclick = function() {
                    for (i = 0; i < oLi.length; i++) {
                        if (oLi.item(i).style.display == "block") {
                            liStartIdx = i;
                            break;
                        }
                    }

                    if (this.href.split("#")[1] == "prev" && liStartIdx > 0) {
                        oLi.item(liStartIdx - 1).style.display = "block";
                        oLi.item(liStartIdx + maxNum - 1).style.display = "none";
                    }
                    else if (this.href.split("#")[1] == "next" && liStartIdx < oLi.length - maxNum) {
                        oLi.item(liStartIdx).style.display = "none";
                        oLi.item(liStartIdx + maxNum).style.display = "block";
                    }
                }

                continue;
            }

	        // img  onmouseover eventhandler setting
	        anchorIdx++;
	        thismenu.container = tabContainer;

	        thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function(){
	            currentmenu = this.container.current;
	            if (currentmenu == this)
	                return false;

	            if (currentmenu) {
	                currentmenu.className = currentmenu.className.replace("_over", "");
	            }
	            this.className += "_over";
	            this.container.current = this;
	            return false;
	        };

	        if (tabNum != null && tabNum == anchorIdx)
	            thismenu.container.first = thismenu;
	        else if (!thismenu.container.first)
	            thismenu.container.first = thismenu;

	    }

	    if (tabContainer.first)
	        tabContainer.first.onclick();

    }

//-- png 투명처리 ie6
function setPng24(obj) {
	obj.width=obj.height=1;
	 obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter =
	 "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='';obj.src='';
	return '';
}

function display_change2(tn,n,t) {
 for (i=1; i<=t; i++) {
  var targetElOffset = "00" + i;
  targetElOffset = targetElOffset.substring(targetElOffset.length, targetElOffset.length-2)
  if (i==n) document.getElementById(tn+targetElOffset).style.display='block';
  else document.getElementById(tn+targetElOffset).style.display='none';
 }
}


function initImgMenu3(tabContainerID, tabClassName){
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == tabClassName)
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);

		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
//					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_o.gif", ".gif");
					currentmenu.className = currentmenu.className.replace( "_over", "");
				} else {
					currentmenu.className = currentmenu.className.replace("_over", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
//				this.imgEl.src = this.imgEl.src.replace(".gif", "_o.gif");
				this.className += "_over";
			} else {
				this.className += "_over";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

function heraldNavigation(seq) {
	nav = document.getElementById("heraldmenu");

	nav.menu = new Array();
	nav.current = null;
	nav.menuseq = 0;
	navLen = nav.childNodes.length;
	allA = nav.getElementsByTagName("a")
	for(k = 0; k < allA.length; k++) {
		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
			nav.isOver = true;
		}
		allA.item(k).onmouseout = allA.item(k).onblur = function () {
			nav.isOver = false;
			setTimeout(function () {
				if (nav.isOver == false) {
					if (nav.menu[seq])
						nav.menu[seq].onmouseover();

					else if(nav.current) {

						if (nav.current.submenu)
						{
							nav.current.submenu.style.visibility = "hidden";
							nav.current.parentNode.className="";
						}

						else {nav.current.parentNode.className="last";}

						nav.current = null;

					}
				}
			}, 500);
		}
	}

	for (i = 0; i < navLen; i++) {
		navItem = nav.childNodes.item(i);
		if (navItem.tagName != "LI")
			continue;

		navAnchor = navItem.getElementsByTagName("a").item(0);
		navAnchor.submenu = navItem.getElementsByTagName("div").item(0);

		navAnchor.onmouseover = navAnchor.onfocus = function () {
			if (nav.current) {

				if (nav.current.submenu)
					{
						nav.current.submenu.style.visibility = "hidden";
						nav.current.parentNode.className="";
					}

				else {nav.current.parentNode.className="last";}

				nav.current = null;
			}
			if (nav.current != this) {

				if (this.submenu)
				{this.submenu.style.visibility = "visible";}


					if (this.className !='subrightmenu')
					{
						this.parentNode.className = "selected" ;
					}

					else {this.parentNode.className="selected2";}

				nav.current = this;

			}
			nav.isOver = true;
		}
		nav.menuseq++;
		nav.menu[nav.menuseq] = navAnchor;
	}
	if (nav.menu[seq])
		nav.menu[seq].onmouseover();
}
function initBtnMenu(tabContainerID, tabClassName, tabNum){
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == tabClassName)
			thismenu = tabAnchor.item(i);
		else
			continue;

		if(thismenu.href.split("#")[1] == "prev")
		{
			thismenu.onclick = function btnPrevClick() {
				currentmenu = tabContainer.current;
				
				_targetElId = parseInt(currentmenu.targetEl.id.replace("imgtxt", ""), 10);
				_targetElId = (_targetElId - 1 == 0 ? 3 : (_targetElId - 1));
				_targetElId = "imgtxt" + (_targetElId < 10 ? '0' + _targetElId : _targetElId);

				_tabAnchor = document.getElementById(tabContainerID).getElementsByTagName("a");
				for(i=0; i<_tabAnchor.length; i++) {
					
					if(tabAnchor.item(i).className == tabClassName && tabAnchor.item(i).href.indexOf(_targetElId) > 0)
					{
						tabAnchor.item(i).onclick();
					}
				}

				return false;
			};
			continue;
		}


		if(thismenu.href.split("#")[1] == "next")
		{
			thismenu.onclick = function btnNextClick() {
				currentmenu = tabContainer.current;
				
				_targetElId = parseInt(currentmenu.targetEl.id.replace("imgtxt", ""), 10);
				_targetElId = (_targetElId + 1 == 4 ? 1 : (_targetElId + 1));
				_targetElId = "imgtxt" + (_targetElId < 10 ? '0' + _targetElId : _targetElId);

				_tabAnchor = document.getElementById(tabContainerID).getElementsByTagName("a");
				for(i=0; i<_tabAnchor.length; i++) {
					
					if(tabAnchor.item(i).className == tabClassName && tabAnchor.item(i).href.indexOf(_targetElId) > 0)
					{
						tabAnchor.item(i).onclick();
					}
				}

				return false;
			};
			continue;
		}


		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		
		thismenu.onclick = thismenu.onmouseover = thismenu.onfocus = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				currentmenu.className = currentmenu.className.replace("_over", "");				
			}
			this.targetEl.style.display = "";
			this.className += "_over";
			
			this.container.current = this;

			return false;
		};	

		if (tabNum != null && i + 1 == tabNum)
            thismenu.container.first = thismenu;
        else if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}
function textScroll(scroll_el_id) {
    this.objElement = document.getElementById(scroll_el_id);
    this.objElement.style.position = 'relative';
    this.objElement.style.overflow = 'hidden';

    this.objLi = this.objElement.getElementsByTagName('li');
    this.height = this.objElement.offsetHeight; 
    this.num = this.objLi.length; 
    this.totalHeight = this.height*this.num; 
    this.scrollspeed = 2;
    this.objTop = new Array(); 
    this.timer = null;
    
    for(var i=0; i<this.num; i++){
        this.objLi[i].style.position = 'absolute';
        this.objTop[i] = this.height*i;
        this.objLi[i].style.top = this.objTop[i]+"px";
    }
}

textScroll.prototype.move = function(){
    for(var i=0; i<this.num; i++) {
        this.objTop[i] = this.objTop[i] - this.scrollspeed;
        this.objLi[i].style.top = this.objTop[i]+"px";
    }
    if(this.objTop[0]%this.height == 0){
        this.jump();
    }else{
        clearTimeout(this.timer);
        this.timer = setTimeout(this.name+".move()",50);
    }
}

textScroll.prototype.jump = function(){
    for(var i=0; i<this.num; i++){
        if(this.objTop[i] == this.height*(-2)){
            this.objTop[i] = this.objTop[i] + this.totalHeight;
            this.objLi[i].style.top = this.objTop[i]+"px";
        }
    }
    clearTimeout(this.timer);
    this.timer = setTimeout(this.name+".move()",3000);
}

textScroll.prototype.start = function() {
    this.timer = setTimeout(this.name+".move()",3000);
}
function fontPlus()
{
	var getSize = $('articleTxt').getStyle('fontSize');
	var endString = '';
	var limit = 0;

	if( getSize.endsWith('pt') )
	{
		endString = 'pt';
		limit = 18.5;
	}
	else if( getSize.endsWith('px') )
	{
		endString = 'px';
		limit = 20;
	}

	var cutSize = eval(getSize.replace(endString,''))+2;

	if( cutSize <= limit )
		$('articleTxt').style.fontSize = cutSize+endString;
}

function fontMinus()
{
	var getSize = $('articleTxt').getStyle('fontSize');
	var endString = '';
	var limit = 0;

	if( getSize.endsWith('pt') )
	{
		endString = 'pt';
		limit = 8.5;
	}
	else if( getSize.endsWith('px') )
	{
		endString = 'px';
		limit = 12;
	}

	var cutSize = eval(getSize.replace(endString,''))-2;

	if( cutSize >= limit )
		$('articleTxt').style.fontSize = cutSize+endString;
}
function nowDate() {
	day = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
	now = new Date;
	
	document.write("(",day[now.getDay()],") ",now.getMonth()+1,". ",now.getDate(),". ",now.getFullYear());
	}
	
/* 시작페이지 설정 */
function startPage(Obj,urlStr){
    if (document.all && window.external){
        Obj.style.behavior='url(#default#homepage)';
        Obj.setHomePage(urlStr);
    } else {
        
    }
}