var stations = [ ['14','1', 51.5719421,0.4586411, 'Station_52_Basildon', 1], ['15','1', 51.5748514,0.5973982, 'Station_35_Rayleigh_Weir', 2], ['16','1', 51.5198880,0.5817125, 'Station_54_Canvey', 3], ['17','1', 51.6209190,0.4166458, 'Station_68_Billericay', 4], ['18','1', 51.6102932,0.5186632, 'Station_69_Wickford', 5], ['20','1', 51.6435303,0.6198251, 'Station_32_South_Woodham_Ferrers', 6], ['21','1', 51.7192525,0.5036339, 'Station_33_Great_Baddow', 7], ['22','1', 51.7360672,0.4607631, 'Station_34_Chelmsford', 8], ['23','1', 51.6289008,0.8173028, 'Station_43_Burnham-on-Crouch', 9], ['24','1', 51.6985888,0.8797559, 'Station_44_Tillingham', 10], ['25','1', 51.7584645,0.8318568, 'Station_45_Tollesbury', 11], ['26','1', 51.7202531,0.6613994, 'Station_46_Maldon', 12], ['28','1', 51.8971351,0.9016285, 'Station_10_Colchester', 13], ['29','1', 51.9318938,1.2598438, 'Station_11_Dovercourt', 14], ['30','1', 51.8045322,1.1457452, 'Station_12_Clacton', 15], ['31','1', 51.9456785,1.0656191, 'Station_17_Manningtree', 16], ['32','1', 51.8375332,1.2478643, 'Station_18_Frinton', 17], ['33','1', 51.8433598,1.1255251, 'Station_19_Weeley', 18], ['34','1', 51.8107426,1.0236123, 'Station_20_Brightlingsea', 19], ['35','1', 51.8683626,0.9633645, 'Station_21_Wivenhoe', 20], ['36','1', 51.7781766,0.9139514, 'Station_22_West_Mersea', 21], ['37','1', 51.8120388,0.7496968, 'Station_23_Tiptree', 22], ['39','1', 51.7726304,0.0927986, 'Station_70_Harlow_Central', 23], ['40','1', 51.7023805,0.2438343, 'Station_71_Ongar', 24], ['41','1', 51.6437269,0.0528183, 'Station_72_Loughton', 25], ['42','1', 51.6836573,0.0015612, 'Station_73_Waltham_Abbey', 26], ['43','1', 51.7782500,0.1541817, 'Station_82_Old_Harlow', 27], ['44','1', 51.6975488,0.1100695, 'Station_89_Epping', 28], ['46','1', 51.5573638,0.7166858, 'Station_30_Southend', 29], ['47','1', 51.5553657,0.6665907, 'Station_31_Leigh', 30], ['48','1', 51.5324124,0.7971346, 'Station_42_Shoeburyness', 31], ['49','1', 51.5976163,0.6654556, 'Station_47_Hawkwell', 32], ['51','1', 51.5806297,0.7073771, 'Station_49_Rochford', 33], ['53','1', 51.4904027,0.3194975, 'Station_50_Grays', 34], ['54','1', 51.6229928,0.3013898, 'Station_51_Brentwood', 35], ['55','1', 51.5062806,0.3838126, 'Station_55_Orsett', 36], ['56','1', 51.5267296,0.4665126, 'Station_66_Corringham', 37], ['57','1', 51.6692698,0.3821221, 'Station_67_Ingatestone', 38], ['59','1', 51.8763092,0.6931878, 'Station_24_Coggeshall', 39], ['60','1', 51.7941290,0.6316366, 'Station_25_Witham', 40], ['61','1', 51.8786504,0.5585285, 'Station_78_Braintree', 41], ['62','1', 51.9536870,0.4842634, 'Station_79_Wethersfield', 42], ['63','1', 51.9792927,0.5868190, 'Station_80_Sible_Hedingham', 43], ['64','1', 51.9405323,0.6398940, 'Station_81_Halstead', 44], ['65','1', 51.9028580,0.1949368, 'Station_83_Stansted', 45], ['66','1', 51.9817363,0.2200239, 'Station_84_Newport', 46], ['67','1', 52.0230562,0.2418497, 'Station_85_Saffron_Walden', 47], ['68','1', 51.9523448,0.3512989, 'Station_86_Thaxted', 48], ['69','1', 51.8728904,0.3609525, 'Station_87_Dunmow', 49], ['70','1', 51.7977622,0.3113241, 'Station_88_Leaden_Roding', 50], ['71','1', 51.8904412,0.8532170, 'Urban_Search_and_Rescue_USAR', 51], ['72','1', 51.8206248,0.6769632, 'Service_Headquarters', 52], ];var incidents = [ ['7342','2', 51.6101177,0.5063099, '79649', 1], ['7343','2', 51.8559201,1.1664893, '79698', 2], ['7344','2', 51.5725362,0.5833091, '79713', 3], ['7345','2', 51.6171751,0.7803740, '79728', 4], ['7346','2', 51.7417639,0.4961655, '79730', 5], ['7347','2', 51.6048347,0.6696828, '79733', 6], ['7348','2', 51.5561630,0.4228920, '79736', 7], ['7349','2', 51.5613898,0.5048599, '79759', 8], ['7350','2', 51.6018141,0.5152208, '79795', 9], ['7351','2', 51.5035644,0.2898351, '79826', 10], ['7352','2', 51.7950857,1.1460727, '79830', 11], ['7353','2', 51.8878754,0.8418955, '79855', 12], ['7354','2', 51.8807795,0.8029824, '79907', 13], ['7355','2', 51.6286066,0.3609888, '79913', 14], ['7356','2', 51.8091331,0.6528316, '79956', 15], ['7357','2', 51.6773125,0.6426351, '80005', 16], ['7358','2', 51.5063544,0.3798870, '80072', 17], ['7359','2', 51.7230617,0.5189217, '80075', 18], ['7361','2', 51.8657605,0.5310676, '80099', 19], ['7360','2', 51.7651467,0.1358333, '80148', 20], ['7362','2', 51.4901763,0.3719743, '80220', 21], ['7364','2', 51.7003280,0.1086550, '80306', 22], ['7365','2', 51.5552278,0.6885238, '80324', 23], ['7371','2', 51.8461257,1.0190390, '80350', 24], ['7367','2', 51.8891021,0.8812773, '80363', 25], ['7368','2', 51.5613898,0.5048599, '80375', 26], ['7369','2', 51.7639570,0.4875361, '80381', 27], ['7370','2', 51.5717624,0.4624307, '80390', 28], ['7372','2', 52.0244419,0.2405465, '80446', 29], ['7375','2', 51.8737107,0.9078057, '80593', 30], ['7376','2', 51.6688959,0.0201298, '80650', 31], ['7379','2', 51.7042042,0.5183006, '80688', 32], ['7380','2', 51.6104160,0.2761960, '80691', 33], ['7378','2', 51.5299897,0.7344832, '80694', 34], ['7381','2', 51.5241956,0.5515383, '80804', 35], ['7382','2', 51.4778155,0.3562233, '80852', 36], ['7383','2', 51.9023535,0.8657846, '80920', 37], ['7384','2', 51.9417727,1.0309011, '80963', 38], ['7385','2', 51.5324577,0.7848078, '80986', 39], ['7386','2', 51.9818490,0.5793349, '81080', 40], ['7387','2', 51.9277537,0.9426134, '81118', 41], ['7388','2', 51.7642796,0.5156175, '81128', 42], ['7389','2', 51.7787280,0.2759090, '81147', 43], ['7390','2', 51.5750479,0.4089414, '81171', 44], ['7391','2', 51.9688200,0.7665660, '81226', 45], ['7392','2', 51.5732042,0.5625066, '81271', 46], ['7394','2', 51.9872868,0.7116885, '81383', 47], ['7395','2', 51.8972505,0.1893106, '81546', 48], ['7396','2', 51.7762980,0.5921252, '81551', 49], ['7397','2', 51.8849159,0.4439400, '81721', 50], ['7398','2', 51.5098293,0.3055965, '81801', 51], ['7399','2', 51.8020823,0.6514935, '81861', 52], ['7400','2', 51.5525633,0.6803132, '81965', 53], ['7401','2', 51.5665185,0.6418730, '81986', 54], ['7402','2', 51.7727586,0.6064393, '82025', 55], ['7403','2', 51.4758619,0.2739796, '82172', 56], ['7404','2', 51.8927315,0.2117570, '82225', 57], ['7406','2', 51.7582319,0.0728604, '82244', 58], ['7405','2', 51.6182631,0.6019713, '82251', 59], ['7407','2', 52.0009347,0.7435865, '82283', 60], ['7408','2', 51.7006270,0.5805578, '82306', 61], ['7409','2', 51.5643881,0.7654961, '82414', 62], ['7410','2', 51.6412581,0.0839057, '82438', 63], ['7412','2', 51.4957587,0.3370665, '82483', 64], ['7415','2', 51.7915412,1.1334908, '82553', 65], ['7416','2', 51.8410636,1.1515263, '82572', 66], ['7417','2', 51.7534943,0.1036008, '82583', 67], ['7418','2', 51.6775926,-0.0036059, '82639', 68], ['7421','2', 52.0184283,0.1972396, '82678', 69], ['7422','2', 51.9252072,1.0947788, '82684', 70], ['7423','2', 51.7412111,0.5006048, '82698', 71], ['7424','2', 51.5399028,0.8027329, '82736', 72], ['7425','2', 51.7053181,0.6781090, '82800', 73], ['7427','2', 51.7021849,0.0972948, '82816', 74], ['7426','2', 51.5599462,0.6834326, '82817', 75], ['7429','2', 51.7087163,0.1092495, '82906', 76], ['7428','2', 51.7150298,0.4488817, '82907', 77], ['7430','2', 51.5299897,0.7344832, '83205', 78], ['7431','2', 51.4649386,0.2589968, '83371', 79], ['7432','2', 51.9324307,0.6902146, '83377', 80], ['7433','2', 51.7770826,0.6735993, '83386', 81], ['7434','2', 51.9150782,0.1673016, '83484', 82], ['7435','2', 51.7798215,0.1864599, '83567', 83], ['7436','2', 51.6654796,0.4471893, '83576', 84], ['7437','2', 51.5681172,0.5473775, '83626', 85], ['7438','2', 51.5208969,0.6084422, '83627', 86], ['7443','2', 51.5344560,0.6967455, '83628', 87], ['7440','2', 51.8976811,0.9063788, '83639', 88], ['7442','2', 51.5694237,0.5098770, '83641', 89], ['7444','2', 51.5990529,0.6594788, '83659', 90], ['7445','2', 51.9909571,0.2902430, '83789', 91], ['7446','2', 51.5719870,0.2991000, '83854', 92], ['7447','2', 51.8976811,0.9063788, '83867', 93], ['7449','2', 51.9896554,0.8943605, '09082018', 94], ['7450','2', 51.7887618,0.2930020, '84186', 95], ['7451','2', 51.7649642,0.0886729, '84254', 96], ['7452','2', 51.7416919,0.4280539, '84371', 97], ['7453','3', 51.8999265,0.1943312, '84387', 98], ['7454','3', 51.5526278,0.6060750, '84471', 99], ['7455','3', 51.6065701,0.2909515, '84480', 100], ['7456','3', 51.9179001,0.9291091, '84555', 101], ['7457','3', 51.6615570,-0.0030300, '84588', 102], ['7459','3', 51.5211607,0.4375256, '84609', 103], ['7458','3', 51.6472567,0.0843103, '84617', 104], ['7460','3', 51.6436317,0.1651622, '84634', 105], ['7461','3', 51.4797654,0.3273398, '84662', 106], ['7462','1', 51.8147925,1.1594476, '85681', 107], ['7463','1', 51.5277816,0.5590725, '84710', 108], ]; function googleMap(mapID,sat,gam){ var mapStyles = [ { stylers: [ { saturation: sat }, { gamma:gam } ] } ]; var mapStylesType = new google.maps.StyledMapType(mapStyles, {name: "MapCSS"}); var myLatlng = new google.maps.LatLng(51.772737,0.578842); var myOptions = { zoom: 9, center: myLatlng, backgroundColor: '#ffffff', navigationControl: true, mapTypeControl: false, scaleControl: false, keyboardShortcuts: false, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById(mapID), myOptions); var schoolShadow = { url: '/_img/layup/marker_shadow.png', anchor: new google.maps.Point(10, 0) }; map.mapTypes.set('MapCSS', mapStylesType); map.setMapTypeId('MapCSS'); if(mapID=='cMap'){ marker = new google.maps.Marker({ position: new google.maps.LatLng(51.8206248,0.6769632), icon: '/_img/layup/marker1.png', shadow: schoolShadow, map: map }); google.maps.event.addListener(marker, 'click', function() { window.location = '/contact/' }); }else{ if(mapID=='sMap') { locations = stations } else { locations = incidents} var ua = navigator.userAgent; for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][2], locations[i][3]), icon: '/_img/layup/marker'+locations[i][1]+'.png', shadow: schoolShadow, optimized: true, zIndex: locations[i][5] , map: map }); google.maps.event.addDomListener(marker, 'click', (function(marker, i) { return function() { if(mapID=='sMap'){ thisID = stations[i][0]; thisLocation = '/locations/'+stations[i][4] } else {thisID = incidents[i][0]; thisLocation = '/incidents/i'+incidents[i][0] } if( $.cookie("browserSize") == 'mobileP' || $.cookie("browserSize") == 'mobileL' || ua.indexOf("BlackBerry") >= 0 ) { window.location = thisLocation ; }else { pingalaAjax.makeRequest('/content/ajax.asp?ajax=1&id='+thisID+'&area='+mapID,mapID+'info') } } })(marker, i)); } } }