function MM_swapImgRestore() { //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 MM_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=MM_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 MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


/* Main 공지사항/ 보도자료/ 교육세미나 */
//--------------------------------------------------------------------------------------------
	// 공지사항
	//--------------------------------------------------------------------------------------------
	function fncFriend01()
	{
		var f = document.friendForm;
		f.sClickMode.value = "1";
		document.getElementById('friend01').style.display = "block";
		document.getElementById('friend02').style.display = "none";
		document.getElementById('friend03').style.display = "none";
		
		/*document.getElementById('liCls1').className = "on";
		document.getElementById('liCls2').className = "";
		document.getElementById('liCls3').className = "";
		
		document.friendLink_01.src = "/images/hsMain/tab_fz01_on.gif";
		document.friendLink_02.src = "/images/hsMain/tab_fz02.gif";
		document.friendLink_03.src = "/images/hsMain/tab_fz03.gif";
		*/
	}
	
	//--------------------------------------------------------------------------------------------
	// 보도자료
	//--------------------------------------------------------------------------------------------
	function fncFriend02()
	{
		var f = document.friendForm;
		f.sClickMode.value = "2";
		document.getElementById('friend01').style.display = "none";
		document.getElementById('friend02').style.display = "block";
		document.getElementById('friend03').style.display = "none";
		
		/*document.getElementById('liCls1').className = "";
		document.getElementById('liCls2').className = "on";
		document.getElementById('liCls3').className = "";
		
		document.friendLink_01.src = "/images/hsMain/tab_fz01.gif";
		document.friendLink_02.src = "/images/hsMain/tab_fz02_on.gif";
		document.friendLink_03.src = "/images/hsMain/tab_fz03.gif";
		*/
	}
	
	//--------------------------------------------------------------------------------------------
	// 교육세미나
	//--------------------------------------------------------------------------------------------
	function fncFriend03()
	{
		var f = document.friendForm;
		f.sClickMode.value = "3";
		document.getElementById('friend01').style.display = "none";
		document.getElementById('friend02').style.display = "none";
		document.getElementById('friend03').style.display = "block";
		
		/*document.getElementById('liCls1').className = "";
		document.getElementById('liCls2').className = "";
		document.getElementById('liCls3').className = "on";
		
		document.friendLink_01.src = "/images/hsMain/tab_fz01.gif";
		document.friendLink_02.src = "/images/hsMain/tab_fz02.gif";
		document.friendLink_03.src = "/images/hsMain/tab_fz03_on.gif";
		*/
	}	



	var bbsJson = {"bbs_cd": [
	              {"bbs_name": "","tit_img": ""},
	              {"bbs_name": "Q&A","tit_img": ""},
	              {"bbs_name": "FAQ","tit_img": ""},
	              {"bbs_name": "공지사항","tit_img": "<img src='images/top_title_m04_s01.gif' width='350' height='32' alt='공지사항' />"},
	              {"bbs_name": "보도자료","tit_img": "<img src='images/top_title_m04_s02.gif' width='350' height='32' alt='보도자료' />"},
	              {"bbs_name": "뉴스레터","tit_img": "<img src='images/top_title_m04_s03.gif' width='350' height='32' alt='뉴스레터' />"},
	              {"bbs_name": "청파이엠티행사","tit_img": "<img src='images/top_title_m04_s04.gif' width='350' height='32' alt='청파이엠티행사' />"},
	              {"bbs_name": "전시회안내","tit_img": "<img src='images/top_title_m04_s05.gif' width='350' height='32' alt='전시회안내' />"},
	              {"bbs_name": "전시회리포트","tit_img": "<img src='images/top_title_m04_s06.gif' width='350' height='32' alt='전시회리포트' />"},
	              {"bbs_name": "납품사례","tit_img": "<img src='images/top_title_m04_s07.gif' width='350' height='32' alt='납품사례' />"},
	              {"bbs_name": "이벤트","tit_img": "<img src='images/top_title_m04_s08.gif' width='350' height='32' alt='이벤트' />"}
	          ]
	};
	
	
function faq_list(){
	var obj_p = document.getElementById('faq-list');
	var obj_li = obj_p.getElementsByTagName('li');
	for(var i=0; i<obj_li.length; i++){
		if(obj_li[i].getElementsByTagName('div')[0].getElementsByTagName('a')[0]){
			obj_li[i].getElementsByTagName('div')[0].getElementsByTagName('a')[0].onclick = function(){
				this.blur();
			}
		}else return;
		obj_li[i].getElementsByTagName('div')[0].onclick = function(){
			if(this.parentNode.getElementsByTagName('div')[1].style.display == 'block'){
				this.parentNode.getElementsByTagName('div')[1].style.display = 'none';
				this.className = 'faq-q';
				return false;
			}else{
				this.parentNode.getElementsByTagName('div')[1].style.display = 'block';
				this.className = 'faq-q current';
				return false;
			}
		}
	}
}
function fnBbs_view(idx,bbs_cd)
{

	$("#idx").val(idx);
	$("#bbs_cd").val(bbs_cd);
	$('#bbs')
	.attr('action','Controller?cmd=pr.view')
	.submit(); 
	
}
function fnBbs_list(bbs_cd)
{
	if(bbs_cd != "")
		$("#bbs_cd").val(bbs_cd);
	$('#bbs')
	.attr('action','Controller?cmd=pr.list')
	.submit(); 

}
// flash
function viewFlash_ad(src, width, height)
{
	document.write ("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" + width + "' height='" + height + "'><param name='movie' value='" + src + "'><param name='play' value='true'><param name='loop' value='true'><param name='quality' value='high'><param name=wmode value=transparent /><embed width='" + width + "' height='" + height + "' src='" + src + "' play='true' loop='true' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' wmode='transparent'></embed></object>");
}
