// ÀÏ·¯½ºÆ® - ±âº»Áöµµ ÀüÈ¯ ºÎºÐ.
 // - seodol Ãß°¡.
 function setIllustMap()
 {

     var isIllust = this.document.Nextmap.getIsIllust();
     var level = this.document.Nextmap.getRealLevel();

     //ÀÏ·¯½ºÆ®¿Í ÀÏ¹Ý¸Ê ÀüÈ¯½Ã layerOff¿Í defaultLayerÀÇ °ªÀÌ ÃÊ±âÈ­µÇ¾î¼­ ¸ÕÀú
     //°ªÀ» ¹Þ¾Æ¼­ ÀúÀåÈÄ ¸¶Áö¸·¿¡ ´Ù½Ã Àç ¼¼ÆÃÇÑ´Ù.
     var layerOff = this.document.Nextmap.getLayerOff();
     var loadDefaultLayer = this.document.Nextmap.getLoadDefaultLayer();
     var defaultLayer = this.document.frmDisplay.defaultLayer.value ;

     // ÇöÁöµµÀÇ Áß½É x, y °ªÀ» °¡Á®¿Â´Ù.
     cX = this.document.Nextmap.getRealX();
     cY = this.document.Nextmap.getRealY();

     //if( level == 0 && isIllust == false )
     //{
     //    alert( "Illustmap can be provided in map level 1 and the area of Seoul and Gyeongju." );
     //}

     if( isIllust == false )
     {

         if( ( 291400.0  < cX && cX < 327900.0 ) && ( 537000.0 < cY && cY < 567500.0 )  )
         {
             //ÇöÀç ·¹ÀÌ¾î °ª¼¼ÆÃÀ» ÀÏ·¯½ºÆ®¿ëÀ¸·Î ¹Ù²Þ
     			 setLayer('true');
             this.document.Nextmap.convertToMap();
             //this.document.Nextmap.setIllustMap();
             //radioValue();
             hidden();
         }
         //else if( ( 498812.0 < cX && cX < 543000.0 ) && ( 340000.0 < cY && cY < 390000.0 ) )
         else if( ( 498812.0 < cX && cX < 543000.0 ) && ( 331000.0 < cY && cY < 390000.0 ) )
         {
             //ÇöÀç ·¹ÀÌ¾î °ª¼¼ÆÃÀ» ÀÏ·¯½ºÆ®¿ëÀ¸·Î ¹Ù²Þ
     			 setLayer('true');
             this.document.Nextmap.convertToMap();
             //this.document.Nextmap.setIllustMap();
             //radioValue();
             hidden();
         }
         else
         {
             alert( "Illustmap can be provided only in area of Seoul and Gyeongju." );
         }
     }
     else
     {
         //ÇöÀç ·¹ÀÌ¾î °ª¼¼ÆÃÀ» ÀÏ¹Ý¸Ê¿ëÀ¸·Î ¹Ù²Þ
     		setLayer('false');
         this.document.Nextmap.convertToMap();
         //this.document.Nextmap.setIllustMap();
         //radioValue();
         visible();
     }

    //ÀÏ·¯½ºÆ®¿Í ÀÏ¹Ý¸Ê ÀüÈ¯½Ã layerOff¿Í loadDefaultLayerÀÇ°ªÀÌ ÃÊ±âÈ­µÇ¾î¼­ ¸ÕÀú
     //°ªÀ» ¹Þ¾Æ¼­ ÀúÀåÈÄ ¸¶Áö¸·¿¡ ´Ù½Ã Àç ¼¼ÆÃÇÑ´Ù.
     if( defaultLayer=='ALL' )
     {
        this.document.Nextmap.selectLayerOn();
      }  
     else   
     	this.document.Nextmap.getLayerOff( layerOff );
     	
     this.document.Nextmap.getLoadDefaultLayer( loadDefaultLayer );
 }

 function setLayer(isIllust)
 {
     var selectLayer = this.document.frmDisplay.selectLayer.value ;
     var defaultLayer = this.document.frmDisplay.defaultLayer.value ;

     //ÀüÃ¼ ·¹ÀÌ¾î ¼±ÅÃÈÄ ¸Ê ÀüÈ¯ÀÌ ÀÏ¾î³ª¸é ·¹ÀÌ¾î¸¦ µðÆúÆ® ·¹ÀÌ¾î·Î ¹Ù²Ù¾î ÁØ´Ù.
     if( defaultLayer=='ALL' )
     {
     	 defaultLayer = 'EL1';
     	  this.document.frmDisplay.defaultLayer.value = defaultLayer;
     	 this.document.form3.elements[0].checked = true;
     	 
        //selectLayer°¡ ¼¼ÆÃÀÌ µÇ¾î ÀÖÀ¸¸é defaultLayer¸¦ on½ÃÅ°°í ¾Æ´Ï¸é off½ÃÅ²´Ù
        //selectLayer°¡ ¼¼ÆÃÀÌ µÇ¾î ÀÖÀ¸¸é µÎ°³ÀÇ ·¹ÀÌ¾î¿Í °Ë»öµÈ ¹®È­Àç°¡ È­¸é¿¡ º¸¿© Áø´Ù.
        //selectLayer°¡ ¼¼ÆÃÀÌ µÇ¾î ÀÖÁö ¾ÊÀ¸¸é defaultLayer¿Í °Ë»öµÈ ¹®È­Àç°¡ È­¸é¿¡ º¸¿©Áö°Ô µÈ´Ù.
        if( ( selectLayer==null ) || ( selectLayer=="" ) )
        {
          this.document.Nextmap.defaultLayerOff();
        }
        else
        {
          this.document.Nextmap.defaultLayerOn();
        } 
        
        this.document.Nextmap.selectLayerOn();
      
     }	 
     
     if (selectLayer==null) selectLayer='';

     //makeIllustLayer()´Â layer.js¿¡¼­ È£Ãâ
     //ÀÏ¹Ý layerÀÌ¸§À» ÀÏ·¯½ºÆ® ·¹ÀÌ¾î¿¡ ¸Â°Ô ¹Ù²Ù¾î¼­ ·¹ÀÌ¾î ÀÌ¸§À» ¹ÝÈ¯ÇÑ´Ù.
     if (isIllust=='true')
     {
        if (selectLayer!='')
        		this.document.Nextmap.selectLayer(makeIllustLayer(selectLayer));
        this.document.Nextmap.setDefaultLayer(makeIllustLayer(defaultLayer));
     }
     else
     {
        this.document.Nextmap.selectLayer(selectLayer);
        this.document.Nextmap.setDefaultLayer(defaultLayer);
     }
 }
