¿¡¾îÄÁ¼³Ä¡¾÷ü ¾È³»

ÀÎõ±¤¿ª½Ã

032-467-6004

°æ±â¼ö¿ø½Ã

031-239-3196

°æ±âÈ­¼º½Ã

031-377-6855

°æ±â¾È»ê½Ã

°æ±â¿À»ê½Ã

°æ±â¿ëÀνÃ

031-377-6855

°æ±â¼º³²½Ã

°æ±â½ÃÈï½Ã

010-9266-5975

°æ±âºÎõ½Ã

032-204-8010

Àü±¹ ¿¡¾îÄÁ¾÷ü ¾È³»


ÃÑ °Ô½Ã¹° 209°Ç, ÃÖ±Ù 0 °Ç
   
»ç´Ù¸®°ÔÀÓ
±Û¾´ÀÌ : ÄÚ¸®¾Æ21 ³¯Â¥ : 2008-09-07 (ÀÏ) 20:38 Á¶È¸ : 26979
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>»ç´Ù¸® °ÔÀÓ</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<script language="javascript" type="text/javascript">
var Yl = {
 getEl : function(strId){
  if (document.getElementById) return document.getElementById(strId);
  if (document.all) return document.all[strId];
 }
 //div ¸®ÅÏ
 ,getDiv : function(sWidth, sHeight, sBgColor){
  var d = document.createElement("div");
  if(sWidth) d.style.width = sWidth;
  if(sHeight) d.style.height = sHeight;
  if(sBgColor) d.style.backgroundColor = sBgColor;
  d.style.position = "absolute";
  d.style.overflow = "hidden";  
  return d;
 }
 ,arrColor : [
  '#8c7301','#9b014f','#0084a0','#ad8e00','#bb005f'
  ,'#00a0c2','#8d3901','#8f0197','#156200','#9ca53b'
  ,'#c9a601','#d6006d','#01b6de','#80adaf','#a44201'
  ,'#e0b800','#ec0078','#0021b0','#92b7d7','#013add'
  ]  
 ,arrVerDiv : [] //¼öÁ÷ ¼± div
 ,arrHorDiv : [] //¼öÆò ¼± div
 ,arrMovDiv : [] //À̵¿ ¼± div
 
 ,arrIng : [] //ÁøÇà¿©ºÎ üũ¿ë
 ,arrMDiv : [] //À̵¿¼± ¹è¿­ ¹øÈ£°ª ÀúÀå, À̵¿ÈÄ È®Àοë
  
 ,nMaxWidth : 1000 //ÃÖ°í ³ÐÀÌ
 ,nWidth : 0 //»ç´Ù¸® ³ÐÀÌ
 ,nHeight : 300 //»ç´Ù¸® ³ôÀÌ
 
 ,nNum : 0
 
 ,arrTopDiv : [] //ž div
 ,arrBotDiv : [] //¾Æ·¡ div
 ,arrGoDiv : [] //go ¹öÆ° div
 
 ,init : function(){
  
  //°¹¼ö
  this.nNum = parseInt(this.getEl("sel_num").value);
  
  //³ÐÀÌ
  this.nWidth = parseInt(this.nMaxWidth/this.nNum);
        
  for(var i=0; i<this.nNum; i++){
 
   this.arrTopDiv[i] = this.getDiv(this.nWidth+"px", "50px", "");
   this.arrBotDiv[i] = this.getDiv(this.nWidth+"px", "50px", "");
   this.arrGoDiv[i] = this.getDiv(this.nWidth+"px", "30px", "");
                     
   this.arrTopDiv[i].style.left = (i*this.nWidth)+"px";
   this.arrTopDiv[i].style.top = "20px";
   
   this.arrBotDiv[i].style.left = (i*this.nWidth)+"px";
   this.arrBotDiv[i].style.top = "410px";
   
   this.arrGoDiv[i].style.left = (i*this.nWidth)+"px";
   this.arrGoDiv[i].style.top = "70px";
   
   this.arrTopDiv[i].style.fontSize="12px";
   this.arrBotDiv[i].style.fontSize="12px";
   
   //this.arrTopDiv[i].style.border = "1px solid #CCCCCC";
   //this.arrBotDiv[i].style.border = "1px solid #CCCCCC";
   
   this.arrTopDiv[i].align = "center";
   this.arrBotDiv[i].align = "center";
   this.arrGoDiv[i].align = "center";
   this.arrTopDiv[i].innerHTML = (i+1)+'<br><input type="text" id="inp_top_'+i+'" value="" style="width:90%" tabindex="'+(i+1)+'" />';
   this.arrBotDiv[i].innerHTML = '<input type="text" id="inp_bot_'+i+'" value="" style="width:90%" tabindex="'+((i+1)+50)+'" />';
   this.getEl("div_body").appendChild(this.arrTopDiv[i]);  
   this.getEl("div_body").appendChild(this.arrBotDiv[i]);
   this.getEl("div_body").appendChild(this.arrGoDiv[i]);  
   
     
   this.arrVerDiv[i] = this.getDiv("1px", this.nHeight+"px", "#bbbbbb");
        
   this.arrVerDiv[i].style.left = ( (i*this.nWidth)+parseInt(this.nWidth/2) )+"px";
   this.arrVerDiv[i].style.top = "100px";
        
   this.getEl("div_body").appendChild(this.arrVerDiv[i]); 
        
  }
  
  this.getEl("div_step1").style.display = "none";
  this.getEl("div_step2").style.display = "";  
  
 }
 ,create : function(){ //»ç´Ù¸® »ý¼º
    
  for(var i=0; i<this.nNum; i++){
   
   this.arrTopDiv[i].innerHTML = (i+1)+"<br>"+this.getEl("inp_top_"+i).value;
   this.arrBotDiv[i].innerHTML = this.getEl("inp_bot_"+i).value;
   this.arrGoDiv[i].innerHTML = '<input type="button" value="GO" onClick="Yl.start('+i+')">';
      
   this.arrTopDiv[i].style.overflow = "auto";
   this.arrBotDiv[i].style.overflow = "auto";
        
   this.arrIng[i] = false;
           
   this.arrMDiv[i] = [];   
  }
      
  for(var i=0; i<(this.nNum*7); i++){
   
   var nLen = this.arrHorDiv.length;
   
   this.arrHorDiv[nLen] = this.getDiv(this.nWidth+"px","1px", "#aaaaaa");
   var nRndLeft = (parseInt(Math.random()*(this.nNum-1))*this.nWidth)+parseInt(this.nWidth/2);
   var nRndTop = this.getRndTop();
            
   this.arrHorDiv[nLen].style.left = nRndLeft+"px";
   this.arrHorDiv[nLen].style.top = nRndTop+"px";
       
   this.getEl("div_body").appendChild(this.arrHorDiv[nLen]);    
  }
  
  this.getEl("div_step2").innerHTML = "GO ¹öÆ°À» ´­·¯ ÁÖ¼¼¿ä.";
  
 }
 ,sRndTop : ""
 ,getRndTop : function(){
  var nRnd = parseInt(Math.random()*(this.nHeight-100))+150; 
  
  if( this.sRndTop.indexOf( "["+nRnd+"]" ) < 0 ){
   this.sRndTop += "["+nRnd+"]";
   return nRnd;
  }else{
   return this.getRndTop();   
  }
 } 
 ,start : function( no ){
  
  if( this.arrIng[no] ){
   for(var i=0; i<this.arrMDiv.length; i++){
    for(var j=0; j<this.arrMDiv[i].length; j++){
     this.arrMovDiv[this.arrMDiv[i][j]].style.backgroundColor = "#CCCCCC"; 
     this.arrMovDiv[this.arrMDiv[i][j]].style.zIndex = 1;
    }
    
   }
   for(var i=0; i<this.arrMDiv[no].length; i++){
    this.arrMovDiv[this.arrMDiv[no][i]].style.backgroundColor = "#0000ff";
    this.arrMovDiv[this.arrMDiv[no][i]].style.zIndex = 2;
   }
  }else{
               
   var nSx = parseInt(this.arrVerDiv[no].style.left);
   var nSy = parseInt(this.arrVerDiv[no].style.top);
   
   this.moveStart("y", no, nSx, nSy);
   
   this.arrIng[no] = true; //ÁøÇà
  }
 
 }
 ,moveStart : function(sXy, pno, nSx, nSy){
    
  var nLen = this.arrMovDiv.length;
  
  this.arrMovDiv[nLen] = this.getDiv("2px","2px", this.arrColor[pno]);
  
  this.arrMDiv[pno].push(nLen);
    
  this.getEl("div_body").appendChild(this.arrMovDiv[nLen]);  
  
  this.arrMovDiv[nLen].style.left = nSx+"px";
  this.arrMovDiv[nLen].style.top = nSy+"px";
  
  this.arrMovDiv[nLen].style.zIndex = 3;
  
  
  var nEx = nSx;
  var nEy = nSy;
  if(sXy=="y") nEy = this.nHeight+100;
        
  var bCk = false;
  
  for(var i=0; i<this.arrHorDiv.length; i++){
   
   var nx = parseInt(this.arrHorDiv[i].style.left);
   var ny = parseInt(this.arrHorDiv[i].style.top);  
   var nw = parseInt(this.arrHorDiv[i].style.width);
   var nh = parseInt(this.arrHorDiv[i].style.height);
   
   if(sXy=="x"){
    if( ny == nSy ){
     if( nx==nSx ){
      nEx = nx+nw;
      break;
     }else if( (nx+nw)==nSx ){
      nEx = nx;
      break;
     }     
    }
   }else{
    
    //¹Ýº¹Çϸ鼭 Å«°ÍÁß¿¡¼­ Á¦ÀÏ ÀÛÀº°ÍÀ¸·Î        
    if( ny>nSy ){
     if( nx==nEx || (nx+nw)==nEx ){
            
      if(bCk){
       if(ny<nEy) nEy = ny;
      }else
       nEy = ny; 
       
      bCk = true; 
     } 
    }
   }
  }
  
  this.move(nLen, pno, nSx, nSy, nEx, nEy);     
 }
 ,nSpeed : 10
 ,move : function(no, pno, nSx, nSy, nEx, nEy){
  var nx = parseInt(this.arrMovDiv[no].style.left);
  var ny = parseInt(this.arrMovDiv[no].style.top);  
  var nw = parseInt(this.arrMovDiv[no].style.width);
  var nh = parseInt(this.arrMovDiv[no].style.height);
  
  var np;
  var bIng = true;
  
  var sXy = "";
  
  if( nSx != nEx ){
   np = nw+this.nSpeed;
   if(nEx<nSx){
    if( (nSx-np) <= nEx ){
     bIng = false;
     np = nSx-nEx;
    }   
    this.arrMovDiv[no].style.left = (nSx-np)+"px"; 
   }else{
    if( (nSx+np) >= nEx ){
     bIng = false;
     np = nEx-nSx;
    }       
   }
   
   this.arrMovDiv[no].style.height = "4px";
   this.arrMovDiv[no].style.width = np+"px"; 
   
   sXy = "x";
  }else{
    
   np = nh+this.nSpeed;
   if( (nSy+np) >= nEy ){
    bIng = false;
    np = nEy-nSy;
   }
  
   this.arrMovDiv[no].style.width = "4px";   
   this.arrMovDiv[no].style.height = np+"px";   
   
   sXy = "y";
  }
    
  if(bIng){
        
   setTimeout("Yl.move("+no+","+pno+","+nSx+","+nSy+","+nEx+","+nEy+")", 1);
   
  }else{
   
   if((sXy=="x")) this.arrMovDiv[no].style.height = "2px";
   else this.arrMovDiv[no].style.width = "2px";
   
   if( nEy<this.nHeight+100 ){
    this.moveStart((sXy=="x")?"y":"x", pno, nEx, nEy);
   }else{
    
    for(var i=0; i<this.arrVerDiv.length; i++){
     if(nEx==parseInt(this.arrVerDiv[i].style.left)){      
      
      this.arrBotDiv[i].innerHTML = "<b>"+(pno+1)+"</b><br>"+this.arrBotDiv[i].innerHTML;
            
      this.arrGoDiv[pno].innerHTML = '<input type="button" value="È®ÀÎ" onClick="Yl.start('+pno+')">';
      
      break;
     }
    }  
   }
  }
 }
};
//F5 »õ·Î°íħ ¸·±â
document.onkeydown = function(e){
 if(!e) e = window.event;
 if (e.keyCode == 116){
  if( confirm("»õ·Î °íħ ÇϽðڽÀ´Ï±î?") ){
  }else{
   e.keyCode = 0;
   return false;
  }
 }
}
</script>
</head>
<body>

