//µð·ºÅä¸®¸í »Ì±â
var xurl = document.location.href;
var yurl = xurl.split("/");
var sub_dir = yurl[3].split(".");
var sub_dir = sub_dir[0].toLowerCase();

function MM_swapImage() {
	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];
		}
}
function MM_findObj(n, d) { //v4.0
	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 && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImgRestore() {
	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 open_scroll_no(xurl, tar, wid, hei){
	set = 'width='+wid+',height='+hei+',left=0,top=0,toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no'
	window.open(xurl,tar,set);
}
function open_scroll_yes(xurl, tar, wid, hei){
	set = 'width='+wid+',height='+hei+',left=0,top=0,toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no'
	window.open(xurl,tar,set);
}
// flash
function flash_wf(flash_name,flash_width,flash_height,flash_id,wmd,idx){
	document.write(" \
		<Object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' id='"+flash_id+"' ALIGN=''> \
		<PARAM NAME=movie VALUE='"+flash_name+"'> \
		<PARAM NAME=quality VALUE=high> \
	");
	if( wmd == '1' ){
		document.write(" \
			<PARAM NAME=wmode VALUE=transparent> \
		");
	}
	if( idx != '' ){
		document.write(" \
			<param name=flashvars value='"+idx+"'> \
		");
	}
	if( wmd == '1' ){
		if( idx != '' ){
			document.write(" \
				<EMBED src='"+flash_name+"' flashvars='"+idx+"' wmode='transparent' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
			");
		}else{
			document.write(" \
				<EMBED src='"+flash_name+"' wmode='transparent' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
			");
		}
	}else{
		if( idx != '' ){
			document.write(" \
				<EMBED src='"+flash_name+"' flashvars='"+idx+"' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
			");
		}else{
			document.write(" \
				<EMBED src='"+flash_name+"' quality=high  WIDTH='"+flash_width+"' HEIGHT='"+flash_height+"' NAME='"+flash_id+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \
			");
		}
	}
	document.write(" \
		</EMBED> \
		</OBJECT> \
	");
}
// menu link
function GoMenu(obj) {
	//alert(obj);
	switch (obj){
		// È¨
		case "1" :
			location.href= "/main/mainAction/Init.do";
		break;
		// ±â¾÷Á¤º¸
		case "100" :
			location.href= "/introduce/introduce_navigation/Overview.do";
		break;
		case "110" :
			location.href= "/introduce/introduce_navigation/Overview.do";
		break;
		case "120" :
			location.href= "/introduce/introduce_navigation/Ethics1.do";
		break;
		case "130" :
			location.href= "/introduce/introduce_navigation/Stock.do";
		break;
		case "140" :
			location.href= "/introduce/introduce_navigation/Hr_List.do";
		break;
		case "150" :
			location.href= "/introduce/introduce_navigation/Address.do";
		break;
		// Á¦Ç°¼Ò°³
		case "200" :
			location.href= "/product/product_list/Product_Main.do";
		break;
		case "210" :
			location.href= "/product/product_list/Product_View_BX.do";
		break;
		case "220" :
			location.href= "/product/product_list/Product_View_ITX.do";
		break;
		case "230" :
			location.href= "/product/product_list/Product_Search.do";
		break;
		// È«º¸½Ç
		case "300" :
			location.href= "/pr/pr_list/Movie_List.do";
		break;
		case "310" :
			location.href= "/pr/pr_list/Movie_List.do";
		break;
		case "320" :
			location.href= "/pr/pr_list/Radio_List.do";
		break;
		case "330" :
			location.href= "/pr/pr_list/Paper_List.do";
		break;
		case "340" :
			location.href= "/pr/pr_list/Notice_List.do";
		break;
		// ±â¼úÁ¤º¸
		case "400" :
			location.href= "/technical/technical_list/Technical_Mf.do";
		break;
		case "410" :
			location.href= "/technical/technical_list/Technical_Mf.do";
		break;
		case "420" :
			location.href= "/technical/technical_list/Battery_Info.do";
		break;
		case "430" :
			location.href= "/technical/technical_list/Battery_Test.do";
		break;
		case "440" :
			location.href= "/technical/technical_list/Quality.do";
		break;
		case "450" :
			location.href= "/technical/technical_list/Packing.do";
		break;
		// °í°´¸¶´ç
		case "500" :
			location.href= "/customer/customer_list/Customer_Info.do";
		break;
		case "510" :
			location.href= "/customer/customer_list/Customer_Info.do";
		break;
		case "520" :
			location.href= "/customer/customer_list/Faq_List.do";
		break;
		case "530" :
			location.href= "/customer/customer_list/Partner_List.do";
		break;
		case "540" :
			location.href= "/customer/customer_list/Certi_List.do";
		break;
		case "550" :
			location.href= "/customer/customer_list/Contact_Write.do";
		break;
		// ETC
		case "1001" :	//°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§
			open_scroll_no("/main/mainAction/Privacy.do","_privacy","650","750");
		break;
		case "1002" :	// ³»ºÎÁ¤º¸°ü¸®±ÔÁ¤
			open_scroll_no("/main/mainAction/Agreement.do","_agreement","650","750");
		break;
	}
}

// Åõ¸íÀÌ¹ÌÁö
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 '';
}

//Family Site
function CHfamilysite(){
	document.getElementById("familysitelist").style.display = "block";
}
function CHfamilysiteOff(){
	document.getElementById("familysitelist").style.display = "none";
}
