/*create by cand 2006-8-1
需要定义如下参数:
var hotel=0;//是否酒店城市 1表示是,其它则为不是
var scene=0;//是否景点城市 1表示是,其它则为不是
var iscountry=1;//是否显示国家 1表示不显示,其它则为显示
var iscommercial=0;//是否显示区 1表示不显示,其它则为显示
var classname='';//样式名称
var countrycode_hotel='';//国家代码
var provincecode_hotel='';//省代码
var citycode_hotel='';//城市代码
var commercialcode_hotel='';//区代码;
-----------------------------------------------------------*/
var hotel=0;//是否酒店城市 1表示是,其它则为不是
var scene=0;//是否景点城市 1表示是,其它则为不是
var iscountry=1;//是否显示国家 1表示不显示,其它则为显示
var iscommercial=0;//是否显示区 1表示不显示,其它则为显示
var classname='';//样式名称
var countrycode_hotel='';//国家代码
var provincecode_hotel='';//省代码
var citycode_hotel='';//城市代码
var commercialcode_hotel='';//区代码;

var count0_hotel; 
count0_hotel=0; 
g_hotel = new Array(); 
g_hotel[0] = new Array("0","--国家--",""); 
count0_hotel=1;
var count1_hotel; 
count1_hotel=0; 
p_hotel = new Array(); 
p_hotel[0] = new Array("0","--省份--",""); 
p_hotel[1] = new Array("cn","安徽","ah");
p_hotel[2] = new Array("cn","澳门","am");
p_hotel[3] = new Array("cn","北京","bj");
p_hotel[4] = new Array("cn","重庆","cq");
p_hotel[5] = new Array("cn","福建","fj");
p_hotel[6] = new Array("cn","广东","gd");
p_hotel[7] = new Array("cn","甘肃","gs");
p_hotel[8] = new Array("cn","广西","gx");
p_hotel[9] = new Array("cn","海南","hain");
p_hotel[10] = new Array("cn","湖北","hbs");
p_hotel[11] = new Array("cn","黑龙江","hlj");
p_hotel[12] = new Array("cn","湖南","hns");
p_hotel[13] = new Array("cn","吉林","jl");
p_hotel[14] = new Array("cn","江苏","js");
p_hotel[15] = new Array("cn","江西","jx");
p_hotel[16] = new Array("cn","四川","sc");
p_hotel[17] = new Array("cn","山东","sd");
p_hotel[18] = new Array("cn","上海","sh");
p_hotel[19] = new Array("cn","山西","sx");
p_hotel[20] = new Array("cn","陕西","sxs");
p_hotel[21] = new Array("cn","香港","xg");
p_hotel[22] = new Array("cn","云南","yn");
p_hotel[23] = new Array("cn","浙江","zj");
count1_hotel=24;
var count2_hotel; 
count2_hotel=0; 
c_hotel = new Array(); 
c_hotel[0] = new Array("0","--城市--",""); 
c_hotel[1] = new Array("am","澳门","am");
c_hotel[2] = new Array("bj","北京","bj");
c_hotel[3] = new Array("jl","长春","cc");
c_hotel[4] = new Array("sc","成都","cd");
c_hotel[5] = new Array("cq","重庆","cq");
c_hotel[6] = new Array("hns","长沙","cs");
c_hotel[7] = new Array("gd","潮州","csz");
c_hotel[8] = new Array("gd","东莞","dg");
c_hotel[9] = new Array("gd","佛山","fs");
c_hotel[10] = new Array("gx","桂林","gl");
c_hotel[11] = new Array("gd","广州","gz");
c_hotel[12] = new Array("hlj","哈尔滨","heb");
c_hotel[13] = new Array("gd","河源","hey");
c_hotel[14] = new Array("hain","海口","hk");
c_hotel[15] = new Array("hns","郴州","hnch");
c_hotel[16] = new Array("ah","黄山","hs");
c_hotel[17] = new Array("gd","惠州","huiz");
c_hotel[18] = new Array("zj","杭州","hz");
c_hotel[19] = new Array("jx","景德镇","jdz");
c_hotel[20] = new Array("zj","金华","jinghua");
c_hotel[21] = new Array("jx","九江","jj");
c_hotel[22] = new Array("jl","吉林","JL");
c_hotel[23] = new Array("gd","江门","jm");
c_hotel[24] = new Array("jx","宜春","jxyc");
c_hotel[25] = new Array("yn","昆明","km");
c_hotel[26] = new Array("ah","六安","liua");
c_hotel[27] = new Array("gs","兰州","lz");
c_hotel[28] = new Array("gd","茂名","mm");
c_hotel[29] = new Array("gd","梅州","mz");
c_hotel[30] = new Array("zj","宁波","nb");
c_hotel[31] = new Array("jx","南昌","nc");
c_hotel[32] = new Array("js","南京","nj");
c_hotel[33] = new Array("sd","青岛","qd");
c_hotel[34] = new Array("hain","琼海","qhs");
c_hotel[35] = new Array("hain","儋州","quiz");
c_hotel[36] = new Array("gd","清远","qy");
c_hotel[37] = new Array("gd","韶关","sg");
c_hotel[38] = new Array("sh","上海","sh");
c_hotel[39] = new Array("jx","上饶","sr");
c_hotel[40] = new Array("gd","汕头","st");
c_hotel[41] = new Array("hbs","随州","suizh");
c_hotel[42] = new Array("gd","汕尾","sw");
c_hotel[43] = new Array("hain","三亚","sya");
c_hotel[44] = new Array("gd","深圳","sz");
c_hotel[45] = new Array("js","苏州","szh");
c_hotel[46] = new Array("sx","太原","ty");
c_hotel[47] = new Array("hain","文昌","wc");
c_hotel[48] = new Array("hbs","武汉","wh");
c_hotel[49] = new Array("hain","万宁","wning");
c_hotel[50] = new Array("gx","梧州","wuz");
c_hotel[51] = new Array("js","无锡","wx");
c_hotel[52] = new Array("fj","武夷山","wys");
c_hotel[53] = new Array("hain","五指山","wzhishan");
c_hotel[54] = new Array("sxs","西安","xa");
c_hotel[55] = new Array("xg","香港","xg");
c_hotel[56] = new Array("hain","兴隆","xl");
c_hotel[57] = new Array("gd","云浮","yf");
c_hotel[58] = new Array("gd","阳江","yj");
c_hotel[59] = new Array("gx","阳朔","ys");
c_hotel[60] = new Array("jx","鹰潭","ytan");
c_hotel[61] = new Array("js","扬州","yz");
c_hotel[62] = new Array("gd","珠海","zh");
c_hotel[63] = new Array("zj","舟山","zhs");
c_hotel[64] = new Array("gd","湛江","zj");
c_hotel[65] = new Array("zj","绍兴","zjsx");
c_hotel[66] = new Array("gd","肇庆","zq");
c_hotel[67] = new Array("gd","中山","zs");
count2_hotel=68;
var count3_hotel; 
count3_hotel=0; 
t_hotel = new Array(); 
t_hotel[0] = new Array("0","--区县--",""); 
t_hotel[1] = new Array("gz","越秀区","0104yx");
t_hotel[2] = new Array("gz","海珠区","0105hz");
t_hotel[3] = new Array("gz","天河区","0106th");
t_hotel[4] = new Array("gz","白云区","0111by");
t_hotel[5] = new Array("gz","番禺区","0113py");
t_hotel[6] = new Array("gz","花都区","0114hd");
t_hotel[7] = new Array("gz","增城市","0183zc");
t_hotel[8] = new Array("gz","从化市","0184ch");
t_hotel[9] = new Array("sg","浈江区","0204zj");
t_hotel[10] = new Array("sg","曲江区","0205qj");
t_hotel[11] = new Array("sg","仁化县","0224rh");
t_hotel[12] = new Array("sg","乳源瑶族自治县","0232ry");
t_hotel[13] = new Array("sg","新丰县","0233xf");
t_hotel[14] = new Array("sg","南雄市","0282nx");
t_hotel[15] = new Array("sz","罗湖区","0303lh");
t_hotel[16] = new Array("sz","福田区","0304ft");
t_hotel[17] = new Array("sz","南山区","0305ns");
t_hotel[18] = new Array("sz","龙岗区","0307lg");
t_hotel[19] = new Array("sz","盐田区","0308yt");
t_hotel[20] = new Array("zh","香洲区","0402xz");
t_hotel[21] = new Array("zh","斗门区","0403dm");
t_hotel[22] = new Array("zh","金湾区","0404jw");
t_hotel[23] = new Array("st","濠江区","0512hj");
t_hotel[24] = new Array("st","澄海区","0515ch");
t_hotel[25] = new Array("st","南澳县","0523na");
t_hotel[26] = new Array("fs","南海区","0605nh");
t_hotel[27] = new Array("fs","顺德区","0606sd");
t_hotel[28] = new Array("fs","三水区","0607ss");
t_hotel[29] = new Array("fs","高明区","0608gm");
t_hotel[30] = new Array("jm","蓬江区","0703pj");
t_hotel[31] = new Array("jm","新会区","0705xh");
t_hotel[32] = new Array("jm","台山市","0781ts");
t_hotel[33] = new Array("jm","开平市","0783kp");
t_hotel[34] = new Array("jm","鹤山市","0784hs");
t_hotel[35] = new Array("jm","恩平市","0785ep");
t_hotel[36] = new Array("mm","电白县","0923db");
t_hotel[37] = new Array("zq","端州区","1202dz");
t_hotel[38] = new Array("zq","封开县","1225fk");
t_hotel[39] = new Array("zq","德庆县","1226dq");
t_hotel[40] = new Array("zq","高要市","1283gy");
t_hotel[41] = new Array("zq","四会市","1284sh");
t_hotel[42] = new Array("huiz","惠城区","1302hc");
t_hotel[43] = new Array("huiz","博罗县","1322bl");
t_hotel[44] = new Array("huiz","惠东县","1323hd");
t_hotel[45] = new Array("huiz","龙门县","1324lm");
t_hotel[46] = new Array("mz","梅　县","1421mx");
t_hotel[47] = new Array("mz","丰顺县","1423fs");
t_hotel[48] = new Array("hey","源城区","1602yc");
t_hotel[49] = new Array("yj","阳西县","1721yx");
t_hotel[50] = new Array("yj","阳东县","1723yd");
t_hotel[51] = new Array("yj","阳春市","1781yc");
t_hotel[52] = new Array("qy","清城区","1802qc");
t_hotel[53] = new Array("qy","佛冈县","1821fg");
t_hotel[54] = new Array("qy","阳山县","1823ys");
t_hotel[55] = new Array("qy","清新县","1827qx");
t_hotel[56] = new Array("qy","英德市","1881yd");
t_hotel[57] = new Array("yf","新兴县","5321xx");
count3_hotel=58;
function ChangeCountry_hotel(locationid) 
{ 
document.getElementById("countrycode_hotel").options.length = 0; 
var locationid=locationid; 
var i; 
for (i=0;i < count0_hotel; i++) 
{ 
if (g_hotel[i][0] == locationid) 
{ 
if(hotel==1)
{
if(g_hotel[i][3]!=1) document.getElementById("countrycode_hotel").options[document.getElementById("countrycode_hotel").options.length] = new Option(g_hotel[i][1], g_hotel[i][2]);
}
else
{
 document.getElementById("countrycode_hotel").options[document.getElementById("countrycode_hotel").options.length] = new Option(g_hotel[i][1], g_hotel[i][2]);
}
} 
}
ChangeProvince_hotel(countrycode_hotel);
} 
function ChangeProvince_hotel(locationid) 
{ 
document.getElementById("provincecode_hotel").options.length = 0; 
var locationid=locationid; 
var ii; 
document.getElementById("provincecode_hotel").options.add(new Option("--省份--",""));
for (ii=0;ii < count1_hotel; ii++) 
{ 
if (p_hotel[ii][0] == locationid) 
{ 
if(hotel==1 && scene==1)
{
if (p_hotel[ii][3]!=1 && p_hotel[ii][4]!=1) document.getElementById("provincecode_hotel").options[document.getElementById("provincecode_hotel").options.length] = new Option(p_hotel[ii][1], p_hotel[ii][2]); 
}
else if(hotel!=1 && scene==1)
{
if(p_hotel[ii][4]!=1) document.getElementById("provincecode_hotel").options[document.getElementById("provincecode_hotel").options.length] = new Option(p_hotel[ii][1], p_hotel[ii][2]); 
}
else if(hotel==1 && scene!=1)
{
if (p_hotel[ii][3]!=1) document.getElementById("provincecode_hotel").options[document.getElementById("provincecode_hotel").options.length] = new Option(p_hotel[ii][1], p_hotel[ii][2]); 
}
else
{
document.getElementById("provincecode_hotel").options[document.getElementById("provincecode_hotel").options.length] = new Option(p_hotel[ii][1], p_hotel[ii][2]); 
}
} 
}
ChangeCity_hotel(provincecode_hotel);
} 

