function filter(el) {
    var j = 0;
    var strHTML = " ";
    var v_foundarray =  new Array();
    var v_array = new Array()
			v_array[0] = "10 Mile Lake";
			v_array[1] = "100 Mile House";
			v_array[2] = "108 Mile Ranch";
			v_array[3] = "140 Mile House";
			v_array[4] = "150 Mile House";
			v_array[5] = "70 Mile House";
			v_array[6] = "Abbotsford";
			v_array[7] = "Adams Lake";
			v_array[8] = "Agassiz";
			v_array[9] = "Ainsworth";
			v_array[10] = "Akisqnuk First Nation";
			v_array[11] = "Albion";
			v_array[12] = "Aldergrove";
			v_array[13] = "Alert Bay";
			v_array[14] = "Alexandria";
			v_array[15] = "Alexis Creek";
			v_array[16] = "Alkali Lake";
			v_array[17] = "Alliford Bay";
			v_array[18] = "Ambleside";
			v_array[19] = "Anaham Reserve";
			v_array[20] = "Anahim Lake";
			v_array[21] = "Anglemont";
			v_array[22] = "Anmore";
			v_array[23] = "Apex Mountain";
			v_array[24] = "Arbutus Ridge";
			v_array[25] = "Ardmore";
			v_array[26] = "Argenta";
			v_array[27] = "Armstrong";
			v_array[28] = "Ashcroft";
			v_array[29] = "Athalmer";
			v_array[30] = "Atnarko";
			v_array[31] = "Avola";
			v_array[32] = "Babine";
			v_array[33] = "Balfour";
			v_array[34] = "Bamfield";
			v_array[35] = "Barkerville";
			v_array[36] = "Barkley Sound";
			v_array[37] = "Barlow Creek";
			v_array[38] = "Barriere";
			v_array[39] = "Beaton";
			v_array[40] = "Beaver Creek";
			v_array[41] = "Beaver Valley";
			v_array[42] = "Beaverdell";
			v_array[43] = "Beaverly";
			v_array[44] = "Belcarra";
			v_array[45] = "Bella Bella";
			v_array[46] = "Bella Coola";
			v_array[47] = "Berkey's Corner";
			v_array[48] = "Big Creek";
			v_array[49] = "Big Lake";
			v_array[50] = "Big White";
			v_array[51] = "Birch Island";
			v_array[52] = "Black Creek";
			v_array[53] = "Blackpool";
			v_array[54] = "Blind Bay";
			v_array[55] = "Blue River";
			v_array[56] = "Blueridge";
			v_array[57] = "Boothroyd";
			v_array[58] = "Boston Bar";
			v_array[59] = "Bouchie Lake";
			v_array[60] = "Bowen Island";
			v_array[61] = "Bowser";
			v_array[62] = "Bradner";
			v_array[63] = "Brentwood Bay";
			v_array[64] = "Bridal Falls";
			v_array[65] = "Bridge Lake";
			v_array[66] = "Brisco";
			v_array[67] = "British Properties";
			v_array[68] = "Brookmere";
			v_array[69] = "Brookswood";
			v_array[70] = "Broughton Archipelago";
			v_array[71] = "Buckley Bay";
			v_array[72] = "Burnaby";
			v_array[73] = "Burns Lake";
			v_array[74] = "Burnside";
			v_array[75] = "Burton";
			v_array[76] = "Cache Creek";
			v_array[77] = "Campbell Heights";
			v_array[78] = "Campbell River";
			v_array[79] = "Canal Flats";
			v_array[80] = "Canoe";
			v_array[81] = "Capilano";
			v_array[82] = "Carr's Landing";
			v_array[83] = "Cassidy";
			v_array[84] = "Castlegar";
			v_array[85] = "Caulfield";
			v_array[86] = "Cawston";
			v_array[87] = "Caycuse";
			v_array[88] = "Cedar";
			v_array[89] = "Cedarvale";
			v_array[90] = "Celista";
			v_array[91] = "Central Saanich";
			v_array[92] = "Chase";
			v_array[93] = "Chase River";
			v_array[94] = "Chawathil";
			v_array[95] = "Chemainus";
			v_array[96] = "Cherry Creek";
			v_array[97] = "Cherryville";
			v_array[98] = "Cheslatta";
			v_array[99] = "Chezacut";
			v_array[100] = "Chilanko Forks";
			v_array[101] = "Chilliwack";
			v_array[102] = "Chimney Lake";
			v_array[103] = "Chinook Cove";
			v_array[104] = "Christina Lake";
			v_array[105] = "Clayburn Village";
			v_array[106] = "Clayoquot Sound";
			v_array[107] = "Clearbrook";
			v_array[108] = "Clearwater- Gray";
			v_array[109] = "Clinton";
			v_array[110] = "Cloverdale";
			v_array[111] = "Coal Harbour";
			v_array[112] = "Cobble Hill";
			v_array[113] = "Coldstream";
			v_array[114] = "Colleymount";
			v_array[115] = "Columbia Ridge";
			v_array[116] = "Columbia Valley";
			v_array[117] = "Columere Park";
			v_array[118] = "Colwood";
			v_array[119] = "Comox";
			v_array[120] = "Comox Valley";
			v_array[121] = "Coombs";
			v_array[122] = "Coquitlam";
			v_array[123] = "Cortes Island";
			v_array[124] = "Cottonwood";
			v_array[125] = "Courtenay";
			v_array[126] = "Cowichan Bay";
			v_array[127] = "Cowichan Station";
			v_array[128] = "Cracroft Island";
			v_array[129] = "Cranbrook";
			v_array[130] = "Crawford Bay";
			v_array[131] = "Crescent Beach";
			v_array[132] = "Crescent Valley";
			v_array[133] = "Crofton";
			v_array[134] = "Crystal Mountain";
			v_array[135] = "Cultus Lake";
			v_array[136] = "Cumberland";
			v_array[137] = "Darfield";
			v_array[138] = "Dashwood";
			v_array[139] = "Dawson Landing";
			v_array[140] = "Dease Lake";
			v_array[141] = "Deep Bay";
			v_array[142] = "Deep Cove";
			v_array[143] = "Delbrook";
			v_array[144] = "Delta";
			v_array[145] = "Delta";
			v_array[146] = "Denman Island";
			v_array[147] = "Dent Island";
			v_array[148] = "Deroche";
			v_array[149] = "Desolation Sound";
			v_array[150] = "Dewdney";
			v_array[151] = "Dewdney";
			v_array[152] = "Discovery Islands";
			v_array[153] = "District of Kent";
			v_array[154] = "Dog Creek";
			v_array[155] = "Dogwood Valley";
			v_array[156] = "Donald";
			v_array[157] = "Douglas Lake";
			v_array[158] = "Duncan";
			v_array[159] = "Dundarave";
			v_array[160] = "Dunster";
			v_array[161] = "Eagle Bay";
			v_array[162] = "Eagle Lake";
			v_array[163] = "East Sooke";
			v_array[164] = "Echo Bay";
			v_array[165] = "Edgemont Village";
			v_array[166] = "Edgewater";
			v_array[167] = "Elkford";
			v_array[168] = "Ellison";
			v_array[169] = "Emerald Lake";
			v_array[170] = "Enderby";
			v_array[171] = "Errington";
			v_array[172] = "Esket";
			v_array[173] = "Esquimalt";
			v_array[174] = "Exlou";
			v_array[175] = "Extension";
			v_array[176] = "Fairfield";
			v_array[177] = "Fairmont Hot Springs";
			v_array[178] = "Falkland";
			v_array[179] = "Fanny Bay";
			v_array[180] = "Faulder";
			v_array[181] = "Felker Lake";
			v_array[182] = "Fernie";
			v_array[183] = "Fernridge";
			v_array[184] = "Fernwood";
			v_array[185] = "Field";
			v_array[186] = "Fintry";
			v_array[187] = "Firvale";
			v_array[188] = "Fletcher Lake";
			v_array[189] = "Flood";
			v_array[190] = "Forest Grove";
			v_array[191] = "Fort Langley";
			v_array[192] = "Fort Rupert";
			v_array[193] = "Fort St James";
			v_array[194] = "Francois Lake";
			v_array[195] = "Fraser Lake";
			v_array[196] = "Fraser Valley";
			v_array[197] = "Fraser Valley";
			v_array[198] = "French Creek";
			v_array[199] = "Fruitvale";
			v_array[200] = "Gabriola Island";
			v_array[201] = "Galena";
			v_array[202] = "Galiano Island";
			v_array[203] = "Gambier Island";
			v_array[204] = "Gang Ranch";
			v_array[205] = "Genelle";
			v_array[206] = "Gilford Landing";
			v_array[207] = "Gitsegukla";
			v_array[208] = "Glen Valley";
			v_array[209] = "Glen Vowell";
			v_array[210] = "Glenn Mountain";
			v_array[211] = "Glenora";
			v_array[212] = "Gold River";
			v_array[213] = "Golden";
			v_array[214] = "Gonzales";
			v_array[215] = "Grand Forks";
			v_array[216] = "Grandview Heights";
			v_array[217] = "Granisle";
			v_array[218] = "Grassy Plains";
			v_array[219] = "Greendale";
			v_array[220] = "Grindrod";
			v_array[221] = "Hagensborg";
			v_array[222] = "Haida Gwaii";
			v_array[223] = "Hammond";
			v_array[224] = "Hanceville";
			v_array[225] = "Haney";
			v_array[226] = "Harper Mountain";
			v_array[227] = "Harrison Hot Springs";
			v_array[228] = "Harrison Mills";
			v_array[229] = "Harrogate";
			v_array[230] = "Hartley Bay";
			v_array[231] = "Hatzic";
			v_array[232] = "Hayward Lake";
			v_array[233] = "Hazelmere Valley";
			v_array[234] = "Hazelton";
			v_array[235] = "Hedley";
			v_array[236] = "Heffley Creek";
			v_array[237] = "Heriot Bay";
			v_array[238] = "Highlands";
			v_array[239] = "Hilliers";
			v_array[240] = "Hills";
			v_array[241] = "Hixon";
			v_array[242] = "Hixon";
			v_array[243] = "Honeymoon Bay";
			v_array[244] = "Hope";
			v_array[245] = "Hornby Island";
			v_array[246] = "Horsefly";
			v_array[247] = "Horseshoe Bay";
			v_array[248] = "Hot Springs Cove";
			v_array[249] = "Houston";
			v_array[250] = "Hungry Hill";
			v_array[251] = "Huntingdon";
			v_array[252] = "Invermere - Windermere";
			v_array[253] = "James Bay";
			v_array[254] = "James Island";
			v_array[255] = "Joe Rich";
			v_array[256] = "Johnstone Strait";
			v_array[257] = "Jordan River";
			v_array[258] = "Juskatia";
			v_array[259] = "Kaleden";
			v_array[260] = "Kamloops";
			v_array[261] = "Kaslo";
			v_array[262] = "Keating";
			v_array[263] = "Kelowna";
			v_array[264] = "Kelsey Bay";
			v_array[265] = "Kemano";
			v_array[266] = "Keremeos";
			v_array[267] = "Kersley";
			v_array[268] = "Kimberley";
			v_array[269] = "Kingcome Inlet";
			v_array[270] = "Kispiox";
			v_array[271] = "Kitimat";
			v_array[272] = "Kitimat Village";
			v_array[273] = "Kitkatia";
			v_array[274] = "Kitseguecla";
			v_array[275] = "Kitwanga";
			v_array[276] = "Kleena Kleene";
			v_array[277] = "Klemtu";
			v_array[278] = "Knight Inlet";
			v_array[279] = "Koksilah";
			v_array[280] = "Kuper Island";
			v_array[281] = "Kyuquot";
			v_array[282] = "Lac la Hache";
			v_array[283] = "Ladner";
			v_array[284] = "Ladysmith";
			v_array[285] = "Laidlaw";
			v_array[286] = "Lake Country";
			v_array[287] = "Lake Cowichan";
			v_array[288] = "Lake Errock";
			v_array[289] = "Lampson";
			v_array[290] = "Lands End";
			v_array[291] = "Langara Island";
			v_array[292] = "Langford";
			v_array[293] = "Langley";
			v_array[294] = "Lantzville";
			v_array[295] = "Larch Hills";
			v_array[296] = "Lasqueti Island";
			v_array[297] = "Lavington";
			v_array[298] = "Lax Kwalaams";
			v_array[299] = "Lazo";
			v_array[300] = "Lees Corner";
			v_array[301] = "Likely";
			v_array[302] = "Lillooet";
			v_array[303] = "Lindell Beach";
			v_array[304] = "Lister";
			v_array[305] = "Little Fort";
			v_array[306] = "Logan Lake";
			v_array[307] = "Lone Butte";
			v_array[308] = "Lonsdale";
			v_array[309] = "Louis Creek";
			v_array[310] = "Lower Nicola";
			v_array[311] = "Lumby";
			v_array[312] = "Lynn Valley";
			v_array[313] = "Lytton";
			v_array[314] = "Macalister";
			v_array[315] = "Mackin Creek";
			v_array[316] = "Magna Bay";
			v_array[317] = "Malahat";
			v_array[318] = "Malakwa";
			v_array[319] = "Malcolm Island";
			v_array[320] = "Manning Park";
			v_array[321] = "Maple Bay";
			v_array[322] = "Maple Ridge";
			v_array[323] = "Mara";
			v_array[324] = "Marguerite";
			v_array[325] = "Masset";
			v_array[326] = "Matsqui";
			v_array[327] = "Matsqui Prairie";
			v_array[328] = "Maurelle Island";
			v_array[329] = "McConnell Creek";
			v_array[330] = "McLeese Lake";
			v_array[331] = "McLure";
			v_array[332] = "Meares Island";
			v_array[333] = "Meldrum Creek";
			v_array[334] = "Merritt";
			v_array[335] = "Merville";
			v_array[336] = "Mesachie Lake";
			v_array[337] = "Metchosin";
			v_array[338] = "Meziadin Lake";
			v_array[339] = "Mica Creek";
			v_array[340] = "Mill Bay";
			v_array[341] = "Miocene";
			v_array[342] = "Mission";
			v_array[343] = "Monte Creek";
			v_array[344] = "Monte Lake";
			v_array[345] = "Montrose";
			v_array[346] = "Moresby Camp";
			v_array[347] = "Moresby Island";
			v_array[348] = "Morgan Creek";
			v_array[349] = "Moricetown";
			v_array[350] = "Mr. Washington";
			v_array[351] = "Mt. Lehman";
			v_array[352] = "Nahatlatch";
			v_array[353] = "Nakusp";
			v_array[354] = "Nanaimo";
			v_array[355] = "Nanoose Bay";
			v_array[356] = "Naramata";
			v_array[357] = "Narcosli";
			v_array[358] = "Nass Valley";
			v_array[359] = "Nelson";
			v_array[360] = "Nemiah";
			v_array[361] = "New Aiyansh";
			v_array[362] = "New Denver";
			v_array[363] = "New Hazelton";
			v_array[364] = "New Westminster";
			v_array[365] = "Newcastle Island";
			v_array[366] = "Newton";
			v_array[367] = "Nicholson";
			v_array[368] = "Nicola Lake";
			v_array[369] = "Nicomen Island";
			v_array[370] = "Nimmo Bay";
			v_array[371] = "Nimpo Lake";
			v_array[372] = "Nootka Sound";
			v_array[373] = "North Bend";
			v_array[374] = "North Cowichan";
			v_array[375] = "North Fraser";
			v_array[376] = "North Oyster";
			v_array[377] = "North Saanich";
			v_array[378] = "North Vancouver";
			v_array[379] = "North Westside";
			v_array[380] = "Notch Hill";
			v_array[381] = "Nuxalk First Nation";
			v_array[382] = "Oak Bay";
			v_array[383] = "Ocean Park";
			v_array[384] = "Oceanside Region";
			v_array[385] = "Ochiltree";
			v_array[386] = "Okanagan Centre";
			v_array[387] = "Okanagan Falls";
			v_array[388] = "Okanagan Lake";
			v_array[389] = "Olalla";
			v_array[390] = "Old Town Bay";
			v_array[391] = "Oliver";
			v_array[392] = "Oona River";
			v_array[393] = "Osoyoos";
			v_array[394] = "Othello";
			v_array[395] = "Otter Point";
			v_array[396] = "Oyama";
			v_array[397] = "Oyster River";
			v_array[398] = "Paldi";
			v_array[399] = "Palling";
			v_array[400] = "Panorama";
			v_array[401] = "Panorama Mountain Village";
			v_array[402] = "Parksville";
			v_array[403] = "Parson";
			v_array[404] = "Pauquachin";
			v_array[405] = "Peachland";
			v_array[406] = "Penticton";
			v_array[407] = "Pinantan Lake";
			v_array[408] = "Pine Pass";
			v_array[409] = "Pine View";
			v_array[410] = "Pitt Meadows";
			v_array[411] = "Pitt Poulder";
			v_array[412] = "Point Roberts";
			v_array[413] = "Popkum";
			v_array[414] = "Port Alberni";
			v_array[415] = "Port Alice";
			v_array[416] = "Port Clements";
			v_array[417] = "Port Coquitlam";
			v_array[418] = "Port Edward";
			v_array[419] = "Port Essington";
			v_array[420] = "Port Hardy";
			v_array[421] = "Port McNeill";
			v_array[422] = "Port Moody";
			v_array[423] = "Port Renfrew";
			v_array[424] = "Priestly";
			v_array[425] = "Prince George";
			v_array[426] = "Prince Rupert";
			v_array[427] = "Princeton";
			v_array[428] = "Pritchard";
			v_array[429] = "Protection Island";
			v_array[430] = "Puntzi Lake";
			v_array[431] = "Quadra Island";
			v_array[432] = "Qualicum Bay";
			v_array[433] = "Qualicum Beach";
			v_array[434] = "Quamichan";
			v_array[435] = "Quathiaski Cove";
			v_array[436] = "Quatsino";
			v_array[437] = "Queen Charlotte City";
			v_array[438] = "Queen Charlotte Islands";
			v_array[439] = "Quesnel";
			v_array[440] = "Quesnelle Forks";
			v_array[441] = "Quilchena";
			v_array[442] = "Radium Hot Springs";
			v_array[443] = "Read Island";
			v_array[444] = "Red Rock";
			v_array[445] = "Redonda Islands";
			v_array[446] = "Redstone";
			v_array[447] = "Rendezvous Islands";
			v_array[448] = "Revelstoke";
			v_array[449] = "Richmond";
			v_array[450] = "Riske Creek";
			v_array[451] = "Rivers Inlet";
			v_array[452] = "Robson";
			v_array[453] = "Rock Bay";
			v_array[454] = "Rock Creek";
			v_array[455] = "Rockland";
			v_array[456] = "Rogers Pass";
			v_array[457] = "Rose Lake";
			v_array[458] = "Rosebery";
			v_array[459] = "Rosedale";
			v_array[460] = "Rosemary Heights";
			v_array[461] = "Rossland";
			v_array[462] = "Royston";
			v_array[463] = "Ruby Creek";
			v_array[464] = "Ruskin";
			v_array[465] = "Ruskin";
			v_array[466] = "Saanich";
			v_array[467] = "Saanichton";
			v_array[468] = "Sahtlam";
			v_array[469] = "Salmo";
			v_array[470] = "Salmon Arm";
			v_array[471] = "Salt Spring Island";
			v_array[472] = "Saltair";
			v_array[473] = "Sandon";
			v_array[474] = "Sandspit";
			v_array[475] = "Sardis";
			v_array[476] = "Saturna Island";
			v_array[477] = "Savona";
			v_array[478] = "Sayward";
			v_array[479] = "Scotch Creek";
			v_array[480] = "Seal Cove";
			v_array[481] = "Seymour";
			v_array[482] = "Seymour Arm";
			v_array[483] = "Shawnigan Lake";
			v_array[484] = "Ships Point";
			v_array[485] = "Shirley";
			v_array[486] = "Shuswap";
			v_array[487] = "Sicamous";
			v_array[488] = "Sidney";
			v_array[489] = "Sidney Spit";
			v_array[490] = "Silver Creek";
			v_array[491] = "Silver Star Mountain";
			v_array[492] = "Silver Valley";
			v_array[493] = "Silverdale";
			v_array[494] = "Silverhill";
			v_array[495] = "Silverton";
			v_array[496] = "Simoon Sound";
			v_array[497] = "Skidegate";
			v_array[498] = "Skookumchuck";
			v_array[499] = "Skutz Falls";
			v_array[500] = "Slocan Park";
			v_array[501] = "Slocan Valley";
			v_array[502] = "Smithers";
			v_array[503] = "Soda Creek";
			v_array[504] = "Sointula";
			v_array[505] = "Solsqua";
			v_array[506] = "Somenos";
			v_array[507] = "Songhees First Nation";
			v_array[508] = "Sooke";
			v_array[509] = "Sorrento";
			v_array[510] = "South Bonson";
			v_array[511] = "South Hazelton";
			v_array[512] = "South Surrey";
			v_array[513] = "Southbank";
			v_array[514] = "Spallumcheen";
			v_array[515] = "Sparwood";
			v_array[516] = "Spences Bridge";
			v_array[517] = "Spillimacheen";
			v_array[518] = "Springhouse";
			v_array[519] = "Sproat Lake";
			v_array[520] = "Spuzzum";
			v_array[521] = "Squam Bay";
			v_array[522] = "Squilax";
			v_array[523] = "St. Ives";
			v_array[524] = "Stave Falls";
			v_array[525] = "Stewart";
			v_array[526] = "Straiton";
			v_array[527] = "Stuart Island";
			v_array[528] = "Stuie";
			v_array[529] = "Sumas";
			v_array[530] = "Sumas Mountain";
			v_array[531] = "Summerland";
			v_array[532] = "Sun Peaks Resort";
			v_array[533] = "Sunnybrae";
			v_array[534] = "Sunshine Valley";
			v_array[535] = "Surrey";
			v_array[536] = "Surrey";
			v_array[537] = "Swartz Bay";
			v_array[538] = "Tahsis";
			v_array[539] = "Takysie Lake";
			v_array[540] = "Tappen";
			v_array[541] = "Tatla Lake";
			v_array[542] = "Tatlayoko";
			v_array[543] = "Telegraph Cove";
			v_array[544] = "Telkwa";
			v_array[545] = "Terrace";
			v_array[546] = "Thetis Island";
			v_array[547] = "Thurlow Islands";
			v_array[548] = "Tintagel";
			v_array[549] = "Tlell";
			v_array[550] = "Tletinqox";
			v_array[551] = "Tofino";
			v_array[552] = "Toosey First Nation";
			v_array[553] = "Topley";
			v_array[554] = "Towdystan";
			v_array[555] = "Trail";
			v_array[556] = "Trout Creek";
			v_array[557] = "Tsartlip";
			v_array[558] = "Tsawout";
			v_array[559] = "Tsawwassen";
			v_array[560] = "Tseycum";
			v_array[561] = "Tulameen";
			v_array[562] = "Ucluelet";
			v_array[563] = "Ulkatcho";
			v_array[564] = "Uncha Lake";
			v_array[565] = "Union Bay";
			v_array[566] = "Upper Lonsdale";
			v_array[567] = "Upper Nicola";
			v_array[568] = "Valemount";
			v_array[569] = "Vancouver";
			v_array[570] = "Vanderhoof";
			v_array[571] = "Vargas Island";
			v_array[572] = "Vavenby";
			v_array[573] = "Vedder";
			v_array[574] = "Vernon";
			v_array[575] = "Victoria";
			v_array[576] = "Victoria West";
			v_array[577] = "View Royal";
			v_array[578] = "Vinsulla";
			v_array[579] = "Walhachin";
			v_array[580] = "Walnut Grove";
			v_array[581] = "Warfield";
			v_array[582] = "Wasa";
			v_array[583] = "Webster's Corners";
			v_array[584] = "Wells";
			v_array[585] = "West Vancouver";
			v_array[586] = "Westholme";
			v_array[587] = "Westside";
			v_array[588] = "Whalley";
			v_array[589] = "Whiskey Creek";
			v_array[590] = "White Rock";
			v_array[591] = "Whonnock";
			v_array[592] = "Wildwood";
			v_array[593] = "Williams Lake";
			v_array[594] = "Willoughby";
			v_array[595] = "Willowbrook";
			v_array[596] = "Wilmer";
			v_array[597] = "Winfield";
			v_array[598] = "Winlaw";
			v_array[599] = "Winter Harbour";
			v_array[600] = "Woss";
			v_array[601] = "Xats'ull";
			v_array[602] = "Xeni Gwet'in";
			v_array[603] = "Yahk";
			v_array[604] = "Yale";
			v_array[605] = "Yaletown";
			v_array[606] = "Yarrow";
			v_array[607] = "Yellow Point";
			v_array[608] = "Ymir";
			v_array[609] = "Youbou";
			v_array[610] = "Yunesit'in";
			v_array[611] = "Zeballos";
		
	var v_regexp = new RegExp('^' + el.value,"i");

    for ( var i = 0; i < v_array.length; i++ ) {           
         if ( v_regexp.test(v_array[i]) ) {
             v_foundarray[j] = v_array[i]; // Pattern found
             j++;
         }
    }

    return v_foundarray;
}

function createFloatingDrop(el, evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	if ((charCode >= 65 && charCode <= 90) || charCode == 32 || charCode == 8){
		if(charCode == 8 && el.value == "")
			fillInput("");
		else{
			var j = 0;
			var strHTML = " ";
			var v_foundarray =  new Array();
			v_foundarray = filter(el);

			for ( var k = 0; k < v_foundarray.length; k++ ) {
				strHTML += "<a href='javascript: fillInput(\"" + v_foundarray[k].replace(/\'/g,'&#39;') + "\");'>" + v_foundarray[k] + "</a>";
			}
			setLyr(document.getElementById('bcTownsInputFilter'), "vals");
			document.getElementById('vals').style.display = 'block';
			document.getElementById('vals').innerHTML = strHTML;
		}
	}
}

function fillInput(str){
	document.getElementById('cityInput').value = str;
	document.getElementById('vals').innerHTML = "";
}

function hideList(){
	document.getElementById('vals').style.display = 'none';
			
}
function setLyr(obj,lyr)
{
	var coors = findPos(obj);
	var x = document.getElementById(lyr);
	x.style.top = parseInt(coors[1]) + 20  + 'px';
	x.style.left = parseInt(coors[0]) + 160 + 'px';
}

function findPos(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
