﻿
// 기본
function swap() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function swapImg() { //v3.0
  var i,j=0,x,a=swapImg.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


// 마우스오버했을때 이미지 
function ROLL() { //v3.0
  var i,j=0,x,a=ROLL.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//-->

//contents ON / OFF
var old='';
function fn_visible(name)
{
	submenu=document.getElementById("hidden_con_"+name).style;
		if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}

	//FAQ메뉴 

	var tempFAQNo = ''; 	   
	
	function initiate()
	{
        if(selectedNo != null && selectedNo.length >0)
        {
            viewFAQ(selectedNo);
        }

		if("" == '')
		{
			if("" != '007')
			{
				var tabObj = document.all['Tab' + '007'];
				if(typeof(tabObj)=="undefined") return;
				
				if(tabObj.tagName=="IMG")
				{
					var i = tabObj.src.lastIndexOf(".");
					if( (i>0) && (tabObj.src.charAt(i-1)!='o') )
					{
						tabObj.src = tabObj.src.substring(0, i) + "o" + tabObj.src.substring(i);
					}
					
					tabObj.onmouseover = null;
					tabObj.onMouseOut  = null;
					
				}
				else
				{
					document.all[tabName].style.fontWeight = "bold";
				}
			}
		}
	}
	

	
	function viewFAQ(no)
	{
		if(tempFAQNo == no) 
		{
			document.all['A' + no].style.display = 'none';
			document.all['Q' + no + 'T'].style.fontWeight = 'normal';
			tempFAQNo = '';
		}
		else 
		{
			if("" != tempFAQNo) 
			{
				document.all['A' + tempFAQNo].style.display = 'none';
				document.all['Q' + tempFAQNo + 'T'].style.fontWeight = 'normal';
			}
			
			document.all['A' + no].style.display = 'block';
			document.all['Q' + no + 'T'].style.fontWeight = 'bold';
			tempFAQNo = no;
		}
	}
	
//-->





//아이프레임 자동 넓이 조절

function doResize()
{
container.height = author.document.body.scrollHeight;
container.width = author.document.body.scrollWidth;
}


//플래쉬 점선처리
function Flash(fm,w,h,opt) {
	var _data ="";

	_data+="<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 ";
	_data+="codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width="+w+" height="+h+">";
	_data+="	<param name=allowScriptAccess value=sameDomain>";
	_data+="	<param name=movie value="+fm+"?" + opt + ">";
	_data+="	<param name=quality value=high>";
		_data+="	<embed src="+fm+"?" + opt;
	_data+="	quality=high pluginspage=http://www.macromedia.com/go/getflashplayer ";
	_data+="	type=application/x-shockwave-flash wmode=transparent allowScriptAccess=sameDomain width="+w+" height="+h+"></embed>";
	_data+="</object>";

	document.write(_data);
}
//----->

function top(fm,w,h,opt) {
	var _data ="";

	_data+="<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 ";
	_data+="codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width="+w+" height="+h+">";
	_data+="	<param name=allowScriptAccess value=sameDomain>";
	_data+="	<param name=movie value="+fm+"?" + opt + ">";
	_data+="	<param name=quality value=high>";
	_data+="	<param name=wmode value=transparent>";
	_data+="	<embed src="+fm+"?" + opt;
	_data+="	quality=high pluginspage=http://www.macromedia.com/go/getflashplayer ";
	_data+="	type=application/x-shockwave-flash wmode=transparent allowScriptAccess=sameDomain width="+w+" height="+h+"></embed>";
	_data+="</object>";

	document.write(_data);
}
//----->

//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 ''; 
} 
//----->

