document.title=":: Welcome to DRB America ::"

function bluring(){ 
if(event.srcElement.tagName=="A") 
    document.body.focus(); 
} 
document.onfocusin=bluring; 


/* #################################################
                                       SWF 
################################################# */


/* ??-??? */
function mainMenu_swf (){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/menu.swf' width='730' height='75'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/menu.swf' />")
    document.write("	<param name='bgcolor' value='#ffffff'>");
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}


/* ??-??? */
function mainVidual_swf (){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/mainVisual.swf' width='520' height='489'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/mainVisual.swf' />")
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}

/* ??-?????*/
function mapGlobal_swf (){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/map_global.swf' width='335' height='135'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/map_global.swf' />")
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}


biz_init=1

function biz_ch(no){

    var bizOut=document.getElementById("biz_menu").getElementsByTagName("img").item(biz_init-1)
    var bizOver=document.getElementById("biz_menu").getElementsByTagName("img").item(no-1)
    var bizOver_link=document.getElementById("biz_menu").getElementsByTagName("a").item(no-1)

    var bizImg=document.getElementById("biz_img").getElementsByTagName("img").item(0)
    var bizLink=document.getElementById("biz_img").getElementsByTagName("a").item(0)


    bizImg.src="/en/img/main/biz_g"+no+".gif"
    bizLink.href=bizOver_link.href
    bizOut.src=bizOut.src.replace("_on.gif", ".gif");
    bizOver.src=bizOver.src.replace(".gif", "_on.gif");

    biz_init=no
}

function quickMenu_swf (){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/quickMenu.swf' width='70' height='200'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/quickMenu.swf' />")
    document.write("<param name='bgcolor' value='#ffffff'>");
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}

/*
function quickMenu_swf (){
    document.write("<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='70' height='206' id='quickMenu'>")
    document.write("<param name='movie' value='/en/img/swf/quickMenu.swf?domain=/en/img/swf/quickmenu.xml' />")
    document.write("<embed src='/en/img/swf/quickmenu.swf?domain=/en/img/swf/quickMenu.xml' width='70' height='200' name='quickMenu'  type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />")
    document.write("</embed>")
    document.write("</object>")
}

*/
/* ???? */
function left_swf (dep1){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/left_"+dep1+".swf' width='167' height='145'>")
    document.write("<param name='movie' value='/en/img/swf/left_"+dep1+".swf' />")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}



/* ???? - ??????? */
function map_national_swf (){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/map_national.swf' width='680' height='260'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/map_national.swf' />")
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}



/* ???? - ??????? */
function nationalmap (dep1){
document.write("<img src='/en/img/wm01/map_global0"+dep1+".gif' useMap='#Map' />")
document.write("<map name='Map'>")
document.write("<area shape='rect' coords='19,23,180,38' href='/en/pgm/wm01030201.aspx' title='China/Qingdao' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,41,180,57' href='/en/pgm/wm01030204.aspx' title='Beijing' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,59,180,75' href='/en/pgm/wm01030205.aspx' title='Qingdao' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,77,180,93' href='/en/pgm/wm01030206.aspx' title='Shenyang' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,95,180,111' href='/en/pgm/wm01030202.aspx' title='Slovakia' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,113,180,128' href='/en/pgm/wm01030203.aspx' title='North America' onfocus='blur()'>")
document.write("<area shape='rect' coords='19,131,180,146' href='/en/pgm/wm01030207.aspx' title='Japan' onfocus='blur()'>")
document.write("</map>")
}

