<!--
var old_menu = '';

function menuclick( submenu )
{
if( old_menu != submenu ) {

if( old_menu !='' ) {

old_menu.style.display = 'none';

}

submenu.style.display = 'block';

old_menu = submenu;

} else {

submenu.style.display = 'none';

old_menu = '';

}

}


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.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_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 flash(s,w,h,type,wm,id,autostart) 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspage = new String; 
  var embedType = new String; 
  var src = new String; 
  var width = new String; 
  var height = new String; 


src = s; 
width = w; 
height = h; 

var typ = type ? type : "f"; 

if(typ=="f")//플래시 
{ 
clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
embedType = "application/x-shockwave-flash"; 
} else if(typ=="m") {//미디어 
clsid="22D6F312-B0F6-11D0-94AB-0080C74C7E95"; 
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"; 
embedType="application/x-oleobject"; 
parameter += "<param name='FileName' value='"+ src + "'>\n"; 
var auto = autostart ? "1" : "0"; 
parameter += "<param name='AutoStart' value='"+auto+"'>\n";  
} 
parameter += "<param name='movie' value='"+ src + "'>\n";  
parameter += "<param name='quality' value='high'>\n"; 
////추가/// 
parameter += "<param name='allowScriptAccess' value='always'>\n"; 
////추가/// 
if(wm) 
{ 
parameter += "<param name='wmode' value='transparent'>\n"; 
} 
if ( clsid ) 
{ 
obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\" width='"+ width +"' height='"+ height +"'>\n"; 
} 
embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" allowScriptAccess='always'></embed>\n"; 
//// allowScriptAccess='always' 추가/// 
if ( obj ) 
{ 
embed += "</object>\n"; 
} 
html = obj + parameter + embed; 
document.write( html ); 
} 






// 각 서브페이지 좌측 메뉴 롤오버 상태를 고정시키는 함수 
var basic_img = ""; 
function lock_menu(Menu, cate) { 
if (Menu) { 
var target_menu = eval("document.all."+Menu); 
target_menu.src = (cate) ? "/eng02/" + cate + "/images/"+Menu+"_on.gif" : 
"images/"+Menu+"_on.gif"; 
basic_img = Menu; 
}
} 


function inact(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + '.src') 
     } 

function act(imgName) 
    {   if (document.image && basic_img != imgName) 
        document[imgName].src = eval(imgName + 'a.src') 
     } 
	 
	 
 function showObject(object) { 
        document.getElementById(object).style.display ='block'; 
  
    } 
    /* Hide an object */ 
function hideObject() 
{ 
// 
 for (i=1; i<9; i++)
 {
  if (document.getElementById('m'+i))
  {
    document.getElementById('m'+i).style.display ='none';
  }
         
 }
}


/*
*	포커스이동
*/
function focus_next(first,len,end){
	if (event.keyCode !=8){
	  var str = first.value.length;
	  if(str == len)
		  end.focus();
	}
}

/*
*	숫자만 입력되게
*/
function isnum(FRM){
	if(isNaN(FRM.value)){
		alert("숫자만 입력하세요.");
		FRM.value = "";
		FRM.focus();
	}
}



