// ################## Script For Flash & ActiveX ###############################
// Writer : 김천겸
// email : prussian@skcc.com
// Last Update : 2006-02-07
// 
// +++++++++++++  MakeFlashString(source,id,width,height,wmode) ++++++++++++++++
// source: source url --> 플래쉬 파일의 경로
// id: flash id 
// width: source width
// height: source height
// wmode: wmode --> "none, transparent, opaque"
// otherparam : 추가 파라미터 "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ++++ MakeObjectString(classid, codebase, name, id, width,height, param) +++++
// 
// classid: classid --> 플래쉬 파일의 경로
// codebase: cab파일 위치 및 버전정보 
// name :
// id :
// width: source width
// height: source height
// 
// wmode: wmode --> "none, transparent, opaque"
// param : 추가 파라미터 "<param name='myParam' value='myValue' />
// 
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// 
// Example 
// DocumentWrite(MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// SetInnerHTML(document.all.mm, MakeFlashString('image/ml_flash.swf','emb1','330','520','opaque'));
// @@주의 사항 
//  - 상호작용 없는 컨텐츠는 DocumentWrite, SetInnerHTML 둘다 사용 가능
//  - 상호작용 있는 컨텐츠는 SetInnerHTML만 사용 가능
// #############################################################################
// 

function MakeFlashString(source, id, width, height, wmode, otherParam) {	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width='"+width+"' height='"+height+"' id='"+id+"'><param name=wmode value='"+wmode+"' /><param name=movie value='"+source+"' /><param name=quality value=high />"+otherParam+"<embed src='"+source+"' quality=high wmode='"+wmode+"' type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width='"+width+"' height='"+height+"'></embed></object>";
}
// 
function MakeObjectString(classid, codebase, name, id, width,height, param) {
	return "<object classid="+classid+" codebase="+codebase+" name="+name+" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" />"+param+"</object>";
}
// innerHTML Type
function SetInnerHTML(target, code) { 
	document.write(code);
	//target.innerHTML = code; 
}
// 
// Direct Write Type
function DocumentWrite(src) {
	document.write(src);
}
// #############################################################################
// 이미지롤오버 시작
function imgrollOver(img, name) {
	img.src = name; 
}
// 메뉴 롤업
function rollupMenu2(img, name, menu) {
	menuRefreshing();	//서브메뉴 초기화
	img.src = name;		//이미지 롤오버
	document.all[menu].style.display="block";
}
// 
function menuRefreshing() {
	document.all['subMenu1'].style.display="none";
	document.all['subMenu2'].style.display="none";
	document.all['subMenu3'].style.display="none";
	document.all['subMenu4'].style.display="none";
}
// 메뉴 롤업
function rollupMenu(idx) {
	var obj = document.getElementById("__MainMenuImg");
	var img = eval("document.all.__MainMenuImg");
	var sub = eval("document.all.__SubMenu");

	for (var i = 1; i <= 4; i++) {
		var img = document.getElementById("__MainMenuImg"+i);
		var sub = document.getElementById("__SubMenu"+i);
		img.src = "/emwp/img/menuimage/nv_mn0"+ i +"_a.gif";
		sub.style.display = "none";
	}
	
	if(idx == "0") return;
	document.getElementById("__MainMenuImg"+idx).src = "/emwp/img/menuimage/nv_mn0"+ idx +"_b.gif";
	document.getElementById("__SubMenu"+idx).style.display="block";
}
// 메뉴 롤업
function rollupMenu1(idx) {
	var obj = document.getElementById();
	var img = eval("document.all.__MainMenuImg");
	var sub = eval("document.all.__SubMenu");

	for (var i = 0; i < img.length; i++) {
		var seq = i + 1;
		img[i].src = "/emwp/img/menuimage/nv_mn0"+ seq +"_a.gif";
		sub[i].style.display = "none";
	}
	
	if(idx == 0) return;
	img[idx-1].src = "/emwp/img/menuimage/nv_mn0"+ idx +"_b.gif";
	sub[idx-1].style.display="block";
}
// #############################################################################
// 좌측메뉴 선택
var ret_window;
var PrivSeq=-1;
// 
function ovStyle(sg) {
	document.all["SG"+sg].style.color = "#4E4F30";	
	document.all["SG"+sg].style.textDecoration = "";
}
// 
function outStyle(sg) {
	document.all["SG"+sg].style.color = "#737373";	
	document.all["SG"+sg].style.textDecoration = "";
}
// 
function showsub(sg) {
	if (document.all["PG"+sg].style.display == "none") {
		document.all["PG"+sg].style.display = ""
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/sub_menu_ic_ov.gif";
	} else {
		document.all["PG"+sg].style.display = "none"
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/sub_menu_ic.gif";
	}
	document.all["SG"+sg].style.color = "";	
	if (PrivSeq!=-1 && PrivSeq!=sg) document.all["SG"+PrivSeq].style.color = "";;
	PrivSeq=sg;
}
// 
function quicksub1(sg) {
	if (document.all["PG"+sg].style.display == "none") {
		document.all["PG"+sg].style.display = ""
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/quick_title01.gif";
	} else {
		document.all["PG"+sg].style.display = "none"
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/quick_title01_ov.gif";
	}
	document.all["SG"+sg].style.color = "";	
	if (PrivSeq!=-1 && PrivSeq!=sg) document.all["SG"+PrivSeq].style.color = "";;
	PrivSeq=sg;
}
// 
function quicksub2(sg) {
	if (document.all["PG"+sg].style.display == "none") {
		document.all["PG"+sg].style.display = ""
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/quick_title02.gif";
	} else {
		document.all["PG"+sg].style.display = "none"
		document.all["IMG"+sg].src = "/emwp/img/emwp/global/quick_title02_ov.gif";
	}
	document.all["SG"+sg].style.color = "";	
	if (PrivSeq!=-1 && PrivSeq!=sg) document.all["SG"+PrivSeq].style.color = "";;
	PrivSeq=sg;
}
// 
function showsub2(sg) {
	document.all["SG"+sg].style.color = "";
	if (PrivSeq!=-1 && PrivSeq!=sg) document.all["SG"+PrivSeq].style.color = "";
	PrivSeq=sg;
}
// #############################################################################
//<!-- 서브메뉴 레이어 스크립트 시작 -->
//<!--
ns = (document.layers)? true:false
ie = (document.all)? true:false
// 
function show(id) {
	if (ns) document.layers[id].visibility = "visible";
	else if (ie) document.all[id].style.visibility = "visible";
}
// 
function hide(id) {
	if (ns) document.layers[id].visibility = "hidden";
	else if (ie) document.all[id].style.visibility = "hidden";
}
// 
function hide_all() {
	if (ns) document.layers.visibility = "hidden";
	else if (ie) document.all.style.visibility = "hidden";
}
//-->
//<!-- 서브메뉴 레이어 스크립트 끝 -->