function flash(value, width, height){	//???
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
	document.writeln('<param name="movie" value="'+value+'">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="wmode" value="transparent">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<embed src="'+value+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" menu="false"></embed>');
	document.writeln('</object>');
}


/* ????-????? */
function vod_pr (){
document.write('<Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" src="/en/img/movie/conveyor_kor.wmv" width="319" height="210" id="MediaPlayer" Autostart="1" ShowControls="0" ShowDisplay="0" ShowStatusBar="1" DefaultFrame="Slide"></Embed>');
}


/* ?????-???*/
function cyberTour_pop(){
    //cyberTour=window.open("/kr/pgm/popup_cyberTour.aspx","cyberTour","top=20, left=20, width=790, height=570")
}
/*


/* ?????-??? */
function cyberTour_swf(){
    document.write("<object type='application/x-shockwave-flash' data='/en/img/swf/cyberTour.swf' width='790' height='570'>")
    document.write("<param name='FlashVars' value='domain=/en/img/swf/' />")
    document.write("<param name='movie' value='/en/img/swf/cyberTour.swf' />")
    document.write("<param name='wmode' value='transparent' />")
    document.write("</object>")
}



/* ????  */
function soon(){
    window.open("/KR/pgm/popup_soon.aspx", "soon", "left=0, top=0, width=443, height=225, top=10, left=10, menubar=no, statusbar=no");
}


/* ###########################################
          ??? ? ???
########################################### */

function subVidual(no){
    if(no==12){no=11}
    document.write('<img src="/en/img/menu/subVidual_'+no+'.gif" alt=""/>')
}

var deDep


function topNavi(dep1,dep2){
   deDep=dep1;

   if(dep1 >=1 && dep1<=6){

   deTop=document.getElementById("Tm"+dep1).getElementsByTagName("img").item(0)
   deSub=document.getElementById("subNavi_"+dep1);
   deSubMenu=document.getElementById("Tm"+dep1+"_"+dep2)

   deSubMenu.className="on";
   deSub.style.display="block";
   deTop.src=deTop.src.replace(".gif","_on.gif");
   }

}

function topOver(no){
	chTop=document.getElementById("Tm"+no).getElementsByTagName("img").item(0)
    chSub=document.getElementById("subNavi_"+no);

    if (deDep==0 || deDep==7 || deDep==11 || deDep==12){
      chSub.style.display="block";
      chTop.src=chTop.src.replace(".gif", "_on.gif");;
    }else{
        if (deDep != no){
            deSub.style.display="none";
            chSub.style.display="block";
            deTop.src=deTop.src.replace("_on.gif", ".gif");
            chTop.src=chTop.src.replace(".gif", "_on.gif");
       }
    }
}




function topOut(no){
    if (deDep==0 || deDep==7 || deDep==11 || deDep==12){
        chSub.style.display="none";
        chTop.src=chTop.src.replace("_on.gif", ".gif");
    }else{

        if (deDep != no){
            chSub.style.display="none";
            chTop.src=chTop.src.replace("_on.gif", ".gif");
            deTop.src=deTop.src.replace(".gif","_on.gif");
        }
        deSub.style.display="block";
    }
}



/* ###########################################
           ????  ??? ? ???
########################################### */


function Lm_Select(){
    Ldep2 = document.getElementById("Lm"+dep2);
    Ldep2_img = Ldep2.getElementsByTagName("img").item(0);
    Ldep2_link = Ldep2.getElementsByTagName("a").item(0);

    Ldep2_img.src =  Ldep2_img.src.replace(".gif","_on.gif")
    Ldep2.className="act"

    if(dep3){
        Ldep3 = document.getElementById("Lm"+dep2+"_"+dep3);
        Ldep3_img = Ldep3.getElementsByTagName("img").item(0);
        Ldep3_link = Ldep3.getElementsByTagName("a").item(0);
        Lsub = document.getElementById("Lm"+dep2+"_sub");
        Ldep3_img.src =  Ldep3_img.src.replace(".gif","_on.gif")
        Ldep3.className="act"
        Lsub.className="block"
    }

 Lmenu_rollover()

}


function Lmenu_rollover(){
    var Ldep2 = document.getElementById("left_menu").getElementsByTagName("ul");
    var Ldep3 = document.getElementById("left_menu").getElementsByTagName("dt");

    for(i=0; i<Ldep2.length; i++){
         imgEl = Ldep2[i].getElementsByTagName("img");
        if (Ldep2[i].className != "act" ){
            imgEl[0].onmouseover = menuOver;
            imgEl[0].onmouseout = menuOut;
         }
    }

    for(i=0; i<Ldep3.length; i++){
         imgEl = Ldep3[i].getElementsByTagName("img");
        if (dep3 && Ldep3[i].className != "act" && Ldep3[i].className != "menu_no"){
            imgEl[0].onmouseover = menuOver;
            imgEl[0].onmouseout = menuOut;
         }
    }
}



/* ###########################################
                      ??? ? ???
########################################### */



function init_tab(no){

    var loc = document.getElementById("loc").getElementsByTagName("span")
    var tab = document.getElementById("tab").getElementsByTagName("li")
    var act_tab = tab.item(no-1)

        if(act_tab.className=="first" ){
         act_tab.className="first act"
        }else{
         act_tab.className="act"
        }

        for(i=0; i< tab.length; i++){
             imgEl = tab[i].getElementsByTagName("img");

            if(i== (no-1)){
                imgEl[0].src = imgEl[0].src.replace(".gif", "_on.gif");
            } else {
                imgEl[0].onmouseover = menuOver;
                imgEl[0].onmouseout = menuOut;
            }
        }

    var loc_dep4_txt =  act_tab.getElementsByTagName("img").item(0).alt
    var loc_dep4_link = act_tab.getElementsByTagName("a").item(0)
         loc.item(4).innerHTML ="&gt; <a href="+ loc_dep4_link +">" + loc_dep4_txt+ "</a> "
}


function init_tab01 (id,no){
        var tab = document.getElementById(id).getElementsByTagName("li")

        for(i=0; i< tab.length; i++){
             imgEl = tab[i].getElementsByTagName("img");

            if(i== (no-1) && no !=0){
                imgEl[0].src = imgEl[0].src.replace(".gif", "_on.gif");
            } else {
                imgEl[0].onmouseover = menuOver;
                imgEl[0].onmouseout = menuOut;
            }
        }

}



/* ###########################################
                      location ??
########################################### */


function loc(){
    var Loc = document.getElementById("loc").getElementsByTagName("span")
    var Ldep1 = document.getElementById("left").getElementsByTagName("span").item(0);

    Loc.item(0).innerHTML='<a href="#">DRB Main</a> '
    Loc.item(1).innerHTML="&gt; "+ Ldep1.innerHTML+" "
    Loc.item(2).innerHTML="&gt; <a href="+ Ldep2_link +">" + Ldep2_img.alt+ "</a> "
    if(dep3 !=0 && dep3 !=null){
    Loc.item(3).innerHTML="&gt; <a href="+ Ldep3_link +">" + Ldep3_img.alt+ "</a> "
    }
}



/* ###########################################
                        ?????? - ??
########################################### */

function menuOver() {
	this.src = this.src.replace(".gif", "_on.gif");
}

function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}


