

var seoul = new Array("☞_전체_☜","강남구","강동구","강북구","강서구","관악구","광진구","구로구","금천구","노원구","도봉구","동대문구","동작구","마포구","서대문구","서초구","성동구","성북구","송파구","양천구","영등포구","용산구","은평구","종로구","중구","중랑구","기타지역");
 
var incheon= new Array("☞_전체_☜","강화군","계양구","남구","남동구","동구","부평구","서구","연수구","옹진군","중구","기타지역");

var taejun= new Array("☞_전체_☜","대덕구","동구","서구","유성구","중구","기타지역");

var taegu= new Array("☞_전체_☜","남구","달서구","달성군","동구","북구","서구","수성구","중구","기타지역");

var kyongju= new Array("☞_전체_☜","광산구","남구","동구","북구","서구","기타지역");

var pusan= new Array("☞_전체_☜","강서구","금정구","기장군","남구","동구","동래구","부산진구","북구","사상구","사하구","서구","수영구","연제구","영도구","중구","해운대구","기타지역");

var ulsan= new Array("☞_전체_☜","중구","남구","동구","북구","울주군","기타지역");

var kyunggi= new Array("☞_전체_☜","가평군","고양시","과천시","광명시","광주시","구리시","군포시","김포시","남양주시","동두천시","부천시","성남시","수원시","시흥시","안산시","안성시","안양시","양주시","양평군","여주군","연천군","오산시","용인시","의왕시","의정부시","이천시","파주시","평택시","포천시","하남시","화성시","기타지역");

var kanguyn= new Array("☞_전체_☜","강릉시","고성군","동해시","삼척시","속초시","양구군","양양군","영월군","원주시","인제군","정선군","철원군","춘천시","태백시","평창군","홍천군","화천군","횡성군","기타지역");

var chungbuk= new Array("☞_전체_☜","괴산군","단양군","보은군","영동군","옥천군","음성군","제천시","진천군","청원군","청주시","충주시","증평군","기타지역");

var chungnam= new Array("☞_전체_☜","공주시","금산군","논산시","당진군","보령시","부여군","서산시","서천군","아산시","연기군","예산군","천안시","청양군","태안군","홍성군","계룡시","기타지역");

var kyungbuk= new Array("☞_전체_☜","경산시","경주시","고령군","구미시","군위군","김천시","문경시","봉화군","상주시","성주군","안동시","영덕군","영양군","영주시","영천시","예천군","울릉군","울진군","의성군","청도군","청송군","칠곡군","포항시","기타지역");

var kyungnam= new Array("☞_전체_☜","거제시","거창군","고성군","김해시","남해군","마산시","밀양시","사천시","산청군","양산시","의령군","진주시","진해시","창녕군","창원시","통영시","하동군","함안군","함양군","합천군","기타지역");

var junbuk= new Array("☞_전체_☜","고창군","군산시","김제시","남원시","무주군","부안군","순창군","완주군","익산시","임실군","장수군","전주시","정읍시","진안군","기타지역");

var junnam= new Array("☞_전체_☜","강진군","고흥군","곡성군","광양시","구례군","나주시","담양군","목포시","무안군","보성군","순천시","신안군","여수시","영광군","영암군","완도군","장성군","장흥군","진도군","함평군","해남군","화순군","기타지역");

//var jaeju= new Array("남제주군","북제주군","서귀포시","제주시","제주일원","제주전체");
var jaeju= new Array("☞_전체_☜","서귀포시","제주시","기타지역");
function swapoptions(the_array) {
	setoptiontext(window.document.form1.i_sigun,the_array); 
}

function swapoptions2(frmName,the_array) {
		setoptiontext(frmName,the_array);
}

