function imgOver(id) {
	var gon = document.getElementById(id);
	gon.onmouseover = function() {
		gon.src = gon.src.replace('_off.gif', '_on.gif');
	}
}
function imgOver2(id) {
	var gon = document.getElementById(id);
	gon.src = gon.src.replace('_off.gif', '_on.gif');
}
function imgOut(id) {
	var gon = document.getElementById(id);
	gon.onmouseout = function() {
		gon.src = gon.src.replace('_on.gif', '_off.gif');
	}
}
function imgOut2(id) {
	var gon = document.getElementById(id);
	gon.src = gon.src.replace('_on.gif', '_off.gif');
}

function loading(id) {
	var gon = document.getElementById(id);
	onload = function() {
		gon.src = gon.src.replace('_off.gif', '_on.gif');
	}
}

function viewLayer(menu, layer) {
	var gon = document.getElementById(menu);
	var gon2 = document.getElementById(layer);
	gon.onmouseover = function() {
		gon2.style.display = '';
	}
}
function viewLayer2(layer) {
	var gon = document.getElementById(layer);
	gon.style.display = '';	
}

function hideLayer(menu, layer) {
	var gon = document.getElementById(menu);
	var gon2 = document.getElementById(layer);
	gon.onmouseout = function() {
		gon2.style.display = 'none';
	}
}
function hideLayer2(layer) {
	var gon = document.getElementById(layer);
	gon.style.display = 'none';	
}

function op(id) {	
	var gon = document.getElementById(id);
	gon.style.display = '';
}
function cl(id) {	
	var gon = document.getElementById(id);
	gon.style.display = 'none';
}

function cl_off(gon) {		
	gon.className = gon.className.replace('_on','_off');
}
function cl_on(gon) {		
	gon.className = gon.className.replace('_off','_on');
}

function cl_ch(id,class1,class2) {	
	var gon = document.getElementById(id);
	var class1 = class1;
	var class2 = class2;
	if (gon.className == class1) {
		gon.className = class2;
	}
	else if (gon.className == class2) {
		gon.className = class1;
	}
}

function menu_f(id,total,num) {	
	var id = id;
	var total = total;
	var off = new Array();
	var on = new Array();
	for(j=0; j <= eval(total); j++) { 
		off[j] = document.getElementById(id + eval(j+1) + '_off'); 
		on[j] = document.getElementById(id + eval(j+1) + '_on'); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			off[i].style.display = 'none'; 
			on[i].style.display = ''; 
		}
		else { 
			off[i].style.display = ''; 
			on[i].style.display = 'none'; 
		}
	}
}

function menu_g(id,cont,total,num) {	
	var id = id;
	var cont = cont;
	var total = total;
	var menu = new Array();
	var content = new Array();
	for(j=0; j <= eval(total); j++) { 
		menu[j] = document.getElementById(id + eval(j+1)); 
		content[j] = document.getElementById(cont + eval(j+1)); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			menu[i].src = menu[i].src.replace('_off','_on');
			content[i].style.display = ''; 
		}
		else { 
			menu[i].src = menu[i].src.replace('_on','_off');
			content[i].style.display = 'none'; 
		}
	}
}

function menu_h(id,cont,total,num) {	
	var id = id;
	var cont = cont;
	var total = total;
	var menu = new Array();
	var content = new Array();
	for(j=0; j <= eval(total); j++) { 
		menu[j] = document.getElementById(id + eval(j+1)); 
		content[j] = document.getElementById(cont + eval(j+1)); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			menu[i].className = menu[i].className.replace('off','on');
			content[i].style.display = ''; 
		}
		else { 
			menu[i].className = menu[i].className.replace('on','off');
			content[i].style.display = 'none'; 
		}
	}
}

function menu_i(id,total,num) {	
	var id = id;
	var total = total;
	var menu = new Array();
	var content = new Array();
	for(j=0; j <= eval(total); j++) { 
		menu[j] = document.getElementById(id + eval(j+1)); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			menu[i].className = menu[i].className.replace('off','on');
		}
		else { 
			menu[i].className = menu[i].className.replace('on','off');
		}
	}
}

function menu_j(id,total,num) {	
	var id = id;
	var total = total;
	var menu = new Array();
	var content = new Array();
	for(j=0; j <= eval(total); j++) { 
		menu[j] = document.getElementById(id + eval(j+1)); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			menu[i].style.display='';
		}
		else { 
			menu[i].style.display='none';
		}
	}
}

function menu_k(id,cont1,cont2,total,num) {	
	var id = id;
	var cont1 = cont1;
	var cont2 = cont2;
	var total = total;
	var menu = new Array();
	var content1 = new Array();
	var content2 = new Array();
	for(j=0; j <= eval(total); j++) { 
		menu[j] = document.getElementById(id + eval(j+1)); 
		content1[j] = document.getElementById(cont1 + eval(j+1)); 
		content2[j] = document.getElementById(cont2 + eval(j+1)); 
	}
	for(var i=0 ; i<= eval(total); i++) {
		if (i == num) { 
			menu[i].style.display = ''; 
			content1[i].style.display = ''; 
			content2[i].style.display = ''; 
		}
		else { 
			menu[i].style.display = 'none'; 
			content1[i].style.display = 'none'; 
			content2[i].style.display = 'none'; 
		}
	}
}

function classOn(id) {
	var gon = document.getElementById(id);
	gon.className = gon.className.replace('off', 'on');
}
function classOff(id) {
	var gon = document.getElementById(id);
	gon.className = gon.className.replace('on', 'off');
}

function openLayer(id) {
	var gon = document.getElementById(id);
	gon.style.display = '';
}
function closeLayer(id) {
	var gon = document.getElementById(id);
	gon.style.display = 'none';
}

function copy_clip(meintext){
    if (window.clipboardData){
		window.clipboardData.setData("Text", meintext);
    }
    else if (window.netscape){
		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
		if (!clip) return;
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
		if (!trans) return;
		trans.addDataFlavor('text/unicode');
		var str = new Object();
		var len = new Object();
		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
		var copytext=meintext;
		str.data=copytext;
		trans.setTransferData("text/unicode",str,copytext.length*2);
		var clipid=Components.interfaces.nsIClipboard;
		if (!clip) return false;
			clip.setData(trans,null,clipid.kGlobalClipboard);
    }
    alert("복사되었습니다.\n붙여넣기(Ctrl+v)를 이용하시면 됩니다.");
    return false;
}

function viewFlash(src,width,height,wmode)
{
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">');
	document.write('<param name=movie value="' + src + '">');
	document.write('<param name=quality value=high>');
	document.write('<param name=allowScriptAccess value=always>');
	if(wmode == 0){ document.write('<param name="wmode" value="transparent">');}
	document.write('<embed src="' + src + '" quality=high pluginspage="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent" width="' + width + '" height="' + height + '">');
	document.write('</embed> ');
	document.write('</object>');
}

function ocLayer(id) {
	var gon = document.getElementById(id);
	if (gon.style.display == 'none') { 
		gon.style.display = '';	
	}
	else if (gon.style.display == '') { 
		gon.style.display = 'none';	
	}
}

function xFocus(id) {
	var gon = document.getElementById(id);
	gon.focus();
}

function xCheck(id) {
	var gon = document.getElementById(id);
	gon.checked = true;
}