function ChangeCity_hotel(locationid) 
{
document.getElementById("citycode_hotel").options.length = 0; 
var locationid=locationid; 
var iii; 
document.getElementById("citycode_hotel").options.add(new Option("--城市--",""));
for (iii=0;iii < count2_hotel; iii++) 
{ 
if (c_hotel[iii][0] == locationid) 
{ 
if(hotel==1 && scene==1)
{
if (c_hotel[iii][3]!=1 && c_hotel[iii][4]!=1) document.getElementById("citycode_hotel").options[document.getElementById("citycode_hotel").options.length] = new Option(c_hotel[iii][1], c_hotel[iii][2]); 
}
else if(hotel!=1 && scene==1)
{
if(c_hotel[iii][4]!=1) document.getElementById("citycode_hotel").options[document.getElementById("citycode_hotel").options.length] = new Option(c_hotel[iii][1], c_hotel[iii][2]); 
}
else if(hotel==1 && scene!=1)
{
if (c_hotel[iii][3]!=1) document.getElementById("citycode_hotel").options[document.getElementById("citycode_hotel").options.length] = new Option(c_hotel[iii][1], c_hotel[iii][2]); 
}
else
{
document.getElementById("citycode_hotel").options[document.getElementById("citycode_hotel").options.length] = new Option(c_hotel[iii][1], c_hotel[iii][2]); 
}

} 
} 
ChangeCommercial_hotel(citycode_hotel);
} 
function ChangeCommercial_hotel(locationid) 
{
document.getElementById("commercial_hotel").options.length = 0; 
var locationid=locationid; 
var iiii; 
document.getElementById("commercial_hotel").options.add(new Option("--区县--",""));
for (iiii=0;iiii < count3_hotel; iiii++) 
{ 
if (t_hotel[iiii][0] == locationid) 
{ 
if(hotel==1)
{
if(t_hotel[iiii][3]!=1) document.getElementById("commercial_hotel").options[document.getElementById("commercial_hotel").options.length] = new Option(t_hotel[iiii][1], t_hotel[iiii][2]);
}
else
{
document.getElementById("commercial_hotel").options[document.getElementById("commercial_hotel").options.length] = new Option(t_hotel[iiii][1], t_hotel[iiii][2]);
}} 
} 
} 