function setoptiontext(the_select,the_array){

  if (the_array==1) {
     var len=seoul.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = seoul[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = seoul[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = seoul[len-1];
     the_select.options[len-1].value =99;
  }
  if (the_array==2) {
     var len=incheon.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = incheon[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = incheon[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = incheon[len-1];
     the_select.options[len-1].value =99;
  }
  if (the_array==3) {
     var len=taejun.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = taejun[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = taejun[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = taejun[len-1];
     the_select.options[len-1].value =99;


  }
  if (the_array==4) {
   var len=taegu.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = taegu[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text =taegu[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text =taegu[len-1];
     the_select.options[len-1].value =99;
  }
  if (the_array==5) {
     var len=kyongju.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = kyongju[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = kyongju[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = kyongju[len-1];
     //the_select.options[len-1].value =0;
	 the_select.options[len-1].value =99;
  }
  if (the_array==6) {
     var len=pusan.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = pusan[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = pusan[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = pusan[len-1];
     //the_select.options[len-1].value =0;
     the_select.options[len-1].value =99;
  }
   if (the_array==7) {
     var len=ulsan.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = ulsan[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = ulsan[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = ulsan[len-1];
     the_select.options[len-1].value =99;


  }
  if (the_array==31) {
     var len=kyunggi.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = kyunggi[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = kyunggi[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = kyunggi[len-1];
     the_select.options[len-1].value =99;
  }
  if (the_array==32) {
     var len=kanguyn.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = kanguyn[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = kanguyn[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = kanguyn[len-1];
     //the_select.options[len-1].value =0;
     the_select.options[len-1].value =99;


  }
  if (the_array==33) {
     var len=chungbuk.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = chungbuk[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = chungbuk[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = chungbuk[len-1];
     //the_select.options[len-1].value =0;
     the_select.options[len-1].value =99;
  }
  if (the_array==34) {
     var len=chungnam.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = chungnam[loop];
		 if(loop==0) {
			the_select.options[loop].value ="";
		 } else {
			the_select.options[loop].value =loop;
		 }
     }
     //the_select.options[len-2].text = chungnam[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = chungnam[len-1];
     the_select.options[len-1].value =99;


  }
  if (the_array==35) {
     var len=kyungbuk.length;
     the_select.options.length=len;

     for(loop=0;loop<len-1;loop++) {
        the_select.options[loop].text = kyungbuk[loop];
		 if(loop==0) {
			 the_select.options[loop].value ="";
		 } else {
			the_select.options[loop].value =loop;
		 }
     }
	 //the_select.options[len-2].text = kyungbuk[len-2];
     //the_select.options[len-2].value =99;
	 the_select.options[len-1].text = kyungbuk[len-1];
     the_select.options[len-1].value =99;
  }
  if (the_array==36) {
     var len=kyungnam.length;
     the_select.options.length=len;

     for(loop=0;loop<=10;loop++) {
       the_select.options[loop].text = kyungnam[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
     }
     for(loop=11;loop<len-1;loop++) {
        the_select.options[loop].text = kyungnam[loop];
         the_select.options[loop].value =loop+1;
     }
     //the_select.options[len-2].text = kyungnam[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = kyungnam[len-1];
     //the_select.options[len-1].value =0;
     the_select.options[len-1].value =99;

  }
  if (the_array==37) {
     var len=junbuk.length;
     the_select.options.length=len;

     for(loop=0;loop<len-2;loop++) {
        the_select.options[loop].text = junbuk[loop];
		 if(loop==0) {
		 the_select.options[loop].value ="";
		 } else {
		the_select.options[loop].value =loop;
		 }
         }
    //진안군 검색 안되는 오류 수정 2001.5.30 신경숙  
     //the_select.options[len-3].text = junbuk[len-3];
     //the_select.options[len-3].value =15;
     //진안군 검색 안되는것 다시 수정 2002.3.18 정수연
     the_select.options[len-2].text = junbuk[len-2];
     the_select.options[len-2].value =14;
     the_select.options[len-1].text = junbuk[len-1];
     the_select.options[len-1].value =0;
     
  }
  if (the_array==38) {
     var len=junnam.length;
     the_select.options.length=len;
     
     for(loop=0;loop<=13;loop++) {
       the_select.options[loop].text = junnam[loop];
		 if(loop==0) {
			the_select.options[loop].value ="";
		 } else {
			the_select.options[loop].value =loop;
		 }
      }
     for(loop=14;loop<len-1;loop++) {
        the_select.options[loop].text = junnam[loop];
         the_select.options[loop].value =loop+2;
     }
     //the_select.options[len-2].text = junnam[len-2];
     //the_select.options[len-2].value =99;
     the_select.options[len-1].text = junnam[len-1];
     //the_select.options[len-1].value =0;
     the_select.options[len-1].value = 99;
  }
 /*
	제주특별자치도 행정구역 변경으로 수정
	남제주군 서귀포시로 
	북제주군 제주시로 

*/
	/*
  if (the_array==39) {
     var len=jaeju.length;
     the_select.options.length=len;
	 for(loop=0;loop<len;loop++) {     	
		the_select.options[loop].text = jaeju[loop];
		 if(loop==0) {
		 	the_select.options[loop].value ="";
		 } else {
			the_select.options[loop].value =loop;
		 }
     }
     the_select.options[len-1].text = jaeju[len-1];
     the_select.options[len-1].value =99;
  }
*/
  if (the_array==39) {
     var len=jaeju.length;
     the_select.options.length=len;

     //for(loop=0;loop<len-1;loop++) {
	 for(loop=0;loop<len;loop++) {     	
		the_select.options[loop].text = jaeju[loop];
		//alert(" the_select.options[" +loop+ "].text  = " + the_select.options[loop].text );        
		 if(loop==0) {
		 	the_select.options[loop].value ="";
		 } else if(loop==1) {
			the_select.options[loop].value =3;
		 } else if(loop==2) {
			the_select.options[loop].value =4;
		 } else  {
			the_select.options[loop].value =loop;
		 }
     }


     the_select.options[len-1].text = jaeju[len-1];
     the_select.options[len-1].value =99;
	//alert(the_select.options[2].value);

  }

}
function MM_showHideLayers() { //v2.0
  var i, visStr, args, theObj;
  args = MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
    visStr   = args[i+2];
    if (navigator.appName == 'Netscape' && document.layers != null) {
      theObj = eval(args[i]);
      if (theObj) theObj.visibility = visStr;
    } else if (document.all != null) { //IE
      if (visStr == 'show') visStr = 'visible'; //convert vals
      if (visStr == 'hide') visStr = 'hidden';
      theObj = eval(args[i+1]);
      if (theObj) theObj.style.visibility = visStr;
  } }
}

