﻿// JavaScript Document

// swf
function FlashView(add, widthx, heighty){
	var add;
	var widthx;
	var heighty;

	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+widthx+'" height="'+heighty+'"><param name=movie value="'+add+'"><param name=quality value=high><param name=menu value=false><param name=wmode value=transparent><embed src="'+add+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+widthx+'" height="'+heighty+'"></embed></object>')}


// swf 투명
function FlashClearView(add, widthx, heighty){
	var add;
	var widthx;
	var heighty;

document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+widthx+'" height="'+heighty+'"><param name=movie value="'+add+'"><param name=quality value=high><param name=wmode value=transparent><param name=menu value=false><embed src="'+add+'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+widthx+'" height="'+heighty+'"></embed></object>')
}


// media
function MovieView(add, widthx, heighty){
	var add;
	var widthx;
	var heighty;

	document.write('<embed src="'+add+'" width="'+widthx+'" height="'+heighty+'" controller="false"></embed>')
}

//글로벌 네비게이션(2Depth 메뉴그룹)에 대한 마우스 또는 키보드 반응(보임/숨김)설정
function menuD2block(id) {
	for(num=1; num<=6; num++) document.getElementById('D2MG'+num).style.display='none'; //D2MG1~D2MG5 까지 숨긴 다음
	document.getElementById(id).style.display='block'; //해당 ID만 보임
}

//로컬 네비게이션(4Depth 메뉴그룹)에 대한 마우스 또는 키보드 반응(보임/숨김)설정
function menuD4MGblock(id) {
	for(num=1; num<=6; num++) document.getElementById('D4MG'+num).style.display='none'; //D4MG1~D4MG5 까지 숨긴 다음
	document.getElementById(id).style.display='block'; //해당 ID만 보임
}

// 현재 페이지의 메뉴 상태 표시(편의상 모두 언더라인으로 설정되어 있으며 body onLoad 시 실행됨)
function menuD1on(id) {
	document.getElementById(id).style.textDecoration='underline';
}
function menuD2on(id) {
	document.getElementById(id).style.textDecoration='underline';
}
function menuD3on(id) {
	document.getElementById(id).style.textDecoration='underline';
}
function menuD4on(id) {
	document.getElementById(id).style.textDecoration='underline';
}
function menuD5on(id) {
	document.getElementById(id).style.textDecoration='underline';
}
function menuD6on(id) {
	document.getElementById(id).style.textDecoration='underline';
}

function showLayer1() {
document.all.layer1.style.visibility = "visible";
}

function hideLayer1() {
document.all.layer1.style.visibility = "hidden";
}
function showLayer2() {
document.all.layer2.style.visibility = "visible";
}

function hideLayer2() {
document.all.layer2.style.visibility = "hidden";
}
function showLayer3() {
document.all.layer3.style.visibility = "visible";
}

function hideLayer3() {
document.all.layer3.style.visibility = "hidden";
}
function showLayer4() {
document.all.layer4.style.visibility = "visible";
}

function hideLayer4() {
document.all.layer4.style.visibility = "hidden";
}
function showLayer5() {
document.all.layer5.style.visibility = "visible";
}

function hideLayer5() {
document.all.layer5.style.visibility = "hidden";
}

//iframe
function ResizeiFrame(iframeObj){
  var innerBody = iframeObj.contentWindow.document.body;
  var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
  iframeObj.style.height = innerHeight;
}