/* #################################################
                    ??? ????? ??? ???
################################################# */

function IEZN_quick_menu_simple(input_obj,move_top){
    this.timeId     = new Array();
    this.div_obj = new Array();
    try{
        this.input_obj = input_obj;
        this.input_obj.style.display = 'none';
    }catch(e){}
    var IEZN_quick_menu_counter;
    IEZN_quick_menu_counter = (typeof(IEZN_quick_menu_counter)=='undefined')? 0:IEZN_quick_menu_counter++;
    this.counter = IEZN_quick_menu_counter;
    this.div_obj_top = parseInt(this.input_obj.style.top);
    this.div_obj_left = parseInt(this.input_obj.style.left);    
    this.div_obj_max_move_top = (move_top)? move_top:this.div_obj_top;//browser top offset 
    this.move();
}

IEZN_quick_menu_simple.prototype = {    
    move : function(){
        this.div_obj = document.createElement("div");
        this.div_obj.id='izqm1'+this.counter;
        this.div_obj.style.position = 'absolute';
        this.div_obj.style.top=this.div_obj_top+'px';
        this.div_obj.style.padding='0px';
        this.div_obj.style.left=this.div_obj_left+'px';
        this.div_obj.style.backgroundColor=(this.input_obj.style.backgroundColor)? this.input_obj.style.backgroundColor:'transparent';
        this.div_obj.style.overflow='hidden';
        this.div_obj.style.textOverflow='ellipsis';
        this.div_obj.style.width=this.input_obj.style.width;
        this.div_obj.style.border=this.input_obj.style.border;
        this.div_obj.style.padding=this.input_obj.style.padding;
        try{
            document.body.appendChild(this.div_obj);            
            this.div_obj.innerHTML = this.input_obj.innerHTML;
            this.move_menu();
        }catch(e){alert(e)}
    },
    move_menu : function (){
        var obj = this;
        this.div_obj_start = parseInt(this.div_obj.style.top,10);
        this.div_obj_end = parseInt(this.scrollTop()) + parseInt(this.div_obj_max_move_top,10);
        if (this.div_obj_end < parseInt(this.div_obj_top,10)) this.div_obj_end = parseInt(this.div_obj_top,10);
        if (this.div_obj_start != this.div_obj_end ) {
            this.div_obj_offset = Math.ceil(Math.abs( this.div_obj_end - this.div_obj_start ) / 15 );
            t = parseInt(this.div_obj.style.top, 10) + ((this.div_obj_end<this.div_obj_start)? this.div_obj_offset*-1:this.div_obj_offset);
            this.div_obj.style.top = t+'px';
            this.slide_time = 10;
        }
        this.timeId[this.div_obj.id] = window.setTimeout(function(){obj.move_menu()},this.slide_time);
    },
    scrollTop : function (){//xhtml doctype patch
        if (window.pageYOffset){
            scroll_top = window.pageYOffset
        }else if (document.documentElement && document.documentElement.scrollTop){
            scroll_top = document.documentElement.scrollTop
        }else if (document.body){
            scroll_top = document.body.scrollTop
        }
        return scroll_top;
    }
}



