﻿Cset=new Array(2);
Dset=new Array(2);
C0=new Array(7);
D0=new Array(7);
Cset[0]=C0;
Dset[0]=D0;
C0[0]="0731";
D0[0]="東區";
C0[1]="0732";
D0[1]="南區";
C0[2]="0733";
D0[2]="西區";
C0[3]="0734";
D0[3]="北區";
C0[4]="0735";
D0[4]="中區";
C0[5]="0736";
D0[5]="安平區";
C0[6]="0737";
D0[6]="安南區";
C1=new Array(31);
D1=new Array(31);
Cset[1]=C1;
Dset[1]=D1;
C1[0]="0771";
D1[0]="新營市";
C1[1]="0772";
D1[1]="七股鄉";
C1[2]="0773";
D1[2]="下營鄉";
C1[3]="0774";
D1[3]="大內鄉";
C1[4]="0775";
D1[4]="山上鄉";
C1[5]="0779";
D1[5]="仁德鄉";
C1[6]="0779";
D1[6]="六甲鄉";
C1[7]="0779";
D1[7]="北門鄉";
C1[8]="0779";
D1[8]="左鎮鄉";
C1[9]="0779";
D1[9]="永康市";
C1[10]="0779";
D1[10]="玉井鄉";
C1[11]="0779";
D1[11]="白河鎮";
C1[12]="0779";
D1[12]="安定鄉";
C1[13]="0779";
D1[13]="西港鄉";
C1[14]="0779";
D1[14]="官田鄉";
C1[15]="0779";
D1[15]="佳里鎮";
C1[16]="0779";
D1[16]="東山鄉";
C1[17]="0779";
D1[17]="南化鄉";
C1[18]="0779";
D1[18]="後壁鄉";
C1[19]="0779";
D1[19]="柳營鄉";
C1[20]="0779";
D1[20]="將軍鄉";
C1[21]="0779";
D1[21]="麻豆鎮";
C1[22]="0779";
D1[22]="善化鎮";
C1[23]="0779";
D1[23]="新化鎮";
C1[24]="0779";
D1[24]="新市鄉";
C1[25]="0779";
D1[25]="楠西鄉";
C1[26]="0779";
D1[26]="學甲鎮";
C1[27]="0779";
D1[27]="龍崎鄉";
C1[28]="0779";
D1[28]="歸仁鄉";
C1[29]="0779";
D1[29]="關廟鄉";
C1[30]="0779";
D1[30]="鹽水鎮";


        function setShi(sheng,shi)
        {
                param=sheng.selectedIndex-1;
                  if(param>=0)
                  {
                        shi.options.length=0;
                        for(i=0;i<Cset[param].length;i++)
                        {
                                shi.options.length++;
                                shi.options[i].text=Dset[param][i];
                                shi.options[i].value=Dset[param][i];
                        }
                  }else
                  {
                     shi.options.length=0;
                     shi.options.length++;
                     shi.options[0].text="請選擇";
                     shi.options[0].value="";
                  }
        }
        function setValue(sheng,ShengValue,shi,ShiValue)
        {
			for(i=0;i<sheng.length;i++)
			{
			  if(ShengValue==sheng.options[i].value)
			  {
				sheng.options[i].selected=true;
			  }
			}
			
                	param=sheng.selectedIndex-1;
                	shi.options.length=0;
                        for(i=0;i<Cset[param].length;i++)
                        {
                                shi.options.length++;
                                shi.options[i].text=Dset[param][i];
                                shi.options[i].value=Dset[param][i];
				if(ShiValue==Dset[param][i])
				{
					shi.options[i].selected=true;
				}
                        }
        }
