function InitCountry() {
this.PID='';
this.ID='';
this.Name='';
}
function InitCity() {
this.PID='';
this.ID='';
this.Name='';
}

Country=new Array();
City=new Array();
Country[0]=new InitCountry();
Country[0].PID='5';
Country[0].ID='6';
Country[0].Name='德国';
City[0]=new InitCity();
City[0].PID='6';
City[0].ID='法兰克福';
City[0].Name='法兰克福';
City[1]=new InitCity();
City[1].PID='6';
City[1].ID='汉堡';
City[1].Name='汉堡';
City[2]=new InitCity();
City[2].PID='6';
City[2].ID='慕尼黑';
City[2].Name='慕尼黑';
City[3]=new InitCity();
City[3].PID='6';
City[3].ID='纽伦堡';
City[3].Name='纽伦堡';
Country[1]=new InitCountry();
Country[1].PID='8';
Country[1].ID='7';
Country[1].Name='美国';
City[4]=new InitCity();
City[4].PID='7';
City[4].ID='亚特兰大';
City[4].Name='亚特兰大';
City[5]=new InitCity();
City[5].PID='7';
City[5].ID='哥伦布';
City[5].Name='哥伦布';
City[6]=new InitCity();
City[6].PID='7';
City[6].ID='纽约';
City[6].Name='纽约';
City[7]=new InitCity();
City[7].PID='7';
City[7].ID='布法罗';
City[7].Name='布法罗';
Country[2]=new InitCountry();
Country[2].PID='12';
Country[2].ID='9';
Country[2].Name='新国家';
City[8]=new InitCity();
City[8].PID='9';
City[8].ID='新城市';
City[8].Name='新城市';
City[9]=new InitCity();
City[9].PID='9';
City[9].ID='12354';
City[9].Name='12354';
Country[3]=new InitCountry();
Country[3].PID='5';
Country[3].ID='8';
Country[3].Name='英国';
City[10]=new InitCity();
City[10].PID='8';
City[10].ID='伦敦';
City[10].Name='伦敦';
City[11]=new InitCity();
City[11].PID='8';
City[11].ID='利滋';
City[11].Name='利滋';
City[12]=new InitCity();
City[12].PID='8';
City[12].ID='曼彻斯特';
City[12].Name='曼彻斯特';
City[13]=new InitCity();
City[13].PID='8';
City[13].ID='纽卡斯尔';
City[13].Name='纽卡斯尔';
City[14]=new InitCity();
City[14].PID='8';
City[14].ID='泊明翰';
City[14].Name='泊明翰';
City[15]=new InitCity();
City[15].PID='8';
City[15].ID='';
City[15].Name='';
Country[4]=new InitCountry();
Country[4].PID='3';
Country[4].ID='2';
Country[4].Name='中美国1';
City[16]=new InitCity();
City[16].PID='2';
City[16].ID='小纽约1';
City[16].Name='小纽约1';
City[17]=new InitCity();
City[17].PID='2';
City[17].ID='小纽约2';
City[17].Name='小纽约2';
City[18]=new InitCity();
City[18].PID='2';
City[18].ID='小纽约3';
City[18].Name='小纽约3';
Country[5]=new InitCountry();
Country[5].PID='4';
Country[5].ID='4';
Country[5].Name='中美国3';
City[19]=new InitCity();
City[19].PID='4';
City[19].ID='小纽约1';
City[19].Name='小纽约1';
City[20]=new InitCity();
City[20].PID='4';
City[20].ID='小纽约2';
City[20].Name='小纽约2';
City[21]=new InitCity();
City[21].PID='4';
City[21].ID='小纽约3';
City[21].Name='小纽约3';
Country[6]=new InitCountry();
Country[6].PID='5';
Country[6].ID='3';
Country[6].Name='中美国5';
City[22]=new InitCity();
City[22].PID='3';
City[22].ID='小纽约1';
City[22].Name='小纽约1';
City[23]=new InitCity();
City[23].PID='3';
City[23].ID='小纽约2';
City[23].Name='小纽约2';
City[24]=new InitCity();
City[24].PID='3';
City[24].ID='小纽约3';
City[24].Name='小纽约3';
function changeCountry(elem) {
for (var i = elem.Country.options.length; i >= 0; i--) elem.Country.options[i] = null;
 for (j=0; j < Country.length; j++) {
  if (Country[j].PID==elem.Continent.options[elem.Continent.selectedIndex].value) {
   elem.Country.options[elem.Country.options.length] = new Option(Country[j].Name,Country[j].ID );
  }
 }
   elem.Country.selectedIndex=0;
   changeCity(elem);
}

function changeCity(elem) {
for (var i = elem.City.options.length; i >= 0; i--) elem.City.options[i] = null;
if (elem.Continent.options[elem.Continent.selectedIndex].value!=''){
 for (j=0; j < City.length; j++) {
  if (City[j].PID==elem.Country.options[elem.Country.selectedIndex].value) {
   elem.City.options[elem.City.options.length] = new Option(City[j].Name,City[j].ID );
  }
 }
 elem.City.selectedIndex=0;
 intoend(form1.City);
 }
}
