* 出发城市: | * 到达城市: |
city.js文件
var cff = new Array(); cff[0] = new Array('阿克苏', 'aksu', '351'); cff[1] = new Array('阿勒泰', 'altay', '3114'); cff[2] = new Array('安康', 'ankang', '311'); cff[3] = new Array('安庆', 'anqing', '36'); cff[4] = new Array('鞍山', 'anshan', '245'); cff[5] = new Array('安顺', 'anshun', '112'); cff[6] = new Array('百色', 'baise', '98'); cff[7] = new Array('保山', 'baoshan', '367'); cff[8] = new Array('包头', 'baotou', '261'); cff[9] = new Array('北海', 'beihai', '99'); cff[10] = new Array('北京', 'beijing', '53'); cff[11] = new Array('北京首都', 'beijing shoudu', '53'); cff[12] = new Array('北京南苑', 'beijingnanyuan', '53'); cff[13] = new Array('蚌埠', 'bengbu', '37'); cff[14] = new Array('博乐', 'bole', '354'); cff[15] = new Array('长白山', 'changbaishan', '4569'); cff[16] = new Array('长春', 'changchun', '214'); cff[17] = new Array('常德', 'changde', '198'); cff[18] = new Array('昌都', 'changdu', '345'); cff[19] = new Array('长海', 'changhai', '248'); cff[20] = new Array('长沙', 'changsha', '199'); cff[21] = new Array('长治', 'changzhi', '300'); cff[22] = new Array('常州', 'changzhou', '221'); cff[23] = new Array('朝阳', 'chaoyang', '247'); cff[24] = new Array('成都', 'chengdu', '324'); cff[25] = new Array('赤峰', 'chifeng', '262'); cff[26] = new Array('重庆', 'chongqing', '394'); cff[27] = new Array('大理', 'dali', '369'); cff[28] = new Array('大连', 'dalian', '248'); cff[29] = new Array('丹东', 'dandong', '249'); cff[30] = new Array('大庆', 'daqing', '168'); cff[31] = new Array('大同', 'datong', '301'); cff[32] = new Array('达县', 'daxian', '325'); cff[33] = new Array('迪庆', 'diqing', '371'); cff[34] = new Array('东营', 'dongying', '285'); cff[35] = new Array('敦煌', 'dunhuang', '68'); cff[36] = new Array('鄂尔多斯', 'eerduosi', '263'); cff[37] = new Array('恩施', 'enshi', '182'); cff[38] = new Array('二连浩特', 'erlianhaote', '150'); cff[39] = new Array('佛山', 'foshan', '79'); cff[40] = new Array('阜阳', 'fuyang', '41'); cff[41] = new Array('富蕴', 'fuyun', '3114'); cff[42] = new Array('福州', 'fuzhou', '54'); cff[43] = new Array('赣州', 'ganzhou', '235'); cff[44] = new Array('格尔木', 'germu', '279'); cff[45] = new Array('广汉', 'guanghan', '326'); cff[46] = new Array('广元', 'guangyuan', '329'); cff[47] = new Array('广州', 'guangzhou', '80'); cff[48] = new Array('桂林', 'guiling', '102'); cff[49] = new Array('贵阳', 'guiyang', '114'); cff[50] = new Array('固原', 'guyuan ', '4598'); cff[51] = new Array('哈尔滨', 'haerbin', '170'); cff[52] = new Array('海口', 'haikou', '127'); cff[53] = new Array('海拉尔', 'hailar', '265'); cff[54] = new Array('哈密', 'hami', '356'); cff[55] = new Array('邯郸', 'handan', '142'); cff[56] = new Array('杭州', 'hangzhou', '383'); cff[57] = new Array('汉中', 'hanzhong', '313'); cff[58] = new Array('合肥', 'hefei', '42'); cff[59] = new Array('黑河', 'heihe', '172'); cff[60] = new Array('衡阳', 'hengyang', '201'); cff[61] = new Array('和田', 'hetian', '357'); cff[62] = new Array('呼和浩特', 'hohhot', '264'); cff[63] = new Array('香港', 'hong kong', '395'); cff[64] = new Array('淮安', 'huaian', '222'); cff[65] = new Array('怀化', 'huaihua', '202'); cff[66] = new Array('黄山', 'huangshan', '45'); cff[67] = new Array('黄岩', 'huangyan', '390'); cff[68] = new Array('惠州', 'huizhou', '82'); cff[69] = new Array('佳木斯', 'jiamusi', '174'); cff[70] = new Array('吉安', 'jian', '236'); cff[71] = new Array('嘉峪关', 'jiayuguang', '66'); cff[72] = new Array('吉林', 'jilin', '215'); cff[73] = new Array('济南', 'jinan', '287'); cff[74] = new Array('景德镇', 'jindezheng', '237'); cff[75] = new Array('井冈山', 'jinggangshan', '236'); cff[76] = new Array('济宁', 'jining', '288'); cff[77] = new Array('锦州', 'jinzhou', '253'); cff[78] = new Array('酒泉', 'jiuquan', '68'); cff[79] = new Array('九寨沟', 'jiuzhaigou', '322'); cff[80] = new Array('鸡西', 'jixi', '173'); cff[81] = new Array('喀纳斯', 'kanasi', '3114'); cff[82] = new Array('康定', 'kangding', '327'); cff[83] = new Array('克拉玛依', 'karamay', '359'); cff[84] = new Array('喀什', 'kashi', '358'); cff[85] = new Array('库尔勒', 'korla', '353'); cff[86] = new Array('库车', 'kuche', '351'); cff[87] = new Array('昆明', 'kunming', '373'); cff[88] = new Array('兰州', 'lanzhou', '69'); cff[89] = new Array('拉萨', 'lhasa', '346'); cff[90] = new Array('连云港', 'lianyungang', '223'); cff[91] = new Array('荔波', 'libo', '151'); cff[92] = new Array('丽江', 'lijiang', '374'); cff[93] = new Array('临沧', 'lincang', '375'); cff[94] = new Array('临沂', 'linyi', '291'); cff[95] = new Array('林芝', 'linzhi', '347'); cff[96] = new Array('黎平', 'liping', '116'); cff[97] = new Array('柳州', 'liuzhou', '107'); cff[98] = new Array('龙岩', 'longyan', '55'); cff[99] = new Array('洛阳', 'luoyang', '155'); cff[100] = new Array('庐山', 'lushan', '238'); cff[101] = new Array('泸州', 'luzhou', '342'); cff[102] = new Array('澳门', 'macau', '396'); cff[103] = new Array('芒市', 'mangshi', '370'); cff[104] = new Array('满洲里', 'manzhouli', '265'); cff[105] = new Array('梅县', 'meixian', '86'); cff[106] = new Array('绵阳', 'mianyang', '333'); cff[107] = new Array('漠河', 'mohe', '169'); cff[108] = new Array('牡丹江', 'mudanjiang', '175'); cff[109] = new Array('那拉提', 'nalati', '366'); cff[110] = new Array('南昌', 'nanchang', '239'); cff[111] = new Array('南充', 'nanchong', '334'); cff[112] = new Array('南京', 'nanjing', '224'); cff[113] = new Array('南宁', 'nanning', '108'); cff[114] = new Array('南通', 'nantong', '225'); cff[115] = new Array('南阳', 'nanyang', '156'); cff[116] = new Array('宁波', 'ningbo', '388'); cff[117] = new Array('攀枝花', 'panzhihua', '336'); cff[118] = new Array('普洱', 'puer', '378'); cff[119] = new Array('且末', 'qiemo', '353'); cff[120] = new Array('青岛', 'qingdao', '292'); cff[121] = new Array('庆阳', 'qingyang', '73'); cff[122] = new Array('秦皇岛', 'qinhuangdao', '145'); cff[123] = new Array('齐齐哈尔', 'qiqihaer', '177'); cff[124] = new Array('泉州', 'quanzhou', '59'); cff[125] = new Array('衢州', 'quzhou', '393'); cff[126] = new Array('三亚', 'sanya', '133'); cff[127] = new Array('沙河口', 'shahekou', '248'); cff[128] = new Array('上海', 'shanghai', '321'); cff[129] = new Array('上海虹桥', 'shanghaihongqiao', '321'); cff[130] = new Array('上海浦东', 'shanghaipudong', '321'); cff[131] = new Array('鄯善', 'shanshan', '363'); cff[132] = new Array('汕头', 'shantou', '88'); cff[133] = new Array('沙市', 'shashi', '60'); cff[134] = new Array('沈阳', 'shenyang', '256'); cff[135] = new Array('深圳', 'shenzhen', '91'); cff[136] = new Array('石家庄', 'shijiazhuang', '146'); cff[137] = new Array('思茅', 'simao', '378'); cff[138] = new Array('塔城', 'tacheng', '3113'); cff[139] = new Array('台南', 'tainan', '403'); cff[140] = new Array('台湾桃园', 'taipei', '5116'); cff[141] = new Array('台北松山', 'taipeisongshan', '401'); cff[142] = new Array('太原', 'taiyuan', '307'); cff[143] = new Array('台中', 'taizhong', '404'); cff[144] = new Array('唐山', 'tangshan', '147'); cff[145] = new Array('腾冲', 'tengchong', '367'); cff[146] = new Array('天津', 'tianjin', '343'); cff[147] = new Array('天水', 'tianshui', '74'); cff[148] = new Array('通化', 'tonghua', '219'); cff[149] = new Array('通辽', 'tongliao', '266'); cff[150] = new Array('铜仁', 'tongren', '119'); cff[151] = new Array('吐鲁番', 'tulufan', '363'); cff[152] = new Array('万州', 'wanzhou', '394'); cff[153] = new Array('潍坊', 'weifang', '296'); cff[154] = new Array('威海', 'weihai', '295'); cff[155] = new Array('文山', 'wenshan', '379'); cff[156] = new Array('温州', 'wenzhou', '391'); cff[157] = new Array('乌海', 'wuhai', '267'); cff[158] = new Array('武汉', 'wuhan', '192'); cff[159] = new Array('乌兰浩特', 'wulanhaote', '270'); cff[160] = new Array('乌鲁木齐', 'wulumuqi', '364'); cff[161] = new Array('无锡', 'wuxi', '229'); cff[162] = new Array('武夷山', 'wuyishan', '56'); cff[163] = new Array('梧州', 'wuzhou', '110'); cff[164] = new Array('厦门', 'xiamen', '61'); cff[165] = new Array('西安', 'xian', '317'); cff[166] = new Array('襄樊', 'xiangfan', '195'); cff[167] = new Array('西昌', 'xichang', '331'); cff[168] = new Array('锡林浩特', 'xilinhot', '269'); cff[169] = new Array('兴城', 'xingcheng', '252'); cff[170] = new Array('邢台', 'xingtai', '148'); cff[171] = new Array('兴义', 'xingyi', '118'); cff[172] = new Array('西宁', 'xining', '281'); cff[173] = new Array('西双版纳', 'xishuangbanna', '380'); cff[174] = new Array('徐州', 'xuzhou', '230'); cff[175] = new Array('延安', 'yanan', '319'); cff[176] = new Array('盐城', 'yancheng', '231'); cff[177] = new Array('延吉', 'yanji', '220'); cff[178] = new Array('烟台', 'yantai', '297'); cff[179] = new Array('宜宾', 'yibin', '339'); cff[180] = new Array('宜昌', 'yichang', '197'); cff[181] = new Array('伊春', 'yichun', '180'); cff[182] = new Array('银川', 'yinchuan', '274'); cff[183] = new Array('伊宁', 'yining', '366'); cff[184] = new Array('义乌', 'yiwu', '386'); cff[185] = new Array('永州零陵', 'yongzhou', '208'); cff[186] = new Array('元谋', 'yuanmou', '368'); cff[187] = new Array('榆林', 'yulin', '320'); cff[188] = new Array('运城', 'yuncheng', '310'); cff[189] = new Array('玉树', 'yushu', '282'); cff[190] = new Array('张家界', 'zhangjiajie', '210'); cff[191] = new Array('湛江', 'zhanjiang', '94'); cff[192] = new Array('昭通', 'zhaotong', '382'); cff[193] = new Array('郑州', 'zhengzhou', '163'); cff[194] = new Array('迪庆', 'zhongdian', '32568'); cff[195] = new Array('中卫', 'zhongwei', '3105'); cff[196] = new Array('舟山', 'zhoushan', '392'); cff[197] = new Array('珠海', 'zhuhai', '97'); cff[198] = new Array('遵义', 'zunyi', '120'); cff[199] = new Array('巢湖', 'chaohu', '$合肥-65.80'); cff[200] = new Array('池州', 'chizhou', '$合肥 -121.90'); cff[201] = new Array('滁州', 'chuzhou', '$合肥-112.20'); cff[202] = new Array('淮北', 'huaibei', '$合肥-213.10'); cff[203] = new Array('淮南', 'huainan', '$合肥-82.70'); cff[204] = new Array('六安', 'liuan', '$合肥-79.30'); cff[205] = new Array('马鞍山', 'maanshan', '$合肥-122.00'); cff[206] = new Array('铜陵', 'tongling', '$合肥-106.20'); cff[207] = new Array('芜湖', 'wuhu', '$合肥-124.20'); cff[208] = new Array('宣城', 'xuancheng', '$合肥-176.60'); cff[209] = new Array('亳州', 'bozhou', '$黄山-485.30'); cff[210] = new Array('宁德', 'ningde', '$福州-69.00'); cff[211] = new Array('莆田', 'putian', '$福州-68.00'); cff[212] = new Array('漳州', 'zhangzhou', '$厦门-43.60'); cff[213] = new Array('白银', 'baiyin', '$兰州-61.00'); cff[214] = new Array('定西', 'dingxi', '$兰州-91.00'); cff[215] = new Array('甘南', 'gannan', '$兰州-141.00$嘉峪关-675.00'); cff[216] = new Array('金昌', 'jinchang', '$兰州-295.00$嘉峪关-414.40'); cff[217] = new Array('临夏', 'linxia', '$兰州-102.60'); cff[218] = new Array('陇南', 'longnan', '$兰州-297.00'); cff[219] = new Array('平凉', 'pingliang', '$西安-251.70$兰州-293.00'); cff[220] = new Array('武威', 'wuwei', '$嘉峪关-72.80$兰州-222.00'); cff[221] = new Array('张掖', 'zhangye', '$酒泉-211.40$嘉峪关-238.00$兰州-267.00'); cff[222] = new Array('潮州', 'chaozhou', '$汕头-30.60$广州-342.60'); cff[223] = new Array('东莞', 'dongguan', '$广州-51.20'); cff[224] = new Array('河源', 'heyuan', '$广州-156.90'); cff[225] = new Array('江门', 'jiangmen', '$广州-55.40$珠海-56.20'); cff[226] = new Array('揭阳', 'jieyang', '$广州-312.70'); cff[227] = new Array('茂名', 'maoming', '$湛江-64.20$珠海-273.90'); cff[228] = new Array('清远', 'qingyuan', '$广州-64.10'); cff[229] = new Array('汕尾', 'shanwei', '$汕头-145.20$湛江-521.50'); cff[230] = new Array('韶关', 'shaoguan', '$广州-171.00'); cff[231] = new Array('阳江', 'yangjiang', '$湛江-168.00$广州-181.40$汕头-496.10'); cff[232] = new Array('云浮', 'yunfu', '$广州-124.00'); cff[233] = new Array('肇庆', 'zhaoqing', '$广州-76.70'); cff[234] = new Array('中山', 'zhongshan', '$珠海-31.60$广州-63.20'); cff[235] = new Array('崇左', 'congzuo', '$南宁-100.00'); cff[236] = new Array('防城港', 'fangchenggang', '$北海-79.00$南宁-119.00'); cff[237] = new Array('贵港', 'guigang', '$南宁-135.00'); cff[238] = new Array('河池', 'hechi', '$柳州-140.70$南宁-190.00'); cff[239] = new Array('贺州', 'hezhou', '$梧州-97.60'); cff[240] = new Array('来宾', 'laibin', '$柳州-60.00$南宁-130.00'); cff[241] = new Array('钦州', 'qinzhou', '$北海-75.00$南宁-82.00'); cff[242] = new Array('毕节', 'bijie', '$贵阳-148.00'); cff[243] = new Array('六盘水', 'liupanshui', '$贵阳-186.80'); cff[244] = new Array('白沙', 'baisha', '$三亚-108.00$海口-127.00'); cff[245] = new Array('保亭', 'baoting', '$三亚-49.00'); cff[246] = new Array('昌江', 'changjiang', '$海口-1200.00$三亚-1478.00'); cff[247] = new Array('澄迈', 'chengmai', '$海口-47.00$三亚-172.00'); cff[248] = new Array('定安', 'anding', '$海口-37.00$三亚-182.00'); cff[249] = new Array('东方', 'dongfang', '$三亚-128.00$海口-206.00'); cff[250] = new Array('乐东', 'ledong', '$三亚-67.00$海口-186.00'); cff[251] = new Array('临高', 'lingao', '$海口-70.00$三亚-188.00'); cff[252] = new Array('陵水', 'lingshui', '$三亚-60.00$海口-171.00'); cff[253] = new Array('琼海', 'qionghai', '$海口-88.00$三亚-154.00'); cff[254] = new Array('琼中', 'qiongzhong', '$三亚-95.00$海口-123.00'); cff[255] = new Array('屯昌', 'tunchang', '$海口-80.00$三亚-139.00'); cff[256] = new Array('万宁', 'wanning', '$三亚-113.00$海口-140.00'); cff[257] = new Array('文昌', 'wenchang', '$海口-75.00$三亚-197.00'); cff[258] = new Array('五指山', 'wuzhishan', '$三亚-59.00$海口-166.00'); cff[259] = new Array('儋州', 'danzhou', '$海口-97.00$三亚-142.00'); cff[260] = new Array('保定', 'baoding', '$石家庄-126.80$秦皇岛-427.90'); cff[261] = new Array('沧州', 'cangzhou', '$天津-85.40'); cff[262] = new Array('承德', 'chengde', '$北京-187.70$秦皇岛-196.70'); cff[263] = new Array('衡水', 'hengshui', '$石家庄-125.40'); cff[264] = new Array('廊坊', 'langfang', '$北京-55.00'); cff[265] = new Array('张家口', 'zhangjiakou', '$北京-173.30'); cff[266] = new Array('济源', 'jiyuan', '$洛阳-47.30'); cff[267] = new Array('焦作', 'jiaozuo', '$洛阳-103.10'); cff[268] = new Array('开封', 'kaifeng', '$洛阳-195.70'); cff[269] = new Array('平顶山', 'pingdingshan', '$洛阳-129.90'); cff[270] = new Array('三门峡', 'sanmenxia', '$洛阳-120.20'); cff[271] = new Array('商丘', 'shangqiu', '$洛阳-325.80'); cff[272] = new Array('新乡', 'xinxiang', '$洛阳-162.60'); cff[273] = new Array('信阳', 'xinyang', '$洛阳-310.00'); cff[274] = new Array('许昌', 'xuchang', '$洛阳-157.00'); cff[275] = new Array('周口', 'zhoukou', '$洛阳-246.90'); cff[276] = new Array('驻马店', 'zhumadian', '$洛阳-236.40'); cff[277] = new Array('漯河', 'luohe', '$洛阳-198.70'); cff[278] = new Array('濮阳', 'puyang', '$洛阳 -282.00'); cff[279] = new Array('鹤岗', 'hegang', '$佳木斯-49.70'); cff[280] = new Array('七台河', 'qitaihe', '$佳木斯-108.60$牡丹江-175.60'); cff[281] = new Array('双鸭山', 'shuangyashan', '$佳木斯-80.50'); cff[282] = new Array('绥化', 'shuihua', '$哈尔滨-100.90'); cff[283] = new Array('鄂州', 'ezhou', '$武汉-56.00'); cff[284] = new Array('黄冈', 'huanggang', '$武汉-54.00'); cff[285] = new Array('黄石', 'huangshi', '$武汉-84.00'); cff[286] = new Array('荆门', 'jingmen', '$沙市-319.00'); cff[287] = new Array('荆州', 'jingzhou', '$武汉-198.00$沙市-241.00'); cff[288] = new Array('潜江', 'qianjiang', '$武汉-134.00'); cff[289] = new Array('神农架', 'shennongjia', '$武汉-372.00'); cff[290] = new Array('十堰', 'shiyan', '$襄樊-148.00$武汉-391.00'); cff[291] = new Array('随州', 'suizhou', '$襄樊-122.00$武汉-150.00'); cff[292] = new Array('天门', 'tianmen', '$武汉-108.00'); cff[293] = new Array('仙桃', 'xiantao', '$武汉-84.00'); cff[294] = new Array('咸宁', 'xianning', '$武汉-85.00'); cff[295] = new Array('孝感', 'xiaogan', '$武汉-51.00'); cff[296] = new Array('郴州', 'chenzhou', '$衡阳-115.00$永州-158.00'); cff[297] = new Array('娄底', 'loudi', '$长沙-104.00'); cff[298] = new Array('邵阳', 'shaoyang', '$长沙-175.00'); cff[299] = new Array('湘潭', 'xiangtan', '$长沙-44.00'); cff[300] = new Array('湘西', 'xiangxi', '$张家界-120.00'); cff[301] = new Array('益阳', 'yiyang', '$长沙-75.00'); cff[302] = new Array('岳阳', 'yueyang', '$长沙-118.00'); cff[303] = new Array('株洲', 'zhuzhou', '$长沙-252.00'); cff[304] = new Array('白城', 'baicheng', '$长春-272.50'); cff[305] = new Array('辽源', 'liaoyuan', '$长春-112.70'); cff[306] = new Array('四平', 'siping', '$长春-112.40'); cff[307] = new Array('松原', 'songyuan', '$长春-135.60'); cff[308] = new Array('苏州', 'suzhou', '$上海-82.40'); cff[309] = new Array('宿迁', 'suqian', '$徐州-104.90'); cff[310] = new Array('扬州', 'yangzhou', '$南京-68.70$常州-83.80'); cff[311] = new Array('镇江', 'zhenjiang', '$南京-64.40'); cff[312] = new Array('萍乡', 'pingxiang', '$吉安-124.80$南昌-229.90'); cff[313] = new Array('上饶', 'shangrao', '$景德镇-120.70$南昌-210.40'); cff[314] = new Array('新余', 'xinyu', '$吉安-70.10$南昌-129.40'); cff[315] = new Array('宜春', 'yichun', '$吉安-91.20$南昌-176.70'); cff[316] = new Array('鹰潭', 'yingtan', '$景德镇-117.60$南昌-128.90'); cff[317] = new Array('本溪', 'benxi', '$沈阳-60.80'); cff[318] = new Array('抚顺', 'fushun', '$沈阳-38.00'); cff[319] = new Array('阜新', 'fuxin', '$朝阳-128.00$沈阳-178.00'); cff[320] = new Array('辽阳', 'liaoyang', '$沈阳-57.70'); cff[321] = new Array('盘锦', 'panjin', '$沈阳-149.00'); cff[322] = new Array('铁岭', 'tieling', '$沈阳-66.60'); cff[323] = new Array('营口', 'yingkou', '$沈阳-163.40$大连-186.20'); cff[324] = new Array('巴彦淖尔', 'bayanzhuoer', '$包头-204.00'); cff[325] = new Array('乌兰察布', 'wulanchabu', '$呼和浩特-116.50'); cff[326] = new Array('石嘴山', 'shizuishan', '$银川-57.40'); cff[327] = new Array('吴忠', 'wuzhong', '$银川-47.30'); cff[328] = new Array('果洛', 'guoluo', '$西宁-265.70'); cff[329] = new Array('海北', 'haibei', '$西宁-84.00'); cff[330] = new Array('海东', 'haidong', '$西宁-32.00'); cff[331] = new Array('海南藏族', 'hainan', '$西宁-108.30'); cff[332] = new Array('黄南', 'huangnan', '$西宁-107.30$格尔木-723.00'); cff[333] = new Array('滨州', 'binzhou', '$济南-126.10'); cff[334] = new Array('德州', 'dezhou', '$济南-105.00'); cff[335] = new Array('菏泽', 'heze', '$济南-209.60'); cff[336] = new Array('莱芜', 'laiwu', '$济南-78.60'); cff[337] = new Array('聊城', 'liaocheng', '$济南-102.80'); cff[338] = new Array('日照', 'rizhao', '$青岛-105.10'); cff[339] = new Array('泰安', 'taian', '$济南-48.40'); cff[340] = new Array('枣庄', 'zaozhuang', '$济南-186.50'); cff[341] = new Array('淄博', 'zibo', '$济南-109.40'); cff[342] = new Array('晋中', 'jinzhong', '$太原-26.40'); cff[343] = new Array('临汾', 'linfen', '$运城-115.70$长治-153.80'); cff[344] = new Array('吕梁', 'lvliang', '$太原-145.80'); cff[345] = new Array('朔州', 'shuozhou', '$太原-140.20'); cff[346] = new Array('忻州', 'xinzhou', '$太原-53.30'); cff[347] = new Array('阳泉', 'yangquan', '$太原-106.60'); cff[348] = new Array('宝鸡', 'baoji', '$汉中-129.40$西安-178.30'); cff[349] = new Array('商洛', 'shangluo', '$西安-115.00'); cff[350] = new Array('铜川', 'tongchuan', '$西安-81.00'); cff[351] = new Array('渭南', 'weinan', '$西安-55.00$汉中-258.20'); cff[352] = new Array('巴中', 'bazhong', '$南充-125.60$成都-293.80'); cff[353] = new Array('广安', 'guangan', '$重庆-89.70'); cff[354] = new Array('乐山', 'leshan', '$成都-111.50'); cff[355] = new Array('眉山', 'meishan', '$成都-65.70'); cff[356] = new Array('内江', 'neijiang', '$成都-146.50'); cff[357] = new Array('遂宁', 'shuining', '$成都-150.10'); cff[358] = new Array('雅安', 'yaan', '$成都-137.40'); cff[359] = new Array('资阳', 'ziyang', '$成都-78.70'); cff[360] = new Array('自贡', 'zigong', '$成都-145.70$重庆-166.80'); cff[361] = new Array('阿里', 'ali(ngari)', '$拉萨-1136.00'); cff[362] = new Array('那曲', 'naqu(nagqu)', '$拉萨-210.00'); cff[363] = new Array('日喀则', 'rikaze(shigatse)', '$拉萨-229.00'); cff[364] = new Array('山南', 'shannan', '$拉萨-84.50'); cff[365] = new Array('阿拉尔', 'alaer', '$阿克苏-111.00$喀什-1466.00'); cff[366] = new Array('昌吉', 'changji', '$乌鲁木齐-1565.00'); cff[367] = new Array('石河子', 'shihezi', '$乌鲁木齐-165.00'); cff[368] = new Array('图木舒克', 'tumushuke', '$喀什-266.00$和田-823.00'); cff[369] = new Array('五家渠', 'wujiaqu', '$乌鲁木齐-39.00'); cff[370] = new Array('红河', 'honghe', '$翠云-160.50$昆明-190.00'); cff[371] = new Array('怒江', 'nujiang', '$大理-141.50$昆明-399.80'); cff[372] = new Array('曲靖', 'qujing', '$昆明-119.00'); cff[373] = new Array('玉溪', 'yuxi', '$昆明-78.60'); cff[374] = new Array('湖州', 'huzhou', '$杭州-69.00'); cff[375] = new Array('嘉兴', 'jiaxing', '$杭州-77.00'); cff[376] = new Array('丽水', 'lishui', '$温州-83.20$杭州-185.30'); cff[377] = new Array('绍兴', 'shaoxing', '$杭州-51.00$宁波-94.00'); cff[378] = new Array('溧阳', 'liyang', '$常州-56.00'); cff[379] = new Array('启东', 'qidong', '$南通-74.60'); cff[380] = new Array('常熟', 'changshu', '$上海-83.60'); cff[381] = new Array('昆山', 'kunshan', '$上海-49.30'); cff[382] = new Array('太仓', 'taicang', '$上海-42.00'); cff[383] = new Array('吴江', 'wujiang', '$上海-80.20'); cff[384] = new Array('张家港', 'zhangjiagang', '$南通-34.40$上海-110.00'); cff[385] = new Array('江阴', 'jiangyin', '$常州-34.80'); cff[386] = new Array('宜兴', 'yixing', '$常州-43.00'); cff[387] = new Array('江都', 'jiangdu', '$常州-81.10$南京-83.70$南通-141.00'); cff[388] = new Array('仪征', 'yizheng', '$南京-43.70'); cff[389] = new Array('千岛湖', 'qiandaohu', '$杭州-132.60'); cff[390] = new Array('建德', 'jiande', '$衢州-72.00$义乌-81.00$杭州-121.70'); cff[391] = new Array('临安', 'linan', '$杭州-44.00'); cff[392] = new Array('桐庐', 'tongluxian', '$杭州-70.20'); cff[393] = new Array('安吉', 'anjixian', '$杭州-62.00'); cff[394] = new Array('德清', 'deqingxian', '$杭州-34.00'); cff[395] = new Array('海宁', 'haining', '$杭州-57.00'); cff[396] = new Array('海盐', 'haiyanxian', '$杭州-82.00'); cff[397] = new Array('嘉善', 'jiashanxian', '$杭州-93.10'); cff[398] = new Array('平湖', 'pinghu', '$杭州-94.60'); cff[399] = new Array('桐乡', 'tongxiang', '$杭州-56.00'); cff[400] = new Array('东阳', 'dongyang', '$义乌-16.20$杭州-111.00'); cff[401] = new Array('兰溪', 'lanxi', '$义乌-58.70$杭州-128.40'); cff[402] = new Array('武义', 'wuyixian', '$温州-130.00$杭州-144.90'); cff[403] = new Array('永康', 'yongkang', '$义乌-46.00$温州-106.30$杭州-140.90'); cff[404] = new Array('缙云', 'jinyunxian', '$温州-93.00$杭州-183.00'); cff[405] = new Array('慈溪', 'cixi', '$宁波-40.00$杭州-107.60'); cff[406] = new Array('奉化', 'fenghua', '$宁波-25.50$舟山-86.00$杭州-142.00'); cff[407] = new Array('宁海', 'ninghaixian', '$宁波-65.00$杭州-169.00'); cff[408] = new Array('象山', 'xiangshanxian', '$宁波-55.00$杭州-190.80'); cff[409] = new Array('余姚', 'yuyao', '$宁波-42.00$杭州-101.20'); cff[410] = new Array('上虞', 'shangyu', '$宁波-68.00$杭州-75.90'); cff[411] = new Array('新昌', 'xinchangxian', '$宁波-77.00$杭州-109.00'); cff[412] = new Array('诸暨', 'zhuji', '$义乌-48.00$杭州-58.00'); cff[413] = new Array('嵊州', 'shengzhou', '$宁波-78.00$杭州-98.60'); cff[414] = new Array('临海', 'linhai', '$温州-106.00$宁波-110.40$杭州-185.00'); cff[415] = new Array('三门', 'sanmenxian', '$洛阳-120.20'); cff[416] = new Array('天台', 'tiantaixian', '$宁波-96.00$杭州-143.70'); cff[417] = new Array('温岭', 'wenling', '$温州-77.90$杭州-246.00'); cff[418] = new Array('瑞安', 'ruian', '$温州-26.00$杭州-280.00'); cff[419] = new Array('嵊泗', 'shengsixian', '$舟山-77.50$宁波-111.00$杭州-176.00'); cff[420] = new Array('龙游', 'longyouxian', '$衢州-32.00$义乌-95.70$杭州-169.00'); cff[421] = new Array('大兴', 'daxingqu', '$齐齐哈尔-501.30$哈尔滨-717.40'); cff[422] = new Array('福鼎', 'fuding', '$福州-157.40'); cff[423] = new Array('石狮', 'shishi', '$福州-145.80'); cff[424] = new Array('夏河', 'xiahexian', '$拉萨-1865.70'); cff[425] = new Array('增城', 'zencheng', '$广州-60.90'); cff[426] = new Array('恩平', 'enping', '$广州-134.50$汕头-453.30'); cff[427] = new Array('开平', 'kaiping', '$广州-97.90$深圳-133.30'); cff[428] = new Array('台山', 'taishan', '$珠海-80.60$广州-98.60'); cff[429] = new Array('兴宁', 'xingning', '$汕头-122.60$惠州-169.40$深圳-227.50'); cff[430] = new Array('兴安', 'xinganxian', '$乌兰浩特-2.30'); cff[431] = new Array('阳朔', 'yangshuoxian', '$柳州-120.80'); cff[432] = new Array('黔西', 'qianxixian', '$贵阳-148.50'); cff[433] = new Array('凯里', 'kaili', '$贵阳-132.00$铜仁-164.50'); cff[434] = new Array('天柱', 'tianzhuxian', '$合肥-130.80'); cff[435] = new Array('滦平', 'luanpingxian', '$秦皇岛-248.60$石家庄-405.40'); cff[436] = new Array('兴隆', 'chengdexinglongxian', '$秦皇岛-216.30$石家庄-383.10'); cff[437] = new Array('三河', 'sanhe', '$北京-72.70'); cff[438] = new Array('昌黎', 'changlixian', '$秦皇岛-46.80'); cff[439] = new Array('迁安', 'qianan', '$北京-234.10'); cff[440] = new Array('巴彦', 'bayanxian', '$包头-204.00'); cff[441] = new Array('绥芬河', 'suifenhe', '$哈尔滨-476.80'); cff[442] = new Array('武穴', 'wuxue', '$武汉-146.00'); cff[443] = new Array('韶山', 'shaoshan', '$长沙-52.00'); cff[444] = new Array('凤凰', 'fenghuangxian', '$芷江-50.00$张家界-152.00'); cff[445] = new Array('婺源', 'wuyuanxian', '$景德镇-63.10$南昌-205.50'); cff[446] = new Array('海城', 'haicheng', '$沈阳-114.60'); cff[447] = new Array('乌兰', 'wulanxian', '$呼和浩特-116.50'); cff[448] = new Array('曲阜', 'qufu', '$济南-104.50'); cff[449] = new Array('胶州', 'jiaozhou', '$济南-303.40'); cff[450] = new Array('莱西', 'laixi', '$济南-353.90'); cff[451] = new Array('蓬莱', 'penglai ', '$青岛-177.50'); cff[452] = new Array('平遥', 'pingyao ', '$太原-74.30'); cff[453] = new Array('松潘', 'songpanxian', '$成都-203.80'); cff[454] = new Array('都江堰', 'dujiangyan', '$成都-56.80'); cff[455] = new Array('峨眉山', 'emeishan', '$成都-112.90'); cff[456] = new Array('阆中', 'langzhongshi', '$成都-209.70'); cff[457] = new Array('阿图什', 'atushishi', '$喀什-37.00'); cff[458] = new Array('奎屯', 'kuitunshi', '$克拉玛依-263.00$乌鲁木齐-377.00'); cff[459] = new Array('大足', 'dazu', '$重庆-72.20'); cff[460] = new Array('梁平', 'liangpingxian', '$重庆-172.90'); cff[461] = new Array('北戴河', 'beidaihequ', '$秦皇岛-16.00'); cff[462] = new Array('海南', 'hainanqu', '$西宁-108.30'); cff[463] = new Array('防城', 'fangchengqu', '$北海-79.00$南宁-119.00'); cff[464] = new Array('屯溪', 'tunxiqu', '$合肥-259.00'); cff[465] = new Array('南沙', 'guangzhounanshaqu', '$三亚-669.00'); cff[466] = new Array('从化', 'conghua', '$广州-53.30'); var flightcitys = cff;
function citytab(a) { var c = document.getElementById("cityhead").getElementsByTagName("li"); if (c) { for (var b = 0; b < c.length; b++) c[b].className = "search_li01"; if (b = document.getElementById("li" + a)) b.className = "search_li02" } if (c = document.getElementById("city_box").getElementsByTagName("div")) { for (b = 1; b < c.length; b++) c[b].className = "list_main unshow"; if (b = document.getElementById("city" + a)) b.className = "list_main" } document.getElementById("top_getiframe").style.height = document.getElementById("city_box").offsetHeight + 2 + "px"; }
String.prototype.trim=function(){return this.replace(/(^\s+)|(\s+$)/g,"")};String.prototype.format=function(){var a=arguments;return this.replace(/\{(\d+)\}/g,function(c,b){return a[b]})};function StringBuilder(){this.arr=[]}StringBuilder.prototype.append=function(a){this.arr.push(a)};StringBuilder.prototype.appendFormat=function(){for(var a=arguments[0],c=0;c
//alert(a);
var c=document.getElementById("cityall").getElementsByTagName("ul");
if(c)
{
for(var b=1;b
var city_sugg=document.getElementById("ul"+a)
if(city_sugg)
city_sugg.className="city_sugg";
}
var d=document.getElementById("firstul").getElementsByTagName("a");
if(d)
{
for(var b=0;b
d[b].className="off";}
var e =document.getElementById("a_"+a);
//alert(e.id);
if(e)
e.className="on";
}
document.getElementById("top_getiframe").style.height=document.getElementById("city_box").offsetHeight+2+"px";
};
function replaceHtml(el, html) {
var oldEl = typeof el == "string" ? document.getElementById(el) : el;
var newEl = oldEl.cloneNode(false);
newEl.innerHTML = html;
oldEl.parentNode.replaceChild(newEl, oldEl);
return newEl;
};
//应市场要求点击空白处也要填上城市值,故设定一个全局的变量,保存当前输入框的id
var global_id='';
var parentbject;
window.city_suggest = function(){
this.object = '';
this.id2 = '';
this.taskid = 0;
this.delaySec = 10; // 默认延迟多少毫秒出现提示框
this.hot= [];
this.letter = [];
this.hotelcity ={};
/**
* 初始化类库
*/
this.init_zhaobussuggest= function(){
var objBody = document.getElementsByTagName("body").item(0);
var objiFrame = document.createElement("iframe");
var objplatform = document.createElement("div");
objiFrame.setAttribute('id','top_getiframe');
objiFrame.setAttribute("src","about:blank");
objiFrame.style.zindex='100';
objiFrame.style.border='0';
objiFrame.style.position = 'absolute';
objplatform.setAttribute('id','top_getplatform');
objplatform.setAttribute('align','left');
objplatform.style.position = 'absolute';
objplatform.style.border = 'solid 1px #7f9db9';
objplatform.style.background = '#ffffff';
if(objBody){
objBody.appendChild(objiFrame);
if(objiFrame){
objiFrame.ownerDocument.body.appendChild(objplatform);
}
}
if(!document.all) {
window.document.addEventListener("click",this.hidden_suggest,false);
}else{
window.document.attachEvent("onclick",this.hidden_suggest);
}
}
/***************************************************fill_div()*********************************************/
//函数功能:动态填充div的内容,该div显示所有的提示内容
//函数参数:allplat 一个字符串数组,包含了所有可能的提示内容
this.fill_div = function(allplat){
var _html=new StringBuilder;
_html.append('
window.setTimeout(function(){
replaceHtml(el, msgplat);
document.getElementById("top_getiframe").style.width = document.getElementById("top_getplatform").clientWidth+2;
document.getElementById("top_getiframe").style.height = document.getElementById("top_getplatform").clientHeight+2;
},10);
}
/***************************************************fix_div_coordinate*********************************************/
//函数功能:控制提示div的位置,使之刚好出现在文本输入框的下面
this.fix_div_coordinate = function(){
var leftpos=0;
var toppos=0;
var aTag = this.object;
do {
aTag = aTag.offsetParent;
leftpos += aTag.offsetLeft;
toppos += aTag.offsetTop;
}while(aTag.tagName!="BODY"&&aTag.tagName!="HTML");
document.getElementById("top_getiframe").style.width = this.object.offsetWidth+50 + 'px';
if(document.layers){
document.getElementById("top_getiframe").style.left = this.object.offsetLeft + leftpos + "px";
document.getElementById("top_getiframe").style.top = this.object.offsetTop + toppos + this.object.offsetHeight + 2 + "px";
}else{
document.getElementById("top_getiframe").style.left =this.object.offsetLeft + leftpos +"px";
document.getElementById("top_getiframe").style.top = this.object.offsetTop + toppos + this.object.offsetHeight + 'px';
}
if(document.layers){
document.getElementById("top_getplatform").style.left = this.object.offsetLeft + leftpos + "px";
document.getElementById("top_getplatform").style.top = this.object.offsetTop + toppos + this.object.offsetHeight + 2 + "px";
}else{
document.getElementById("top_getplatform").style.left =this.object.offsetLeft + leftpos +"px";
document.getElementById("top_getplatform").style.top = this.object.offsetTop + toppos + this.object.offsetHeight + 'px';
}
///如果框出屏幕外,向左 245px(城市弹出框宽度-文本框宽度)
if ((this.object.offsetLeft+leftpos+370)>screen.width)
{
document.getElementById("top_getiframe").style.left = document.getElementById("top_getplatform").style.left = this.object.offsetLeft + leftpos -245 + "px";
}
}
/***************************************************hidden_suggest*********************************************/
//函数功能:隐藏提示框
this.hidden_suggest = function (event){
//alert("beingdone");
if (event.target) targ = event.target; else if (event.srcElement) targ = event.srcElement;
if(targ.tagName!='LI' && targ.tagName!='A'){
document.getElementById("top_getiframe").style.visibility = "hidden";
document.getElementById("top_getplatform").style.visibility = "hidden";
}
// //应市场要求鼠标点击空白处,也要填上城市值的处理方法
// var nodes = document.getElementById("top_getplatform").getElementsByTagName("li");
// if(nodes!=null && typeof(nodes)!='undefined'){
// for(var i=0;i
// if(nodes[i].childNodes.length>1){
// if(document.getElementById(global_id))
// {
// document.getElementById(global_id).value=nodes[i].childNodes[1].innerHTML;
// }
// }
// }
// }
// }
// else{
// document.getElementById(global_id).value='';
// }
}
this.hidden = function(){if(document.getElementById("top_getiframe")){document.getElementById("top_getiframe").style.visibility = "hidden";document.getElementById("top_getplatform").style.visibility = "hidden";}}
/***************************************************show_suggest*********************************************/
//函数功能:显示提示框
this.show_suggest = function (){
document.getElementById("top_getiframe").style.visibility = "visible";
document.getElementById("top_getplatform").style.visibility = "visible";
}
this.is_showsuggest= function (){
if(document.getElementById("top_getplatform").style.visibility == "visible") return true;else return false;
}
this.sleep = function(n){
var start=new Date().getTime(); //for opera only
while(true) if(new Date().getTime()-start>n) break;
}
this.ltrim = function (strtext){
return strtext.replace(/[\$&\|\^*%#@! ]+/, '');
}
/***************************************************add_input_text*********************************************/
//函数功能:当用户选中时填充相应的城市名字
this.add_input_text = function (keys,szm){
keys=this.ltrim(keys);
if(this.object.id=='img_showcity')
CallDPCityPage(keys);
else
{
this.object.value = keys;
var id=this.object.id;
var id2 = this.id2;
if(document.getElementById(this.id2)){
document.getElementById(this.id2).value = szm;
}
document.getElementById(id).style.color="#000000";
document.getElementById(id).value=keys;
document.getElementById("top_getiframe").style.visibility = "hidden";
document.getElementById("top_getplatform").style.visibility = "hidden";
//单击时设置自动跳到下一个输入框
if(id!=null && id=="C_SearchByPoly1_txt_orgcity")
{
if(document.getElementById("C_SearchByPoly1_txt_descity"))
{
Text_OnClick("C_SearchByPoly1_txt_descity");
}
}
}
}
this.ajaxac_getkeycode = function (e){
var code;
if (!e) var e = window.event;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
return code;
}
/***************************************************display*********************************************/
//函数功能:入口函数,将提示层div显示出来
//输入参数:object 当前输入所在的对象,如文本框
//输入参数:e IE事件对象
this.display = function (object,id2,e){
if(object)
{
object.select();
}
this.id2 = id2;
if(!document.getElementById("top_getplatform")) this.init_zhaobussuggest();
if (!e) e = window.event;
e.stopPropagation;
e.cancelBubble = true;
if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) targ = targ.parentNode;
this.object = object;
if(window.opera) this.sleep(100);//延迟0.1秒
parentbject = this;
if(this.taskid) window.clearTimeout(this.taskid);
this.taskid=setTimeout("parentbject.localtext();" , this.delaySec);
}
//函数功能:从本地js数组中获取要填充到提示层div中的文本内容
this.localtext = function(){
var id=this.object.id;
parentbject.show_suggest();
parentbject.fill_div('');
parentbject.fix_div_coordinate();
}
};
var letterH=['A','B','C','D','E','F','G','H','J','K','L','M','N','P','Q','R','S','T','U','W','X','Y','Z'];
var hotH=['北京','上海','广州','深圳','杭州','南京','成都','武汉','青岛','大连','苏州','三亚','厦门','海口','西安','长沙','昆明','沈阳','香港','澳门'];
var citysH={A:['阿坝','阿克苏','阿拉尔','阿拉善盟','阿里','定安县','安康','安庆','鞍山','安顺','安阳'],B:['白城','百色','白沙','白山','白银','保定','宝鸡','保山','保亭','包头','巴彦淖尔市','巴音郭楞','巴中','北海','北京','蚌埠','本溪','毕节','滨州','博尔塔拉','亳州'],C:['沧州','长白山','长春','常德','昌都','昌吉','昌江','长沙','长治','常州','巢湖','朝阳','潮州','承德','成都','澄迈县','郴州','赤峰','池州','重庆','楚雄','滁州','崇左'],D:['大理','大连','丹东','儋州','大庆','大同','大兴安岭','达州','德宏','德阳','德州','定西','迪庆','东方','东莞','东营'],E:['鄂尔多斯','恩施','鄂州'],F:['防城港','佛山','抚顺','阜新','阜阳','福州','抚州'],G:['甘南','赣州','甘孜','广安','广元','广州','贵港','桂林','贵阳','果洛','固原'],H:['海北','海东','海口','海南藏族','海西','哈密','邯郸','杭州','汉中','哈尔滨','鹤壁','河池','合肥','鹤岗','黑河','衡水','衡阳','和田','河源','菏泽','贺州','香港','红河','洪湖市','淮安','淮北','怀化','淮南','花莲','黄冈','黄南','黄山','黄石','呼和浩特','惠州','葫芦岛','呼伦贝尔','湖州'],J:['佳木斯','吉安','江门','焦作','嘉兴','嘉峪关','揭阳','吉林','基隆','济南','金昌','晋城','景德镇','荆门','荆州','金华','济宁','晋中','锦州','九江','酒泉','鸡西','济源'],K:['开封','喀什','克拉玛依','克孜勒苏柯尔克孜','昆明'],L:['来宾','莱芜','廊坊','兰州','拉萨','乐东','乐山','凉山','连云港','聊城','辽阳','辽源','丽江','临沧','临汾','临高县','陵水','临夏','临沂','林芝','丽水','六安','六盘水','柳州','陇南','龙岩','娄底','漯河','洛阳','泸州','吕梁'],M:['马鞍山','茂名','眉山','梅州','绵阳','牡丹江'],N:['南昌','南充','南京','南宁','南平','南通','南阳','那曲','内江','宁波','宁德','怒江'],P:['盘锦','攀枝花','平顶山','平凉','萍乡','普洱','莆田','濮阳'],Q:['黔东南','潜江','黔南','黔西南','青岛','庆阳','清远','秦皇岛','钦州','琼海','琼中','齐齐哈尔','七台河','泉州','曲靖','衢州'],R:['日喀则','日照'],S:['三门峡','三明','三亚','上海','商洛','商丘','上饶','山南','汕头','汕尾','韶关','绍兴','邵阳','神农架林区','沈阳','深圳','石家庄','石河子','十堰','石嘴山','双鸭山','绥化','遂宁','朔州','四平','松原','随州','宿迁','苏州','宿州'],T:['泰安','台东','台南','台北','太原','台州','泰州','唐山','天津','天门','天水','铁岭','铜川','通化','通辽','铜陵','铜仁','吐鲁番','图木舒克','屯昌县'],W:['万宁','潍坊','威海','渭南','文昌','文山','温州','乌海','武汉','芜湖','五家渠','乌兰察布市','乌鲁木齐','乌苏里江','武威','无锡','五指山','吴忠','梧州'],X:['厦门','西安','襄樊','湘潭','湘西','咸宁','仙桃','咸阳','孝感','锡林郭勒盟','兴安盟','兴城','邢台','西宁','新乡','信阳','新余','忻州','西双版纳','宣城','许昌','徐州'],Y:['雅安','延安','延边','盐城','阳江','阳泉','扬州','烟台','宜宾','宜昌','宜春','伊春','伊犁','银川','营口','鹰潭','益阳','永州','岳阳','玉林','榆林','运城','云浮','玉树','玉溪'],Z:['枣庄','张家界','张家口','张掖','漳州','湛江','肇庆','昭通','郑州','镇江','中山','周口','舟山','珠海','驻马店','株洲','淄博','自贡','资阳','遵义','中卫']};
var suggestH = new city_suggest();suggestH.letter = letterH;suggestH.hot = hotH;suggestH.hotelcity = citysH;
var letterF=['A','B','C','D','E','F','G','H','J','K','L','M','N','P','Q','S','T','W','X','Y','Z'];
var hotF=["北京","北京首都","北京南苑","上海","上海虹桥","上海浦东","深圳","杭州","广州","成都","南京","武汉","呼和浩特","重庆","长沙","昆明","西安","青岛","天津","宁波","厦门","太原","大连","济南"];
var citysF = { A: ['阿克苏', '阿勒泰', '安康', '安庆', '安顺', '鞍山'], B: ['百色', '蚌埠', '包头', '保山', '北海', '北京首都', '北京南苑'], C: ['昌都', '长春', '长海', '长沙', '长治', '常德', '常州', '朝阳', '成都', '赤峰', '重庆'], D: ['达县', '大理', '大连', '大庆', '大同', '丹东', '德宏', '迪庆', '东营', '敦煌'], E: ['鄂尔多斯', '恩施'], F: ['佛山', '福州', '阜阳', '富蕴'], G: ['赣州', '固原', '格尔木', '光化', '广汉', '广州', '贵阳', '桂林'], H: ['哈尔滨', '哈密', '海口', '海拉尔', '邯郸', '汉中', '杭州', '合肥', '和田', '黑河', '衡阳', '呼和浩特', '怀化', '淮安', '黄山', '黄岩', '徽州'], J: ['吉安', '吉林', '济南', '济宁', '佳木斯', '嘉峪关', '锦州', '晋江', '井冈山', '景德镇', '景洪', '九江', '九寨沟', '酒泉'], K: ['喀纳斯', '喀什', '克拉玛依', '库车', '库尔勒', '昆明'], L: ['拉萨', '兰州', '黎平', '丽江', '连城', '连云港', '梁平', '林西', '林芝', '临沧', '临沂', '柳州', '龙岩', '庐山', '泸州', '路桥', '洛阳'], M: ['满洲里', '芒市', '梅县', '绵阳', '漠河', '牡丹江'], N: ['那拉提', '南昌', '南充', '南京', '南宁', '南通', '南阳', '宁波'], P: ['攀枝花', '普洱'], Q: ['齐齐哈尔', '且末', '秦皇岛', '青岛', '庆阳', '衢州', '泉州'], S: ['三亚', '沙市', '汕头', '鄯善', '上海虹桥', '上海浦东', '深圳', '沈阳', '石家庄', '思茅'], T: ['塔城', '台州', '太原', '唐山', '天津', '通化', '通辽', '铜仁'], W: ['万州', '威海', '潍坊', '温州', '文山', '乌海', '无锡', '梧州', '武汉', '武夷山', '乌兰浩特', '乌鲁木齐'], X: ['西安', '西昌', '西宁', '西双版纳', '锡林浩特', '厦门', '香格里拉', '襄樊', '兴城', '兴宁', '兴义', '邢台', '徐州'], Y: ['烟台', '延安', '延吉', '盐城', '伊宁', '宜宾', '宜昌', '义乌', '银川', '永州零陵', '榆林', '元谋', '运城'], Z: ['湛江', '张家界', '昭通', '郑州', '芷江', '中甸', '舟山', '珠海', '遵义', '中卫'] };
var suggestF = new city_suggest();suggestF.letter = letterF;suggestF.hot = hotF;suggestF.hotelcity = citysF;
//兼容的onclick
function Text_OnClick(id)
{
var ie=navigator.appName=="Microsoft Internet Explorer" ? true : false;
if(ie)
{
document.getElementById(id).click();
}
else
{
var a=document.createEvent('MouseEvents');
a.initEvent('click', true, true);
document.getElementById(id).dispatchEvent(a);
}
}
var item_parentbject;
window.item_city_suggest = function(){
this.item_Remoreurl = ''; // 远程URL地址
this.item_object = '';
this.item_id2 = '';
this.item_taskid = 0;
this.item_delaySec = 100; // 默认延迟多少毫秒出现提示框
this.item_lastkeys_val = 0;
this.item_lastinputstr = '';
this.item_citys = new Array();
/**
*赋值城市数组
*/
this.item_setArr_Citys = function(citys){
this.item_citys = citys;
}
/**
* 初始化类库
*/
this.item_init_zhaobussuggest= function(){
var objBody = document.getElementsByTagName("body").item(0);
var objiFrame = document.createElement("iframe");
var objplatform = document.createElement("div");
objiFrame.setAttribute('id','top_getiframe');
objiFrame.style.zindex='100';
objiFrame.style.border='0';
objiFrame.style.position = 'absolute';
objplatform.setAttribute('id','top_getplatform');
objplatform.setAttribute('align','left');
objplatform.style.position = 'absolute';
objplatform.style.border = 'solid 1px #7f9db9';
objplatform.style.background = '#ffffff';
objplatform.style.padding = '0px 3px 3px 3px';
objBody.appendChild(objiFrame);
objiFrame.ownerDocument.body.appendChild(objplatform);
if(!document.all) {
window.document.addEventListener("click",this.item_hidden_suggest,false);
}else{
window.document.attachEvent("onclick",this.item_hidden_suggest);
}
}
/**********************************************getPinYinByCity()*******************************************/
//
this.item_getPinYinByCity = function(cityName){
var pinYin = "";
for(var i = 0,len = this.item_citys.length;i
pinYin = this.item_citys[i][1];
break;
}
}
return pinYin;
}
/***************************************************fill_div()*********************************************/
//函数功能:动态填充div的内容,该div显示所有的提示内容
//函数参数:allplat 一个字符串数组,包含了所有可能的提示内容
this.item_fill_div = function(allplat){
var msgplat = '';
var all = '';
var spell = '';
var chinese = '';
var platkeys = this.item_object.value;
platkeys=this.ltrim(platkeys);
if(!platkeys){
msgplat += '
for(i=0;i
spell=all[0];
chinese=all[1];
szm=all[2];
//用于机票-城市附近机场
if(szm != null && szm != "" && szm.indexOf("$") > -1){
msgplat += '
'
var arr_szm = szm.split("$");//城市附近有机场城市
if(arr_szm.length>0){
msgplat += '
';
for(var j=1; j
+ '
+ '
+ '
}
}
}
else{
msgplat += '
'
}
}
}
else {
if(allplat.length < 1 || !allplat[0]){
msgplat += '
}
else{
if(allplat.length == 1){
msgplat += '
}
else{
msgplat += '
}
for(i=0;i
spell=all[0];
var firstchar = spell.substring(0,1);
spell = firstchar.toUpperCase() + spell.substring(1,spell.length);
chinese=all[1];
szm=all[2];
//用于机票-城市附近机场
if(szm != null && szm != "" && szm.indexOf("$") > -1){
msgplat += '
'
var arr_szm = szm.split("$");//城市附近有机场城市
if(arr_szm.length>0){
msgplat += '
';
for(var j=1; j
+ '
+ '
+ '
}
}
}
else{
msgplat += '
var nodes = document.getElementById("top_getplatform").childNodes;//列表外框
nodes_li[i].onmouseout = function(){
if(item_parentbject.lastkeys_val==(item_parentIndexOf(this)-1)){this.className = "ds_selected";}
else{this.className = "top_mout";}
}
}
document.getElementById("top_getiframe").style.width = document.getElementById("top_getplatform").clientWidth+2;
document.getElementById("top_getiframe").style.height = document.getElementById("top_getplatform").clientHeight+2;
}
/***************************************************fix_div_coordinate*********************************************/
//函数功能:控制提示div的位置,使之刚好出现在文本输入框的下面
this.item_fix_div_coordinate = function(){
var leftpos=0;
var toppos=0;
/*
aTag = this.item_object;
do {
aTag = aTag.offsetParent;
leftpos += aTag.offsetLeft;
toppos += aTag.offsetTop;
}while(aTag.tagName!="BODY");
*/
//linden.guo modify at 2009-04-23 11:35
var aTag = this.item_object;
do {
aTag = aTag.offsetParent;
leftpos += aTag.offsetLeft;
toppos += aTag.offsetTop;
}while(aTag.tagName!="BODY"&&aTag.tagName!="HTML");
document.getElementById("top_getiframe").style.width = '175px';
if(document.layers){
document.getElementById("top_getiframe").style.left = this.item_object.offsetLeft + leftpos + "px";
document.getElementById("top_getiframe").style.top = this.item_object.offsetTop + toppos + this.item_object.offsetHeight + 2 + "px";
}else{
document.getElementById("top_getiframe").style.left =this.item_object.offsetLeft + leftpos +"px";
document.getElementById("top_getiframe").style.top = this.item_object.offsetTop + toppos + this.item_object.offsetHeight + 'px';
}
if(document.layers){
document.getElementById("top_getplatform").style.left = this.item_object.offsetLeft + leftpos + "px";
document.getElementById("top_getplatform").style.top = this.item_object.offsetTop + toppos + this.item_object.offsetHeight + 2 + "px";
}else{
document.getElementById("top_getplatform").style.left =this.item_object.offsetLeft + leftpos +"px";
document.getElementById("top_getplatform").style.top = this.item_object.offsetTop + toppos + this.item_object.offsetHeight + 'px';
}
}
/***************************************************hidden_suggest*********************************************/
//函数功能:隐藏提示框
this.item_hidden_suggest = function (){
//this.item_lastkeys_val = 0;
//当this.item_lastkeys_val有值时,不清零
if(this.item_lastkeys_val == null || this.item_lastkeys_val < 0){
this.item_lastkeys_val = 0;
}
document.getElementById("top_getiframe").style.visibility = "hidden";
document.getElementById("top_getplatform").style.visibility = "hidden";
}
this.item_οnblur=function(object){
//应市场要求鼠标点击空白处,也要填上城市值的处理方法
var nodes = document.getElementById("top_getplatform").getElementsByTagName("li");
if(nodes!=null && typeof(nodes)!='undefined'){
for(var i=0;i
if(nodes[i].childNodes.length>1){
if(object)
{
object.value=nodes[i].childNodes[1].innerHTML;
}
}
}
}
}
else{
object.value='';
}
}
/***************************************************show_suggest*********************************************/
//函数功能:显示提示框
this.item_show_suggest = function (){
document.getElementById("top_getiframe").style.visibility = "visible";
document.getElementById("top_getplatform").style.visibility = "visible";
}
this.is_showsuggest= function (){
if(document.getElementById("top_getplatform").style.visibility == "visible") return true;else return false;
}
this.sleep = function(n){
var start=new Date().getTime(); //for opera only
while(true) if(new Date().getTime()-start>n) break;
}
this.ltrim = function (strtext){
return strtext.replace(/[\$&\|\^*%#@! ]+/, '');
}
/***************************************************add_input_text*********************************************/
//函数功能:当用户选中时填充相应的城市名字
this.item_add_input_text = function (keys,szm){
keys=this.ltrim(keys)
this.item_object.value = keys;
var id=this.item_object.id;
var id2 = this.item_id2;
if(document.id2){
document.getElementById(this.item_id2).value = szm;
}
document.getElementById(id).style.color="#000000";
document.getElementById(id).value=keys;
//输入时设置自动跳到下一个输入框
if(id!=null && id=="C_SearchByPoly1_txt_orgcity")
{
if(document.getElementById("C_SearchByPoly1_txt_descity"))
{
Text_OnClick("C_SearchByPoly1_txt_descity");
}
}
}
/***************************************************keys_handleup*********************************************/
//函数功能:用于处理当用户用向上的方向键选择内容时的事件
this.item_keys_handleup = function (){
if(this.item_lastkeys_val > 0) this.item_lastkeys_val--;
var nodes = document.getElementById("top_getplatform").getElementsByTagName("li");
if(this.item_lastkeys_val < 0) this.item_lastkeys_val = nodes.length-1;
var b = 0;
for(var i=0;i
nodes[i].className = "ds_selected";
if(nodes[i].childNodes.length>1){
this.item_add_input_text(nodes[i].childNodes[1].innerHTML);
}
}else{
nodes[i].className = "top_mout";
}
b++;
}
}
/***************************************************keys_handledown*********************************************/
//函数功能:用于处理当用户用向下的方向键选择内容时的事件
this.item_keys_handledown = function (){
this.item_lastkeys_val++;
var nodes = document.getElementById("top_getplatform").getElementsByTagName("li");
if(this.item_lastkeys_val >= nodes.length) {
this.item_lastkeys_val--;
return;
}
var b = 0;
for(var i=0;i
nodes[i].className = "ds_selected";
if(nodes[i].childNodes.length>1){
this.item_add_input_text(nodes[i].childNodes[1].innerHTML);
}
}else{
nodes[i].className = "top_mout";
}
b++;
}
}
this.item_ajaxac_getkeycode = function (e)
{
var code;
if (!e) var e = window.event;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
return code;
}
/***************************************************keys_enter*********************************************/
//函数功能:用于处理当用户回车键选择内容时的事件
this.item_keys_enter = function (){
var nodes = document.getElementById("top_getplatform").getElementsByTagName("li");
for(var i=0;i
if(nodes[i].childNodes.length>1){
this.item_add_input_text(nodes[i].childNodes[1].innerHTML);
}
}
}
this.item_hidden_suggest();
}
/***************************************************display*********************************************/
//函数功能:入口函数,将提示层div显示出来
//输入参数:object 当前输入所在的对象,如文本框
//输入参数:e IE事件对象
this.item_display = function (object,id2,e,citys){
//this.item_setArr_Citys(citys);
/*第二次触发城市控件,默认全选。*/
var content = object.value;
global_id=object.id;
var flag = this.item_getPinYinByCity(content)
if(flag!="")
{
object.focus();
object.select();
}
this.item_id2 = id2;
if(!document.getElementById("top_getplatform")) this.item_init_zhaobussuggest();
if (!e) e = window.event;
e.stopPropagation;
e.cancelBubble = true;
if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) targ = targ.parentNode;
var inputkeys = this.item_ajaxac_getkeycode(e);
switch(inputkeys){
case 38: //向上方向键
this.item_keys_handleup(object.id);
return;break;
case 40: //向下方向键
if(this.is_showsuggest()) this.item_keys_handledown(object.id); else this.item_show_suggest();
return;break;
case 39: //向右方向键
return;break;
case 37: //向左方向键
return;break;
case 13: //对应回车键
this.item_keys_enter();
return;break;
case 18: //对应Alt键
this.item_hidden_suggest();
return;break;
case 27: //对应Esc键
this.item_hidden_suggest();
return;break;
}
this.item_object = object;
if(window.opera) this.sleep(100);//延迟0.1秒
item_parentbject = this;
if(this.item_taskid) window.clearTimeout(this.item_taskid);
this.item_taskid=setTimeout("item_parentbject.item_localtext();" , this.item_delaySec)
}
//函数功能:从本地js数组中获取要填充到提示层div中的文本内容
this.item_localtext = function(){
var id=this.item_object.id;
var suggestions="";
suggestions=this.item_getSuggestionByName();
if(suggestions==""){
item_parentbject.item_show_suggest();
item_parentbject.item_fill_div("");
item_parentbject.item_fix_div_coordinate();
}
else{
suggestions=suggestions.substring(0,suggestions.length-1);
item_parentbject.item_show_suggest();
item_parentbject.item_fill_div(suggestions.split(';'));
item_parentbject.item_fix_div_coordinate();
}
}
/***************************************************getSuggestionByName*********************************************/
//函数功能:从本地js数组中获取要填充到提示层div中的城市名字
this.item_getSuggestionByName = function(){
platkeys = this.item_object.value;
var str="";
platkeys=this.ltrim(platkeys);
if(!platkeys){
return str;
}
else{
platkeys=platkeys.toUpperCase();
for(i=0;i
this.item_getLeftStr(this.item_citys[i][1],platkeys.length).toUpperCase()==platkeys||
this.item_getLeftStr(this.item_citys[i][2],platkeys.length).toUpperCase()==platkeys)
str+=this.item_citys[i][1]+","+this.item_citys[i][0]+","+this.item_citys[i][2]+";";
}
return str;
}
}
/***************************************************getLeftStr************* *************************************/
//函数功能:得到左边的字符串
this.item_getLeftStr = function(str,len){
if(isNaN(len)||len==null){
len = str.length;
}
else{
if(parseInt(len)<0||parseInt(len)>str.length){
len = str.length;
}
}
return str.substr(0,len);
}
/***************************************************parentIndexOf************* *************************************/
//函数功能:得到子结点在父结点的位置
function item_parentIndexOf(node){
for (var i=0; i
}
}
}
//首先自动加载城市
var item_suggest = new item_city_suggest();
item_suggest.item_citys = flightcitys;
function CallDPCityPage(orgcityname)
{
var _url = '/flight/ajaxcn.ashx?type=GetCityIdByName&orgcityname='+escape(orgcityname);
AjaxFuncion(_url, callcitypage);
}
function callcitypage(response)
{
if (response!='') {
if (response == "City is Null") {
alert('当前航班数据为空');
return false;
}
else
document.location.href='/FlightCommentCity-'+ response +'-1.html';
}
}