/*
*	좌측메뉴스크립트
*/
var old='';
function menu(name){
		
	submenu=eval("submenu_prodeval"+name+".style");

	if(old!=submenu)	//클릭했다면...
	{
		if(old!='')	//계속none
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}





function go_url(ss)
{
	switch(ss)
	{

		case"01":
			location.replace('/eng02/company/01_about.php');
		break;
		case"01-01":
			location.replace('/eng02/company/01_about.php');
		break;
		case"01-02":
			location.replace('/eng02/company/04_history.php');
		break;
		case"01-03":
			location.replace('/eng02/company/02_business.php');
		break;
		case"01-04":
			location.replace('/eng02/company/02_business.php#certificate');
		break;
		case"01-05":
			location.replace('/eng02/company/03_location.php');
		break;
		


		case"02":
			location.replace('/eng02/product/promain02.php');	
		break;
		case"02-00":
			location.replace('/eng02/product/promain.php');	
		break;
		case"02-01":
			location.replace('/eng02/product/01_materials01.php');
		break;
		case"02-02":
			location.replace('/eng02/product/02_01_01_products.php?yun=01');
		break;
		case"02-03":
			location.replace('/eng02/product/03_01_comparative.php');
		break;
		


		case"03":
			location.replace('/eng02/board/bbs/board.php?bo_table=construct_01');	
		break;
		case"03-01":
			location.replace('/eng02/board/bbs/board.php?bo_table=construct_01');
		break;
		

		case"04":
			location.replace('/eng02/tech/01_process.php');	
		break;
		case"04-01":
			location.replace('/eng02/tech/01_process.php');
		break;
		case"04-02":
			location.replace('/eng02/tech/02_tech.php');	
		break;
		case"04-03":
			location.replace('/eng02/board/bbs/board.php?bo_table=tech_03');	
		break;
		case"04-04":
			location.replace('/eng02/board/bbs/board.php?bo_table=tech_03');	
		break;
		case"04-05":
			location.replace('/eng02/board/bbs/board.php?bo_table=tech_03');	
		break;


		case"05":
			location.replace('/eng02/board/bbs/board.php?bo_table=customer_02');
		break;
		case"05-01":
			location.replace('/eng02/board/bbs/board.php?bo_table=customer_02');
		break;
		case"05-02":
			location.replace('/eng02/board/bbs/write.php?bo_table=customer_03');
		break;
		case"05-03":
			location.replace('/eng02/board/bbs/board.php?bo_table=customer_03');
		break;


		case"12":  //국문
			location.replace('/');
		break;
		case"07":  //중문
			location.replace('/chn/');
		break;
		case"08":  //일문
			location.replace('/jpn/');
		break;

		case"09":  //홈
			location.replace('/eng02/');
		break;

		case"10":  //contact us
			location.replace('mailto:');
		break;

		case"11":  //intranet
			location.replace('http://gw.foamtech.co.kr');
		break;


		case"90":  // 팝업
			document.getElementById('popupfl').style.display="none";
		break;



	}
}


document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
var prevdiv = null;
var timerID = null;

function getMouseXY(e) 
{

        tempX = event.clientX + document.body.scrollLeft;
        tempY = event.clientY + document.body.scrollTop;


    if (tempX < 0) {tempX = 0;}
    if (tempY < 0) {tempY = 0;}  

    return true;
}
//이미지보기
function imageview(id, w, h)
{

    menu(id);
    var el_id = document.getElementById(id);
    submenu = el_id.style;
    submenu.left = tempX - (parseInt(w) + 11);
    submenu.top  = tempY - ( parseInt(h) / 2 );

    selectBoxVisible();

    //if (el_id.style.display != 'none')
        //selectBoxHidden(id);
}

    function selectBoxHidden(layer_id) 
    {
        //var ly = eval(layer_id);
        var ly = document.getElementById(layer_id);

        // 레이어 좌표
        var ly_left   = ly.offsetLeft;
        var ly_top    = ly.offsetTop;
        var ly_right  = ly.offsetLeft + ly.offsetWidth;
        var ly_bottom = ly.offsetTop + ly.offsetHeight;

        // 셀렉트박스의 좌표
        var el;

        for (i=0; i<document.forms.length; i++) {
            for (k=0; k<document.forms[i].length; k++) {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one") {
                    var el_left = el_top = 0;
                    var obj = el;
                    if (obj.offsetParent) {
                        while (obj.offsetParent) {
                            el_left += obj.offsetLeft;
                            el_top  += obj.offsetTop;
                            obj = obj.offsetParent;
                        }
                    }
                    el_left   += el.clientLeft;
                    el_top    += el.clientTop;
                    el_right  = el_left + el.clientWidth;
                    el_bottom = el_top + el.clientHeight;

                    // 좌표를 따져 레이어가 셀렉트 박스를 침범했으면 셀렉트 박스를 hidden 시킴
                    if ( (el_left >= ly_left && el_top >= ly_top && el_left <= ly_right && el_top <= ly_bottom) || 
                         (el_right >= ly_left && el_right <= ly_right && el_top >= ly_top && el_top <= ly_bottom) ||
                         (el_left >= ly_left && el_bottom >= ly_top && el_right <= ly_right && el_bottom <= ly_bottom) ||
                         (el_left >= ly_left && el_left <= ly_right && el_bottom >= ly_top && el_bottom <= ly_bottom) ||
                         (el_top <= ly_bottom && el_left <= ly_left && el_right >= ly_right)
                        )
                        el.style.visibility = 'hidden';
                }
            }
        }
    }

    // 감추어진 셀렉트 박스를 모두 보이게 함
    function selectBoxVisible() 
    {
        for (i=0; i<document.forms.length; i++) 
        {
            for (k=0; k<document.forms[i].length; k++) 
            {
                el = document.forms[i].elements[k];    
                if (el.type == "select-one" && el.style.visibility == 'hidden')
                    el.style.visibility = 'visible';
            }
        }
    }

    var last_id = null;
    function menu(id)
    {
        if (id != last_id)
        {
            if (last_id != null)
                document.getElementById(last_id).style.display = "none";
            document.getElementById(id).style.display = "block";
            last_id = id;
        }
        else
        {
            document.getElementById(id).style.display = "none";
            last_id = null;
        }
    }



	 

// --> 