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 = [ ['7306','2', 51.8876825,0.9390803, '77711', 1], ['7307','2', 51.5542530,0.6907907, '77769', 2], ['7309','2', 51.9303655,1.2514554, '77820', 3], ['7310','2', 51.7598159,0.1292131, '77828', 4], ['7311','2', 51.5737580,0.4732237, '77874', 5], ['7312','2', 51.5096303,0.2775798, '77962', 6], ['7313','2', 51.8772200,0.8334636, '78119', 7], ['7314','2', 51.8879656,0.9265463, '78184', 8], ['7315','2', 51.8651624,0.8434266, '78192', 9], ['7316','2', 51.4630240,0.3604980, '29052018', 10], ['7317','2', 51.5773177,0.7146655, '78319', 11], ['7318','2', 51.8545587,0.5296163, '78364', 12], ['7319','2', 51.9836242,0.2088018, '78449', 13], ['7320','2', 51.7852666,1.0529322, '78559', 14], ['7321','2', 51.5784712,0.6164711, '78633', 15], ['7322','2', 51.4877607,0.2334920, '78639', 16], ['7323','2', 51.7536522,0.1135686, '78688', 17], ['7324','2', 51.7734472,0.0313766, '78728', 18], ['7325','2', 51.5525541,0.6114621, '78769', 19], ['7327','2', 51.5180432,0.4725663, '79043', 20], ['7328','2', 51.6382657,0.4284663, '79085', 21], ['7329','2', 51.8600026,0.4641465, '79089', 22], ['7330','2', 51.9500660,0.4117480, '79090', 23], ['7331','2', 51.9415975,0.6913440, '79124', 24], ['7332','2', 51.6416329,0.6172835, '79189', 25], ['7333','2', 51.7119317,0.0336134, '79199', 26], ['7334','2', 52.0080150,0.5313590, '79296', 27], ['7335','2', 51.7363130,0.4292944, '79322', 28], ['7336','2', 51.8172620,1.1280220, '79342', 29], ['7337','2', 51.5274887,0.5910454, '79481', 30], ['7338','2', 51.5402044,0.7271199, '79503', 31], ['7339','2', 51.8944394,0.6185178, '79555', 32], ['7340','2', 51.8726934,0.9176085, '79604', 33], ['7341','2', 51.5722906,0.4412749, '79605', 34], ['7342','2', 51.6101177,0.5063099, '79649', 35], ['7343','2', 51.8559201,1.1664893, '79698', 36], ['7344','2', 51.5725362,0.5833091, '79713', 37], ['7345','2', 51.6171751,0.7803740, '79728', 38], ['7346','2', 51.7417639,0.4961655, '79730', 39], ['7347','2', 51.6048347,0.6696828, '79733', 40], ['7348','2', 51.5561630,0.4228920, '79736', 41], ['7349','2', 51.5613898,0.5048599, '79759', 42], ['7350','2', 51.6018141,0.5152208, '79795', 43], ['7351','2', 51.5035644,0.2898351, '79826', 44], ['7352','2', 51.7950857,1.1460727, '79830', 45], ['7353','2', 51.8878754,0.8418955, '79855', 46], ['7354','2', 51.8807795,0.8029824, '79907', 47], ['7355','2', 51.6286066,0.3609888, '79913', 48], ['7356','2', 51.8091331,0.6528316, '79956', 49], ['7357','2', 51.6773125,0.6426351, '80005', 50], ['7358','2', 51.5063544,0.3798870, '80072', 51], ['7359','2', 51.7230617,0.5189217, '80075', 52], ['7361','2', 51.8657605,0.5310676, '80099', 53], ['7360','2', 51.7651467,0.1358333, '80148', 54], ['7362','2', 51.4901763,0.3719743, '80220', 55], ['7364','2', 51.7003280,0.1086550, '80306', 56], ['7365','2', 51.5552278,0.6885238, '80324', 57], ['7371','2', 51.8461257,1.0190390, '80350', 58], ['7367','2', 51.8891021,0.8812773, '80363', 59], ['7368','2', 51.5613898,0.5048599, '80375', 60], ['7369','2', 51.7639570,0.4875361, '80381', 61], ['7370','2', 51.5717624,0.4624307, '80390', 62], ['7372','2', 52.0244419,0.2405465, '80446', 63], ['7375','2', 51.8737107,0.9078057, '80593', 64], ['7376','2', 51.6688959,0.0201298, '80650', 65], ['7379','2', 51.7042042,0.5183006, '80688', 66], ['7380','2', 51.6104160,0.2761960, '80691', 67], ['7378','2', 51.5299897,0.7344832, '80694', 68], ['7381','2', 51.5241956,0.5515383, '80804', 69], ['7382','2', 51.4778155,0.3562233, '80852', 70], ['7383','2', 51.9023535,0.8657846, '80920', 71], ['7384','2', 51.9417727,1.0309011, '80963', 72], ['7385','2', 51.5324577,0.7848078, '80986', 73], ['7386','2', 51.9818490,0.5793349, '81080', 74], ['7387','2', 51.9277537,0.9426134, '81118', 75], ['7388','2', 51.7642796,0.5156175, '81128', 76], ['7389','2', 51.7787280,0.2759090, '81147', 77], ['7390','2', 51.5750479,0.4089414, '81171', 78], ['7391','2', 51.9688200,0.7665660, '81226', 79], ['7392','2', 51.5732042,0.5625066, '81271', 80], ['7394','2', 51.9872868,0.7116885, '81383', 81], ['7395','2', 51.8972505,0.1893106, '81546', 82], ['7396','2', 51.7762980,0.5921252, '81551', 83], ['7397','2', 51.8849159,0.4439400, '81721', 84], ['7398','3', 51.5098293,0.3055965, '81801', 85], ['7399','3', 51.8020823,0.6514935, '81861', 86], ['7400','3', 51.5525633,0.6803132, '81965', 87], ['7401','3', 51.5665185,0.6418730, '81986', 88], ['7402','3', 51.7727586,0.6064393, '82025', 89], ['7403','1', 51.4758619,0.2739796, '82172', 90], ['7404','1', 51.8927315,0.2117570, '82225', 91], ['7406','1', 51.7582319,0.0728604, '82244', 92], ['7405','1', 51.6182631,0.6019713, '82251', 93], ]; 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)); } } }