function OpenMenu( num ) {

			if (num==1) location.href = '/main.html';             				        //intro
            if (num==2) location.href = 'mailto:';      	                                	//메일
			if (num==3) location.href = '/sub/sub04.html';	                                  //사이트맵
			if (num==4) location.href = '/admin';                 						    //관리자
	    	if (num==5) location.href = '/en/product/sub01_1.html';                 						    //
			if (num==6) location.href = '/jp/product/sub01_1.html';                 						    //
			if (num==7) location.href = '/product/sub01_1.html';                 						    //
			if (num==1004) location.href = '/main.html';                 				//main


			if (num==8) location.href = '/html/?code=B03';						// 스파스 공지사항

//제품소개
			if (num==101) location.href = '/product/sub01_1.html';						//DRIVERS
			if (num==1011) location.href = '/product/sub01_1.html';						//
			if (num==1012) location.href = '/product/sub01.html';					//
			if (num==102) location.href = '/product/sub02.html';						//WOODS
			if (num==1021) location.href = '/product/sub02.html';						//
			if (num==1022) location.href = '/product/sub02_1.html';					//
			if (num==103) location.href = '/product/sub03.html';						//IRONS
			if (num==1031) location.href = '/product/sub03.html';						//
			if (num==1032) location.href = '/product/sub03_1.html';					//
			if (num==1033) location.href = '/product/sub03_2.html';					//
			if (num==1034) location.href = '/product/sub03_3.html';					//
			if (num==104) location.href = '/product/sub04.html';						//WEDEGES
			if (num==1041) location.href = '/product/sub04.html';						//
			if (num==1042) location.href = '/product/sub04_1.html';					//
			if (num==1043) location.href = '/product/sub04_2.html';					//
			if (num==105) location.href = '/product/sub05.html';						//PUTTERS
			if (num==1051) location.href = '/product/sub05.html';						//
			if (num==1052) location.href = '/product/sub05_1.html';					//
			if (num==1053) location.href = '/product/sub05_2.html';					//
			if (num==106) location.href = '/product/bag.html';						//GOODS
			if (num==1061) location.href = '/product/bag.html';						//
			if (num==1062) location.href = '/product/covers.html';					//
			if (num==1063) location.href = '/product/cap.html';					//
			if (num==1064) location.href = '/product/visor.html';					//


//상단메뉴
			if (num==201) location.href = '/sub/sub01.html';						//이용약관

			if (num==301) location.href = '/html/?code=B01';						//게시판
			if (num==3011) location.href = '/html/?code=B02';						//게시판

			if (num==401) location.href = '/sub/sub03.html';						//판매대리점
			if (num==501) location.href = '/sub/sub04.html';						//사이트맵
			if (num==601) location.href = '/sub/privacy.html';						//개인정보보호정책
//회원

	if (num==801) location.href = '/mypage/';							//로그인
	if (num==802) location.href = '/mypage/?mode=agree';							//회원가입
	if (num==803) location.href = '/mypage/';							//정보수정
	if (num==804) location.href = '/mypage/?mode=logout';							//로그아웃

	//if (num==501) window.open('http://www.e-mg.co.kr','','');
	//if (num == 504) alert("준비중입니다");
    //if (num==204) window.open('/product/p_program.asp','p1','width=735,height=765,scrollbars=no,top=0,left=0');			//

}


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];
  }
}
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;
}

var old='';

function menu(name)
{
submenu=eval("submenu_"+name+".style");
		if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}

function popimg2(url, width, height, opt) {

	if (opt != null && opt != '') opt = ',' + opt;
	str = '<body topmargin=0 leftmargin=0><img src="' + url + '" border=0 onmousedown=" self.close(); "></body>';
	pop = window.open('','zome','width=' + width + ',height=' + height + opt);
	pop.focus();
	pop.document.write(str);
}

//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 '';
}

//모든링크테두리없애기
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수, 윈도우모드)
function flashWrite(url,w,h,id,bg,vars,win){

	// 플래시 코드 정의
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// 플래시 코드 출력
	document.write(flashStr);
	//<script>flashWrite('/img/main.swf','595','450','','','','transparent')</script>
}

function swapMenu() {
	imgid = document.all(arguments[0].id);
	tbl = document.all(arguments[1]);
	if (arguments[2] == null) arguments[2] = '';
	arguments[2] = arguments[2] + '.';
	if (arguments[3] == null) arguments[3] = '_r';
	arguments[3] = arguments[3] + '.';
	if (arguments[0].src.indexOf(arguments[3]) == -1) return;
	for (var i=0; i < imgid.length; i++) {
		if (imgid[i] == arguments[0]) { tbl[i].style.display = ''; imgid[i].src = imgid[i].src.substring(0,imgid[i].src.lastIndexOf(arguments[3])) + arguments[2] + imgid[i].src.substring(imgid[i].src.lastIndexOf('.')+1); continue;}
		if (imgid[i].src.indexOf(arguments[3]) == -1) { tbl[i].style.display = 'none'; imgid[i].src = imgid[i].src.substring(0,imgid[i].src.lastIndexOf(arguments[2])) + arguments[3] + imgid[i].src.substring(imgid[i].src.lastIndexOf('.')+1); continue;}
	}
}