/* #################################################
                    ???? Q&A
################################################# */

function seq_pop(no){
    var obj=document.getElementById("seq_popDiv")

    if(no==1){
        obj.style.display="block"
        obj.style.top=280+"px"
        obj.style.left=230+"px"
        obj.innerHTML='<img src="/en/img/wm04/p040401_seq_pop.gif" useMap="#seq_pop" alt="" />'
    }else{
        obj.style.display="none"
    }
}

/* #################################################
                    ??intro
################################################# */

function product_view(no){
    var obj=document.getElementById("product_div")
         obj.style.display=""
         obj.style.top=236+"px"
         obj.style.left=215+"px"

    var swf
    swf = "<object type='application/x-shockwave-flash' data='/en/img/swf/products_0"+no+".swf' width='680' height='360'>"
    swf += "<param name='FlashVars' value='domain=/en/img/swf/' />"
    swf += "<param name='movie' value='/en/img/swf/products_0"+no+".swf' />"
    swf += "<param name='wmode' value='transparent' />"
    swf += "</object>"
    obj.innerHTML=swf 
}

function div_hide(){
    var obj=document.getElementById("product_div")
        obj.style.display="none"
}

function hide(name){
    var obj=document.getElementById(name)
        obj.style.display="none"
}

function view(name){
    var obj=document.getElementById(name)
    obj.style.display="block"
}



/* #################################################
                   DownLoad
################################################# */

function downFile(filePath,fileName) {
   // location.href = "/kr/common/Download.asp?filepath="+filePath+"&filename="+fileName;
    var obj=window.open(filePath+fileName,"Catalog","")
    //  location.href="/KR/common/down.asp?filename="+fileName
}

//???
function popCert(image_path,image_title,wi,he,scroll) {
//   url = "/kr/common/imageViewer.asp?image_path="+image_path+"&image_title="+image_title;
   url = "/kr/file/certification/"+image_path;
    window.open(url,"certification",'left=100,top=100,width='+wi+',height=800,scrollbars='+scroll); 
}



/* #################################################
                    ??
################################################# */

function menuOver1(img) {
	if(img.src.indexOf("_on")==-1)
	{
		img.src = img.src.replace(".gif", "_on.gif");
	}
}

function menuOut1(img) {
	if(img.src.indexOf("_on")!=-1)
	{
		img.src = img.src.replace("_on.gif", ".gif");
	}
}

function init_tab01_a (id,no){
        var tab = document.getElementById(id).getElementsByTagName("li")

        for(i=0; i< tab.length; i++){
             imgEl = tab[i].getElementsByTagName("img");

            if(i== (no-1) && no !=0){
                imgEl[0].src = imgEl[0].src.replace(".gif", "_on.gif");
            } else {
                imgEl[0].onmouseout = menuOut;
            }
        }
}
       
function init_tab01_X (id,no){
        var tab = document.getElementById(id).getElementsByTagName("li")

        for(i=0; i< tab.length; i++){
             inputEl = tab[i].getElementsByTagName("input");

            if(i== (no-1)){
                inputEl[0].src = inputEl[0].src.replace(".gif", "_on.gif");
            } else {
                inputEl[0].onmouseover = menuOver;
                inputEl[0].onmouseout = menuOut;
            }
        }  
}

/* #################################### */
/*              ??  -  ?             */
/* #################################### */
