/** 
ÀÛ¼ºÀÚ : &#36779;Ã¶&#27845;
ºñ&#32458;    : ÀÚ¹Ù&#33014;&#20892;&#36171;&#39128; °øÅë Module
            »ó±â¿¡ &#38030;&#30699;µÈ &#25438;¿Ü¿¡ °Í&#31726; Ãß&#21834; &#33636;&#20393; &#21834;´É&#38054;&#32874;´Ù. 
**/
/***********************************************************************************/
/***********************************************************************************/
/**  &#25169;&#35776;Ã¢ &#25438;¹ÌÁö &#21679;&#32496; Module
      url : open target window(È®ÀåÀÚ&#32496; º¯°æ&#21834;´É,È¥¿µ&#33636;&#20393;&#30699; È®ÀåÀÚ &#39047;¶ó¹ÌÅÍ »èÁ¦ &#33636;&#20393;&#21834;´É)
      wd : open window &#21834;·Î&#34108;
      he : open window ¼¼·Î&#34108;
      flag : scroll &#21679;ºÎ(0:&#33014;&#20892;&#36153; &#32477;&#23047; / 1:&#33014;&#20892;&#36153; &#20048;&#23047;)
      ±×¿Ü left. top Áö&#27813;&#34108;&#26639;·Î &#35845;&#38030; Áö&#27813; &#21834;´É
      
     ¿¹) pop('sample.html',500,500,1) 
          => &#21834;·Î,¼¼·Î 500pxÀÎ &#33014;&#20892;&#36153; &#20048;&#32496; &#25169;&#35776;Ã¢ &#40843;Ãâ
**/
function pop(pop,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;
    
    if (flag == "0" )
    {  window.open(url,'',"toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";");  }
    else 
    {  window.open(url,'',"toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";");  }
}

function pop2(pop,target,width,height,flag)
{
	var url = pop;
	var wd = width;
	var he = height;
    
    if (flag == "0" )
    {  window.open(url,target,"left=0, top=0, toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";");  }
    else 
    {  window.open(url,target,"left=0, top=0, toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";");  }
}
function full_p(pop,target)
{
	var url = pop;
    
    window.open(url,target,"fullscreen,scrollbars=yes");  
}
/***********************************************************************************/
/***********************************************************************************/
/**  &#25438;¹ÌÁö &#36153;&#22391;&#28378; Module  (IE &#20616;&#20393;)
       preload&#32477;&#25438; &#38745;&#25438;&#32496; &#31363;&#33616;
      Á¦ÀÏ »ó&#31388; table¿¡  onmouseover, onmouseout &#25438;º¥&#39128; ÇÑ&#20020;¸¸ &#32467;ÁÖ&#25601; &#20979;
      ¿¹) <table onmouseover="imgChg('on')" onmouseout="imgChg('off')">
      &#25438;¹ÌÁö name&#38417; ½ÇÁ¦ &#25438;¹ÌÁö ³×ÀÓ°ú µ¿ÀÏ&#31373;&#38712; ÇØ¾ß&#38054;&#32874;´Ù.("&#25438;¹ÌÁö&#25438;&#25242;_on.gif" &#25438;·±&#20389;&#26639;·Î)
      flag : on/off 
**/
function EImgChg(flag) 
{
    source=event.srcElement;
    if (source.name == "") 
    { return false;  }
    
    else if (document.images && source.tagName=="IMG") {
        imgElement = source.name;  // &#25438;¹ÌÁö name
        imgPath = source.src;   // &#25438;¹ÌÁö src ¼Ó¼º&#34108;
        
        imgPathLen = imgPath.length;
        imgPathFlag = imgPath.lastIndexOf("/");
        imgName = imgPath.substring(0,imgPathFlag+1);
        
        document.images[imgElement].src =  imgName + imgElement + "_" + flag + ".gif";  }
}

/***********************************************************************************/
/***********************************************************************************/
/**  &#25438;¹ÌÁö &#36153;&#22391;&#28378; Module  (NS &#20616;&#20393;)
      ¸¸¾à¿¡ &#25438;¹ÌÁö &#25438;&#25242;&#25438; "img/Ngnb01_off.gif" ÀÏ °æ¿ì
      
      imgPath  :   
      flag        :   
**/
function NImgChg(imgPath,flag) 
{
    
    if (document.images) {
        imgPathLen = imgPath.length;
        imgPathFlag = imgPath.indexOf("/");
        imgName = imgPath.substring(imgPathFlag+1,imgPathLen);
        
        document.images[imgName].src =  imgPath +  "_" + flag + ".gif";
        
    }
}

/***********************************************************************************/
/***********************************************************************************/
/**  &#39277;&#25438;&#32482; show,hide ¸ð&#30872; 
      layer name ºÎ&#21679;&#30699;  layer ¶ó&#32496; ³×ÀÓ&#31726; ÁÖÁö ¾Ê&#32496;´Ù. (Netscape 6 &#25438;»ó)
**/
function LayerSH(LayerName,Status) 
{
    if (navigator.appName == "Netscape")
    {
		LayerN = document.getElementById(LayerName).style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
    }	
    else
    {
		LayerN = document.all[LayerName].style;
		if (Status == 'show') LayerN.visibility = 'visible';
		if (Status == 'hide') LayerN.visibility = 'hidden';
	}
}

/***********************************************************************************/
/***********************************************************************************/
/**  Menu Display Function Module
      IE5.0 / NS6.1 ±âÁØ 
      :   mdisplay() ¶ó&#32496;  &#31363;&#33616;¿¡&#36753; "str" ¶ó&#32496; ÀÎÀÚ&#34108;(&#39277;&#25438;&#32482;&#25438;&#25242;)&#38417; &#39047;¶ó¹ÌÅÍ·Î ¹Þ&#32496;´Ù.
          str  :  &#39277;&#25438;&#32482; ³×ÀÓ
          dflag :  0 (ÇÑ&#38149; &#28938;ÀÎ°Å &#32922; ´©¸£&#25601; &#39277;&#25438;&#32482; ¾È &#35265;±â±â)
                     1 (ÇÑ&#38149; &#28938;ÀÎ°Å &#32922; ´©¸£&#25601; &#39277;&#25438;&#32482; &#35265;±â±â)
          rollImgPath &#25438;¹ÌÁö&#32496;   "/common/img/bullet/bu_roll_up.gif"(&#25703;&#36527;&#38417;&#38189;)  ¿Í  "/common/img/bullet/bu_roll_down.gif"(&#38065;&#21857;&#38417;&#38189;) ·Î ÅëÀÏÇÑ´Ù.
**/
function roll_up(rollImgPath,mnum,iconnum) 
{ 
    if (iconnum == "")
    {  return false;  }    
    else
    { document.images["roll" + mnum].src = rollImgPath + "_plus" + iconnum + ".gif";  }
 }
function roll_down(rollImgPath,mnum,iconnum) 
{ 
    if (iconnum == "")
    {  return false;  }    
    else
    {  document.images["roll" + mnum].src = rollImgPath + "_minus" + iconnum + ".gif";   }
}

var mz=0;
function mdisplay(str,dflag,iconnum)
{  mnum = str.substring(str.length - 2);
    mstr = str.substring(0, str.length - 2);
    rollImgPath = "/common/img/menu/icon";
    
// Browser type : Explore 
    if (document.all) {
        if (dflag == "0" & document.all[mstr+mnum].style.display=="")
        {  return; }
        else
        { 
            if(document.all[mstr+mnum].style.display=="")
            { document.all[mstr+mnum].style.display="none";
               roll_up(rollImgPath,mnum,iconnum); 
               mz=0;  }
            else {
                if(mz != 0)
                {  document.all[mstr+mz].style.display="none";
                    roll_up(rollImgPath,mz,iconnum);
                    document.all[mstr+mnum].style.display="";
                    roll_down(rollImgPath,mnum,iconnum);  }
                document.all[mstr+mnum].style.display="";
                roll_down(rollImgPath,mnum,iconnum); 
                mz=mnum; }
        }
    }
// Browser type : Netscape 6.0ºÎÅÍ 4.0´ë&#32496; getElementById()  &#31363;&#33616;´ë½Å Layer°´Ã¼ Âü&#28860;
    else {
        if (dflag == "0" & document.getElementById(mstr+mnum).style.display=="")
        { return; }
        else
        { 
            if(document.getElementById(mstr+mnum).style.display=="")
            {  document.getElementById(mstr+mnum).style.display="none";
                roll_up(rollImgPath,mnum,iconnum); 
                mz=0;  }
            else  {
                if(mz != 0) { document.getElementById(mstr+mz).style.display="none";
                                    roll_up(rollImgPath,mz,iconnum); 
                                    document.getElementById(mstr+mnum).style.display="";
                                    roll_down(rollImgPath,mnum,iconnum);   }
                document.getElementById(mstr+mnum).style.display="";
                roll_down(rollImgPath,mnum,iconnum); 
                mz=mnum;
            }
        } 
    }
}

/***********************************************************************************/
/***********************************************************************************/
/**  Menu Display & &#31096;±òº¯È­ Function Module
      IE5.0 ±âÁØ 
      :   mdisplay() ¶ó&#32496;  &#31363;&#33616;¿¡&#36753; "str" ¶ó&#32496; ÀÎÀÚ&#34108;(&#39277;&#25438;&#32482;&#25438;&#25242;)&#38417; &#39047;¶ó¹ÌÅÍ·Î ¹Þ&#32496;´Ù.
          str  :  &#39277;&#25438;&#32482; ³×ÀÓ
          dflag :  0 (ÇÑ&#38149; &#28938;ÀÎ°Å &#32922; ´©¸£&#25601; &#39277;&#25438;&#32482; ¾È &#35265;±â±â)
                     1 (ÇÑ&#38149; &#28938;ÀÎ°Å &#32922; ´©¸£&#25601; &#39277;&#25438;&#32482; &#35265;±â±â)
          rollImgPath &#25438;¹ÌÁö&#32496;   "/common/img/bullet/bu_roll_up.gif"(&#25703;&#36527;&#38417;&#38189;)  ¿Í  "/common/img/bullet/bu_roll_down.gif"(&#38065;&#21857;&#38417;&#38189;) ·Î ÅëÀÏÇÑ´Ù.
**/
function croll_up(crollImgPath,cmnum) 
{ document.images["croll" + cmnum].src = crollImgPath + "_up.gif"; }
function croll_down(crollImgPath,mnum) 
{ document.images["croll" + cmnum].src = crollImgPath + "_down.gif"; }

var cmz=0;
var ctFlag="";
function cmdisplay(cstr,cdflag)
{  cmnum = cstr.substring(cstr.length - 2);
    cmstr = cstr.substring(0, cstr.length - 2);
    crollImgPath = "/img/common/bullet/bu";

// Browser type : Explore 
    if (cdflag == "0" & document.all[cmstr+cmnum].style.display=="")
    {  return;     }
    else
    { 
        if(document.all[cmstr+cmnum].style.display=="")
        { 
            document.all[cmstr+cmnum].style.display="none";
            croll_up(crollImgPath,cmnum); 
            ctFlag = eval("qtxt" + cmnum);
		    ctFlag.style.background = "#FFFFFF";
            ctFlag.style.fontWeight = "normal";
               
            cmz=0;  
        }
        else 
        {
            ctFlag = eval("qtxt" + cmnum);
		    ctFlag.style.background = "#CBECE4";
            ctFlag.style.fontWeight = "bold";
            if(cmz != 0)
            {  
                document.all[cmstr+cmz].style.display="none";
                croll_up(crollImgPath,cmz);
                ctFlag = eval("qtxt" + cmz);
			    ctFlag.style.background = "#FFFFFF";
                ctFlag.style.fontWeight = "normal";
                    
                document.all[cmstr+cmnum].style.display="";
                croll_down(crollImgPath,cmnum);
                ctFlag = eval("qtxt" + cmnum);
			    ctFlag.style.background = "#CBECE4"; 
                ctFlag.style.fontWeight = "bold";
            }
            document.all[cmstr+cmnum].style.display="";
            croll_down(crollImgPath,cmnum); 
            cmz=cmnum; 
        }
    }
}
/***********************************************************************************/
/***********************************************************************************/
 /**  ¸µ&#20892;&#30699; &#31215;±â&#32496; Á¡¼±¶óÀÎ &#32477;¾Ö±â **/
function allblur() {
    for (i = 0; i < document.links.length; i++)
        document.links[i].onfocus = document.links[i].blur;
}

/***********************************************************************************/
/***********************************************************************************/
/**  Å×&#25438;ºí Ä®¶ó º¯È¯ &#31363;&#33616;
      &#25438; &#31363;&#33616;&#26723; Àû&#20393;&#30634; &#20616;Ã¼ Å×&#25438;ºí¿¡ ÇÑ&#38149;¸¸ ³Ö&#32482;ÁÖ&#25601; &#37011;&#32874;´Ù.
      highlightcolor : change color value
**/
function changeto(highlightcolor)
{
    source=event.srcElement;
    
	if (source.tagName=="TR"||source.tagName=="TABLE")
	return;
	while(source.tagName!="TD")
	source=source.parentElement;
	if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
    source.style.backgroundColor=highlightcolor;
}

/***********************************************************************************/
/***********************************************************************************/
 /**  &#25438;¹ÌÁö Resize Module
       &#25438;¹ÌÁö ·Î&#29241;&#30699; Ã¢ &#20892;±â¿¡ &#24777;Ãç &#28938;&#21679;ÁÖ&#32496; &#31363;&#33616;&#28061;&#32874;´Ù. 
**/
function resizeImg(imgObj) 
{  // &#25438;¹ÌÁö º°&#26723; ·Î&#29241;&#26639;·Î &#30420;&#36144; &#33636;&#25438;Áî ÃßÃâ
  var imgOriginal = new Image();
	imgOriginal.src = imgObj.src;
	
	// &#21834;·Î¿Í ¼¼·Î Áß &#32482;´À&#21543; ±âÁØ&#26639;·Î &#20020;ÀÏÁö °á&#27813;
	var baseAxis;
	if ( (imgOriginal.width / imgObj.width) > (imgOriginal.height / imgObj.height) )
	  baseAxis = 'width';
  else
	  baseAxis = 'height';

  // °á&#27813;µÈ ±âÁØ&#38417; ¹Ù&#24085;&#26639;·Î ³ª&#36195;Áö ±æ&#25438;¸¦ ¸®&#33636;&#25438;Â¡
	if (baseAxis == 'width') 
  {
	  imgObj.height = Math.round(imgOriginal.height * (imgObj.width / imgOriginal.width));
  } 
  else 
  { // baseAxis == 'height'
	  imgObj.width = Math.round(imgOriginal.width * (imgObj.height / imgOriginal.height));
  }
}


/***********************************************************************************/
/***********************************************************************************/
/**  
  &#25438;¹ÌÁö ¹Ì¸®&#38402;&#30718;&#22391;±â  Module 
**/
function preload(imgObj,imgSrc) 
{
    if (document.images) 
    {
        eval(imgObj+' = new Image()')
        eval(imgObj+'.src = "'+imgSrc+'"')
    }
}
/***********************************************************************************/
/***********************************************************************************/
/**  &#25438;¹ÌÁö &#36153;&#22391;&#28378; Module 
      preload&#31363;&#33616; ½Ç&#38738; &#39286; &#25438;¹ÌÁö &#36153;&#22391;&#28378; Àû&#20393;
**/
function imgChg_Old(Name,imgObj) 
{
	if (document.images) 
  {
		document.images[imgName].src = eval(imgObj+".src")
	}
}
/** window.onload=allblur
**/