<div id="div_step1" style="font-size:12px;">
 
°¹¼ö ¼±ÅÃ
<select id="sel_num">
 <option value="2">2</option>
 <option value="3">3</option>
 <option value="4">4</option>
 <option value="5" selected >5</option>
 <option value="6">6</option>
 <option value="7">7</option>
 <option value="8">8</option>
 <option value="9">9</option>
 <option value="10">10</option>
 <option value="11">11</option>
 <option value="12">12</option>
 <option value="13">13</option>
 <option value="14">14</option>
 <option value="15">15</option>
 <option value="16">16</option>
 <option value="17">17</option>
 <option value="18">18</option>
 <option value="19">19</option>
 <option value="20">20</option>
</select>
°³
<input type="button" value="¸¸µé±â" onclick="Yl.init();">
</div>

<div id="div_step2" style="font-size:12px;display:none;">
 ÀÔ·ÂÈÄ °ÔÀÓ ½ÃÀÛ <input type="button" value="½ÃÀÛ" onclick="Yl.create();">
</div>
 
<div id="div_body" style="width:1000px;height:450px;border:1px solid #CCCCCC;position:relative;"></div>
</body>
</html>

   


ÃÑ °Ô½Ã¹° 209°Ç, ÃÖ±Ù 0 °Ç
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
209  ÇÁ¸°Æ® Ãâ·Â ÀÚ¹Ù½ºÅ©¸³Æ® ¼Ò½º ÇÁ·Î 11-13 42943
208  ÇöÀç ÆäÀÌÁö ÀúÀåÇϱâ ÇÁ·Î 11-13 38255
207  ¸¶¿ì½º¸¦ µû¶ó ´Ù´Ï´Â ¿¹»Û ¹«Áö°³»ö º° ûÇÏ 01-18 37101
206  ·Î¶Ç¹øÈ£ »ý¼º±â fhEhaos 10-26 38438
205  ºê¶ó¿ìÀú ¾È¿¡ ¶°´Ù´Ï´Â À̹ÌÁö±¤°í ÀÚ¹ÙÀÚ¹Ù 10-16 38178
204  ÈÞ´ëÆù¹øÈ£ °Ë»ç wkqk 06-05 20282
203  ¹è°æÀ̹ÌÁö °íÁ¤ ÀÚ¹Ù¸Ç 05-27 20435
202  ´«ÀÌ ³»·Á¿ä. ÇÏÀÌ¿° 12-20 16539
201  ºÎµå·´°Ô ¼­ºê¸Þ´º°¡ ½½¶óÀ̵ù µÇ´Â Æîħ¸Þ´º µ¹ºÎó 12-06 21481
200  »ç´Ù¸®°ÔÀÓ ÄÚ¸®¾Æ21 09-07 26980
199  ³×À̹ö ÄÞº¸½ºÅ¸ÀÏ ¸Þ´ºÀÔ´Ï´Ù dudal 05-29 18617
198  Áߺ¹À¸·Î »õâ¶ß´Â °Í ±ÝÁö ÇÁ·Î 04-03 16825
197  º¹»çÇÒ ¶§ º¹»ç ³»¿ë¿¡ ƯÁ¤ ³»¿ë Æ÷ÇÔ ½ÃÅ°±â ¿µ¹Ì 03-10 16479
196  INDEX È­¸éÀ» Àüüȭ¸éÀ¸·Î ¹Ù²Ù±â À±Èñ 02-16 21314
195  »çÀÌÆ® Á¢¼Ó½Ã ·Îµù»óŸ¦ ¾Ë·ÁÁÖ´Â..ÇÁ¸®·Îµù ¡¦ À±Èñ 02-16 19915
194  ½Ã°£´ëº°·Î ¹è°æÀ̹ÌÁö ¹Ù²Ù±â À±Èñ 02-16 20484
193  ¸µÅ©ÁÖÀ§¿¡ Á¡¼±¾ø¾Ö´Â ¹æ¹ý ÀÚ¹Ù 02-05 19792
192  ¸¶¿ì½º ¿À¹ö½Ã ±×¸² º¯ÇÏ°Ô ÇÏ´Â ½ºÅ©¸³Æ® ¼Ò½º ¾ÆÀÌ¹Ì 02-04 21180
191  Ä«¿îÆ®µÇ´Â ½Ã°è ¾ÆÀÌ¹Ì 02-04 20009
190  ¹«Á¶°Ç index.html ÆÄÀÏ °ÅÃļ­ µé¾î¿À°Ô ¸¸µé±â ÇÁ·Î 12-22 37972
 1  2  3  4  5  6  7  8  9  10  ´ÙÀ½  ¸Ç³¡
 

ȸ»ç¼Ò°³ | ÀÌ¿ë¾à°ü | °³ÀÎÁ¤º¸Ãë±Þ¹æħ | Ã¥ÀÓÀÇÇÑ°è¿Í ¹ýÀû°íÁö | À̸ÞÀϹ«´Ü¼öÁý°ÅºÎ | ÀÌ¿ë¾È³»