﻿
function layer_view(e_id){document.getElementById(e_id).style.display='block';}
function layer_hidden(e_id){document.getElementById(e_id).style.display='none';}

// 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 '';
}
//png아이콘-->

// RollOver
function ImageOver(imgEL){
 imgEL.src = imgEL.src.replace("off.gif", "on.gif");
}
function ImageOut(imgEL){
 imgEL.src = imgEL.src.replace("on.gif", "off.gif");
}



var oldf='';
var oldf_line='';

function FaqMenu(faqnm,line)
{
faqmenu=document.getElementById("h_ta"+faqnm).style;
faqmenuline=document.getElementById("h_ta"+faqnm+line).style;
	if(oldf!=faqmenu)
	{
	        if(oldf!='')
	        {
	       oldf.display='';
		   oldf_line.display='none';
	        }
	        faqmenu.display='none';
	        faqmenuline.display='block';
	        oldf=faqmenu;
			oldf_line=faqmenuline;
	}
	else
	{
	        faqmenu.display='';
	        faqmenuline.display='none';
	        
	        oldf='';
			oldf_line='';
	}
}
<!-- 
function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 
// --> 

//서브레프트메뉴:S//

//function LMenu_sub(mSeq,sSeq){
//	var Sobj = document.getElementById('left_menu').getElementsByTagName('dl')[mSeq-1].getElementsByTagName('dd')
//	for (i=0;i<(Sobj.length);i++){
//			if(i==(sSeq-1)){
//				Sobj[i].className="on";
//			}else{
//				Sobj[i].className="";
//			}
//		}
//}

//function LMenu_out(){
//	var Mobj = document.getElementById('left_menu').getElementsByTagName('dl')
	
//	for (j=0;j<(Mobj.length);j++){
//		var Sobj = document.getElementById('left_menu').getElementsByTagName('dl')[j].getElementsByTagName('dd')

//		for (i=0;i<(Sobj.length);i++){
//			Sobj[i].className="";
//		}
//	}
//}

//function LMenu_on(){ LMenu_out();}

//서브레프트메뉴:E//
//]]>


//
function lightBox() {
	WindowHeight = (window.innerHeight) ? window.innerHeight : (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;
	OffWidth = document.documentElement.scrollWidth;
	OffHeight = document.documentElement.scrollHeight;
	if ( OffHeight < WindowHeight ) { OffHeight = WindowHeight; 	}
	
	var spinBox = document.createElement('div');
	spinBox.style.backgroundColor = "#000000";
	spinBox.id = "ThumbnailScroll_Box";
	spinBox.style.width = OffWidth + "px";
	spinBox.style.height = OffHeight + "px";
	spinBox.style.position = "absolute";
	spinBox.style.zIndex = 30;
	spinBox.style.left = spinBox.style.top = 0 + "px";
	if ( navigator.appName.indexOf("Explorer") != -1 ) {
		spinBox.style.filter="Alpha(opacity=80)";
	} else {
		spinBox.style.opacity=0.8;
	}
	document.documentElement.getElementsByTagName("body")[0].appendChild(spinBox);
}

function lightBoxclose() {
	document.documentElement.getElementsByTagName("body")[0].removeChild(document.getElementById("ThumbnailScroll_Box"));
}

function LayerPopupClose(obj) {
	var objName = document.getElementById(obj);
	objName.style.display = "none";
	lightBoxclose();
	try{
		if(removeSelectFix) 
			{
				removeSelectFix(obj);
			}
		}
	catch(a){}	
}

// 레잉어 정중앙 팝업 사용방법 <a href="#" onclick="LayerPopupMousePoint(event,'id',w,h); return false;"> 
	function LayerPopupMousePoint(e,obj,addX,addY) {
		var objName = document.getElementById(obj);
		if ( objName.style.display == "block" ) {
		} else {
			lightBox();
			var tempX = document.body.scrollWidth;
			var tempY = document.body.scrollHeight;
			//alert("tempX :" + tempX + ",tempY :" + tempY + ",e.clientX :" + e.clientX + ",e.clientY :" + e.clientY);
			objName.style.left = ((tempX - addX )/ 2 ) + "px";
			objName.style.top = 335 + "px";
			objName.style.display = "block";
		}
		//ie6
		try{
			if(selectFix) 
				{
					selectFix(obj);
				}
			}
		catch(a) {}	
	}

//<!--[if lte IE 6.0]>
function selectFix(divID) {
	var tar = document.getElementById(divID);
	var tarWidth = tar.offsetWidth;
	var tarHeight = tar.offsetHeight;
	var tarTop = tar.offsetTop;
	var tarLeft = tar.offsetLeft;
	var coverID = divID + "_cover";
	if (document.getElementById(coverID)) return false;
		var cover = document.createElement("iframe");
			tar.parentNode.insertBefore(cover,tar);
			cover.setAttribute("id",coverID);
		
		if (!document.getElementById(coverID)) return false;
		
		var obj = document.getElementById(coverID);
			obj.setAttribute("frameborder",0);
			obj.style.position = "absolute";
			obj.style.top = tarTop + "px";
			obj.style.left = tarLeft + "px";
			obj.style.width = tarWidth + "px";
			obj.style.height = tarHeight + "px";
}

function removeSelectFix(divID) {
	var tar = document.getElementById(divID);
	var obj = document.getElementById(divID + "_cover");

	if (!obj) return false;
		tar.parentNode.removeChild(obj);  
}
//<![endif]-->


