var mainpart = "/website4eng";

/*------------------------------------------------------------------------------------------------*/
/* User Define -----------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------*/

// Sub Page ÀÇ BorderLine Àç¼³Á¤
function _DivHeightReset() {
	var bodyheight = document.body.scrollHeight;
	document.all['Sub_BorderLine'].style.height = bodyheight - 382;
}

// ±³Á÷¿ø/¼º½ÅÀÎ/¿¹ºñ¼º½ÅÀÎ ºÒ·¯³»´Â ÇÔ¼ö (¸ÞÀÎÇÃ·¹½¬¾È¿¡¼­ È£ÃâµÊ)
function _DivLink1Showing() {
  document.all['Main_Link1'].style.display='block';	
}

// °Ö·¯¸®¿¡ »çÁø ÆË¾÷½Ã±â´Â ÇÔ¼ö
function _img_view(img) {
	window.open(mainpart+"/common/popup_imgview.html?img="+img,"imgview","scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=100,height=100");
}

/*------------------------------------------------------------------------------------------------*/
/* Global Define ---------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------------------*/

/**¸µÅ© Á¡¼±¾ø¾Ö´Â ¼Ò½º**/
function bluring(){ 
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 
document.onfocusin=bluring; 

// Ã¹À§Ä¡·Î ½ºÅ©·Ñ (onclick="_back_top();")
function _back_top()
{
        x = document.body.scrollLeft;
        y = document.body.scrollTop;
        step = 10;

        while ((x != 0) || (y != 0)) {
                scroll (x, y);
                step += (step * step / 300);
                x -= step;
                y -= step;
                if (x < 0) x = 0;
                if (y < 0) y = 0;
        } 
        scroll (0, 0);
}

// flash, movie Å×µÎ¸® ¾ø´Â ½ÇÇàÀ» À§ÇÑ object launch
function objectlaunch(obcode)
{
    document.write(obcode);
}

// ÁÂÃø¸Þ´ºÀÇ mouseover event 
function _mouseover(fol,val) {
    document.all[val].src=mainpart+'/images/'+fol+'/'+val+'_ov.gif';
}
function _mouseout(fol,val) {
    document.all[val].src=mainpart+'/images/'+fol+'/'+val+'.gif';
}

function getCookie( name )
{
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}

function setCookie( name, value, expiredays ) {
        var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}


