var g_event = "progress";
var snb_common = "notice";
function rollover_menu(val) { // 메인 lnb 롤오버
	document.getElementById("lnb_" + val).className = val + "_on";
}
function toggle_snb(val) { // 좌측 공지, 이벤트 탭
	if(snb_common != val) {
		document.getElementById("t_" + snb_common).className = "t_" + snb_common;
		document.getElementById(snb_common + "_article").style.display = "none";
		document.getElementById("t_" + val).className = "t_" + val + "_on";
		document.getElementById(val + "_article").style.display = "block";
		snb_common = val;
	}
}
// rollover Img
var selectedOverImg = '';
function imgOver(param) {
	var obj;
	if (typeof param == "string" ){
		obj = document.getElementById(param);
	} else {
		obj = param;
	}
	if(obj.src.search(/\_over/gi) >= 0)selectedOverImg = obj.src;
	obj.src = obj.src.replace("_off.gif", "_on.gif");
}
function imgOut(param) {
	var obj;
	if (typeof param == "string" ){
		obj = document.getElementById(param);
	} else {
		obj = param;
	}
	if(obj.src != selectedOverImg)obj.src = obj.src.replace("_on.gif", "_off.gif")
}

function dtxtview(num){
	max=document.getElementById("tab").getElementsByTagName("a").length;

	for(i=1;i<=max;i++){
		document.getElementById("dtabv"+i).style.display = "none";
	}
	document.getElementById("dtabv"+num).style.display = "block";
}

function snb_channel(val) {
	document.write('<h2><img src="/common/images/h_/h2_global_channel.gif" alt="channel" /></h2>');
	document.write('<ul id="snb_channel">');
	document.write('	<li><a href="/channel/overview.html" class="snb_intro" id="snb_intro">채널소개</a></li>');
	document.write('	<li><a href="/channel/channelinfo.html" class="snb_watch" id="snb_watch">채널시청안내</a></li>');
	document.write('	<li><a href="/channel/schedule.html" class="snb_schdule" id="snb_schdule">편성표</a></li>');
	document.write('</ul>');
	document.getElementById("snb_" + val).className = "snb_" + val + "_on";	
}

function snb_program(val) {
	document.write('<h2><img src="/common/images/h_/h2_global_program.gif" alt="Program" /></h2>');
	document.write('<ul id="snb_program">');
	document.write('	<li><a href="/program/new.aspx?channelID=0" class="snb_new" id="snb_new">New Program</a></li>');
	document.write('	<li><a href="/program/new.aspx?channelID=1" class="snb_drama" id="snb_drama">Drama</a></li>');
	document.write('	<li><a href="/program/new.aspx?channelID=2" class="snb_variety" id="snb_variety">Variety</a></li>');
	document.write('	<li><a href="/program/new.aspx?channelID=4" class="snb_esports" id="snb_esports">E-Sports</a></li>');
	document.write('	<li><a href="/program/new.aspx?channelID=5" class="snb_sports" id="snb_sports">Sports</a></li>');
	document.write('	<li><a href="/program/new.aspx?channelID=3" class="snb_life" id="snb_life">Life&Culture</a></li>');
	document.write('</ul>');
	document.getElementById("snb_" + val).className = "snb_" + val + "_on";	
}

function snb_business(val) {
	document.write('<h2><img src="/common/images/h_/h2_global_business.gif" alt="Business" /></h2>');
	document.write('<ul id="snb_business">');
	document.write('	<li><a href="/business/ad.html" class="snb_adver" id="snb_adver">광고안내</a></li>');
	document.write('	<li><a href="/business/alliance.html" class="snb_busi" id="snb_busi">채널사업제휴</a></li>');
	document.write('</ul>');
	document.getElementById("snb_" + val).className = "snb_" + val + "_on";	
}

function snb_company(val) {
	document.write('<h2><img src="/common/images/h_/h2_global_company.gif" alt="Company" /></h2>');
	document.write('<ul id="snb_company">');
	document.write('	<li><a href="/company/info.html" class="snb_info" id="snb_info">회사개요</a></li>');
	document.write('	<li><a href="/company/ceo.html" class="snb_ceo" id="snb_ceo">CEO인사말</a></li>');
	document.write('	<li><a href="/company/history.html" class="snb_history" id="snb_history">회사연혁</a></li>');
	document.write('	<li><a href="/company/location.html" class="snb_contact" id="snb_contact">위치 및 연락처</a></li>');
	document.write('</ul>');
	document.getElementById("snb_" + val).className = "snb_" + val + "_on";	
}

function snb_help(val) {
	document.write('<h2><img src="/common/images/h_/h2_global_help.gif" alt="Help Center" /></h2>');
	document.write('<ul id="snb_help">');
	document.write('	<li><a href="/helpcenter/noticeList.aspx" class="snb_notice" id="snb_notice">공지사항</a></li>');
	document.write('	<li><a href="/helpcenter/freeboard.html" class="snb_board" id="snb_board">자유게시판</a></li>');
	document.write('</ul>');
	document.getElementById("snb_" + val).className = "snb_" + val + "_on";	
}