function p_change_hotel(countrycode_hotel,provincecode_hotel,citycode_hotel,commercialcode_hotel)
{
ChangeCountry_hotel(0);
if(iscountry==1)
{
document.getElementById('countrycode_hotel').value='cn';
document.getElementById('countrycode_hotel').style.display='none';
ChangeProvince_hotel("cn");
}
else
{	
document.getElementById('countrycode_hotel').value=countrycode_hotel;
ChangeProvince_hotel(countrycode_hotel);
}
document.getElementById('provincecode_hotel').value=provincecode_hotel;
ChangeCity_hotel(provincecode_hotel);
document.getElementById('citycode_hotel').value=citycode_hotel;
ChangeCommercial_hotel(citycode_hotel);
document.getElementById('commercial_hotel').value=commercialcode_hotel;
if(iscommercial==1)
{
	document.getElementById('commercial_hotel').style.display='none';
}

return;
}

document.write('<select name="countrycode" id="countrycode_hotel" onChange="ChangeProvince_hotel(this.value)" class='+classname+'>');
document.write('<option value="" selected>--国家--</option>');
document.write('</select>');
document.write('<select name="provincecode" id="provincecode_hotel" onChange="ChangeCity_hotel(this.value)" class='+classname+'>');
document.write('<option value="" selected>--省份--</option>');
document.write('</select>');
document.write('<select name="citycode" id="citycode_hotel" onChange="ChangeCommercial_hotel(this.value)" class='+classname+'>');
document.write('<option value="" selected>--城市--</option>');
document.write('</select>');
document.write('<select name="commercial" id="commercial_hotel" class='+classname+'>');
document.write('<option value="" selected>--区县--</option>');
document.write('</select>');
document.write('<script language="javascript">p_change_hotel("'+countrycode_hotel+'","'+provincecode_hotel+'","'+citycode_hotel+'","'+commercialcode_hotel+'")</script>');
