//¸ÞÀÎ¸Þ´º
var prevLayer_mmenu = new Array();
prevLayer_mmenu[0] = "subMenu_01";
prevLayer_mmenu[1] = "subMenu_02";
prevLayer_mmenu[2] = "subMenu_03";
prevLayer_mmenu[3] = "subMenu_04";
prevLayer_mmenu[4] = "subMenu_05";
prevLayer_mmenu[5] = "subMenu_06";
prevLayer_mmenu[6] = "subMenu_07";
prevLayer_mmenu[7] = "subMenu_08";
prevLayer_mmenu[8] = "subMenu_09";

var prevImg_mmenu  = new Array();
prevImg_mmenu[0]  = "btn_mainMenu_01";
prevImg_mmenu[1]  = "btn_mainMenu_02";
prevImg_mmenu[2]  = "btn_mainMenu_03";
prevImg_mmenu[3]  = "btn_mainMenu_04";
prevImg_mmenu[4]  = "btn_mainMenu_05";
prevImg_mmenu[5]  = "btn_mainMenu_06";
prevImg_mmenu[6]  = "btn_mainMenu_07";
prevImg_mmenu[7]  = "btn_mainMenu_08";
prevImg_mmenu[8]  = "btn_mainMenu_09";

function viewLayer_mmenu(nowLayer,no)
{
document.all[prevLayer_mmenu[no]].style.display = "none";
document.all[nowLayer].style.display = "";
prevLayer_mmenu[no] = nowLayer;
}

function changeImg_mmenu(nowImg,no)
{
if ( nowImg != prevImg_mmenu[no])
{
prevImgSrc = document.all[prevImg_mmenu[no]].src.replace("ov.gif",".gif");
nowImgSrc = document.all[nowImg].src.replace(".gif",".gif");

document.all[prevImg_mmenu[no]].src = prevImgSrc.replace(".gif",".gif");
document.all[nowImg].src = nowImgSrc.replace(".gif","ov.gif");
prevImg_mmenu[no] = nowImg;
}
}



//Ä®·³.»ç¼³
function changeTab01(tabName) {
if (tabName == 'tab_saseol') {
tab_column.style.display = '';
tab_saseol.style.display = 'none';
document.all.column.src = "img/hn4_tab_column_ov.gif";
document.all.saseol.src = "img/hn4_tab_saseol.gif";
} else {
tab_saseol.style.display = '';
tab_column.style.display = 'none';
document.all.column.src = "img/hn4_tab_column.gif";
document.all.saseol.src = "img/hn4_tab_saseol_ov.gif";
}
}


//Æ÷Åä.µ¿¿µ»ó´º½º
function changeTab02(tabName) {
if (tabName == 'tab_tvnews') {
tab_photonews.style.display = '';
tab_tvnews.style.display = 'none';
document.all.photonews.src = "img/hn4_tab_photonews_ov.gif";
document.all.tvnews.src = "img/hn4_tab_tvnews.gif";
} else {
tab_tvnews.style.display = '';
tab_photonews.style.display = 'none';
document.all.photonews.src = "img/hn4_tab_photonews.gif";
document.all.tvnews.src = "img/hn4_tab_tvnews_ov.gif";
}
}


//¸ÀÁý.¿©Çà.À¯¸Ó
var prevLayer_01 = new Array();
prevLayer_01[0] = "tabMenu_01_01";

var prevImg_01  = new Array();
prevImg_01[0]  = "btn_tabMenu_01_01";

function viewLayer_01(nowLayer,no)
{
document.all[prevLayer_01[no]].style.display = "none";
document.all[nowLayer].style.display = "";
prevLayer_01[no] = nowLayer;
}

function changeImg_01(nowImg,no)
{
if ( nowImg != prevImg_01[no])
{
prevImgSrc = document.all[prevImg_01[no]].src.replace("_ov.gif",".gif");
nowImgSrc = document.all[nowImg].src.replace(".gif",".gif");

document.all[prevImg_01[no]].src = prevImgSrc.replace(".gif",".gif");
document.all[nowImg].src = nowImgSrc.replace(".gif","_ov.gif");
prevImg_01[no] = nowImg;
}
}


//¸ÞÀÎ´º½ºÅÇ [ÃÖ½Å±â»ç / Á¤Ä¡ / °æÁ¦ / »çÈ¸ / IT.°úÇÐ]
var prevLayer_02 = new Array();
prevLayer_02[0] = "tabnews_01";

var prevImg_02  = new Array();
prevImg_02[0]  = "btn_tabMenu_02_01";

function viewLayer_02(nowLayer,no)
{
document.all[prevLayer_02[no]].style.display = "none";
document.all[nowLayer].style.display = "";
prevLayer_02[no] = nowLayer;
}

function changeImg_02(nowImg,no)
{
if ( nowImg != prevImg_02[no])
{
prevImgSrc = document.all[prevImg_02[no]].src.replace("_ov.gif",".gif");
nowImgSrc = document.all[nowImg].src.replace(".gif",".gif");

document.all[prevImg_02[no]].src = prevImgSrc.replace(".gif",".gif");
document.all[nowImg].src = nowImgSrc.replace(".gif","_ov.gif");
prevImg_02[no] = nowImg;
}
}


//°¡Àå ¸¹ÀÌ º» ´º½º [¼½¼ÇÁ¾ÇÕ / »çÈ¸ / ¿¬¿¹]
var prevLayer_05 = new Array();
prevLayer_05[0] = "tabMenu_05_01";

var prevImg_05  = new Array();
prevImg_05[0]  = "btn_tabMenu_05_01";

function viewLayer_05(nowLayer,no)
{
document.all[prevLayer_05[no]].style.display = "none";
document.all[nowLayer].style.display = "";
prevLayer_05[no] = nowLayer;
}

function changeImg_05(nowImg,no)
{
if ( nowImg != prevImg_05[no])
{
prevImgSrc = document.all[prevImg_05[no]].src.replace("_ov.gif",".gif");
nowImgSrc = document.all[nowImg].src.replace(".gif",".gif");

document.all[prevImg_05[no]].src = prevImgSrc.replace(".gif",".gif");
document.all[nowImg].src = nowImgSrc.replace(".gif","_ov.gif");
prevImg_05[no] = nowImg;
}
}




//IE6¿¡¼­ PNGÆÄÀÏ »ç¿ëÇÏ±â
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='';  
    return ''; 
} 




//·¹ÀÌ¾îÅøÆÁ °ü·Ã [start]  /////////////////////////////////////////////
var offsetxpoint=-60 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20

var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}


function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
//·¹ÀÌ¾îÅøÆÁ °ü·Ã [end]  /////////////////////////////////////////////


function FlashMainbody(Ftrans,wid,hei) {
	mainbody = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+ wid +"' height='"+ hei +"'>";
	mainbody += "<param name='movie' value='"+ Ftrans +"'>";
	mainbody += "<param name='quality' value='high'>";
	mainbody += "<param name='menu' value='false'>";
	mainbody += "<param name='scale' value='noscale'>";
	mainbody += "<param name='wmode' value='transparent'>";
	mainbody += "<param name='salign' value='lt' />";
	mainbody += "<embed src='"+ Ftrans +"' quality='high' align='middle' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ wid +"' height='"+ hei +"'></embed>"
	mainbody += "</object>";

	//document.body.innerHTML = mainbody;
	document.write(mainbody);
	return;
}

