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.7837176,0.1377936, '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 = [ ['7040','2', 51.5594659,0.4844688, '69107', 1], ['7041','2', 51.5360138,0.6847619, '69175', 2], ['7042','2', 51.5411967,0.6487709, '69230', 3], ['7043','2', 51.7282554,0.4615800, '69253', 4], ['7044','2', 51.5524047,0.6649356, '69272', 5], ['7045','2', 51.9612834,0.2366605, '69303', 6], ['7047','2', 51.5701099,0.3488113, '39352', 7], ['7048','2', 51.6322317,0.2977724, '69417', 8], ['7049','2', 51.9825997,0.2138751, '69478', 9], ['7050','2', 51.6176827,0.6431700, '69480', 10], ['7051','2', 51.4971637,0.3412441, '69583', 11], ['7052','2', 51.4901763,0.3719743, '69591', 12], ['7053','2', 51.6606453,0.1827856, '69600', 13], ['7054','2', 51.4773552,0.2820159, '69634', 14], ['7056','2', 51.7343313,0.4690888, '03012018', 15], ['7055','2', 51.8744831,0.4835251, '69652', 16], ['7057','2', 51.5613684,0.7031387, '69684', 17], ['7058','2', 51.6418445,0.0486660, '69691', 18], ['7059','2', 51.5571180,0.4789490, '69718', 19], ['7060','2', 51.4632193,0.3628482, '69728', 20], ['7061','2', 51.5822621,0.7045548, '69753', 21], ['7062','2', 51.5366520,0.5627400, '69794', 22], ['7063','2', 51.5301234,0.3764948, '69801', 23], ['7064','2', 51.5955272,0.5761201, '69820', 24], ['7065','2', 51.5322228,0.7478545, '69862', 25], ['7066','2', 51.6381165,0.3213464, '69879', 26], ['7067','2', 51.8635066,0.3634950, '69890', 27], ['7068','2', 51.8783333,0.8387111, '69971', 28], ['7069','2', 51.7517973,0.5166801, '69988', 29], ['7070','2', 51.7166993,0.5914413, '69998', 30], ['7071','2', 51.9370106,1.0174226, '70004', 31], ['7072','2', 51.4772609,0.2633037, '70006', 32], ['7073','2', 51.5687133,0.6432777, '70040', 33], ['7074','2', 51.6559569,0.5363684, '70081', 34], ['7076','2', 51.9877493,0.3099457, '70148', 35], ['7079','2', 51.8608953,1.0991059, '70186', 36], ['7080','2', 51.7755901,0.7485942, '70203', 37], ['7082','2', 51.9034564,0.8899020, '70272', 38], ['7083','2', 51.6815230,0.0729941, '70370', 39], ['7084','2', 51.5063544,0.3798870, '70426', 40], ['7085','2', 51.4899226,0.3549441, '70438', 41], ['7086','2', 51.9474267,1.2554988, '70463', 42], ['7087','2', 51.6894465,0.1126463, '70473', 43], ['7088','2', 51.5360388,0.7404817, '70502', 44], ['7089','2', 51.7343313,0.4690888, '18012018', 45], ['7090','2', 51.8993401,0.8256223, '70549', 46], ['7091','2', 51.5240075,0.5845134, '70574', 47], ['7092','2', 51.7882024,0.4868821, '70603', 48], ['7094','2', 51.7166993,0.5914413, '70607', 49], ['7095','2', 51.6710795,0.3837473, '70622', 50], ['7096','2', 51.6057179,0.2657995, '70626', 51], ['7097','2', 51.5698653,0.6502648, '70627', 52], ['7098','2', 52.0180930,0.6941119, '70637', 53], ['7099','2', 51.6887415,0.5854435, '70660', 54], ['7100','2', 51.8910364,0.9373474, '70678', 55], ['7101','2', 51.6177350,0.4167136, '70711', 56], ['7102','2', 51.7006270,0.5805578, '70742', 57], ['7103','2', 51.6086267,0.5346594, '70756', 58], ['7104','2', 51.7274871,0.6682539, '70763', 59], ['7105','2', 51.5720664,0.4748740, '70795', 60], ['7106','2', 51.5386271,0.7176766, '70802', 61], ['7108','2', 52.0196896,0.2541887, '70803', 62], ['7107','2', 51.5266287,0.5734492, '70817', 63], ['7109','2', 51.7572899,0.1470574, '70836', 64], ['7110','2', 51.6693894,0.4779257, '70922', 65], ['7111','2', 51.6979198,0.0009486, '70932', 66], ['7112','2', 51.9312941,0.9334823, '70935', 67], ['7113','2', 51.6218188,0.2697965, '70969', 68], ['7114','2', 51.5446061,0.6455022, '71002', 69], ['7115','2', 51.7170816,0.5288977, '71019', 70], ['7116','2', 51.4765352,0.2918846, '71028', 71], ['7117','2', 51.6311153,0.0706800, '71059', 72], ['7118','2', 51.9370106,1.0174226, '71080', 73], ['7119','2', 51.7425850,0.6211050, '71094', 74], ['7120','2', 51.5285979,0.7570859, '71137', 75], ['7121','2', 51.7279226,0.4799401, '71163', 76], ['7124','2', 51.4987633,0.3147092, '71180', 77], ['7123','2', 51.8742267,0.2365883, '71203', 78], ['7122','2', 51.7097660,0.5377122, '71207', 79], ['7125','2', 51.7559486,0.1417945, '71220', 80], ['7126','2', 51.8557069,0.9228442, '71223', 81], ['7127','2', 51.5827236,0.3103607, '71237', 82], ['7128','2', 51.8961015,0.2163467, '71292', 83], ['7129','2', 52.0184283,0.1972396, '71306', 84], ['7130','2', 51.6057179,0.2657995, '71346', 85], ['7131','2', 51.6024694,0.4209012, '71363', 86], ['7132','2', 51.7201388,0.4558013, '71384', 87], ['7133','2', 51.5800850,0.5337758, '71391', 88], ['7134','2', 51.6261252,0.0459271, '71393', 89], ['7135','2', 51.9375873,0.5020811, '71395', 90], ['7136','2', 51.5721064,0.5098197, '71417', 91], ['7138','2', 51.7262654,0.3186761, '71428', 92], ['7137','2', 51.4750366,0.3184004, '71432', 93], ['7140','2', 51.7334698,0.4721289, '71442', 94], ['7139','2', 51.7147357,0.3897221, '71445', 95], ['7141','2', 51.8876602,0.9135778, '71491', 96], ['7142','2', 51.5366520,0.5627400, '71510', 97], ['7144','2', 51.9443370,1.0801840, '71558', 98], ['7143','2', 51.7956481,0.1184357, '71563', 99], ['7145','2', 52.0661227,0.2016557, '71642', 100], ['7146','2', 51.7788766,0.1190962, '71682', 101], ['7147','2', 51.5592867,0.3931363, '71722', 102], ['7148','2', 51.4956419,0.2283094, '71761', 103], ['7149','2', 51.8265131,0.4290159, '71782', 104], ['7150','2', 51.5480211,0.7055450, '71860', 105], ['7151','2', 51.5545190,0.7222595, '71899', 106], ['7152','2', 51.8854879,0.9088190, '71908', 107], ['7153','2', 51.5421601,0.2824089, '71954', 108], ['7154','2', 51.7726793,1.1051142, '71967', 109], ['7155','2', 51.8885632,0.9022924, '71982', 110], ['7156','2', 51.5505242,0.6448318, '72008', 111], ['7158','2', 51.6019489,0.6141851, '72060', 112], ['7159','2', 51.5547705,0.5557965, '72070', 113], ['7160','2', 51.5565794,0.5578127, '72091', 114], ['7161','2', 51.6359412,0.3992083, '72106', 115], ['7162','2', 51.8740126,0.9505114, '72197', 116], ['7163','2', 51.7065853,0.2451012, '72239', 117], ['7165','3', 51.7286132,0.4670878, '72262', 118], ['7166','3', 51.6915407,0.1377404, '72281', 119], ['7167','3', 51.5430967,0.5631298, '72301', 120], ['7168','3', 51.6388775,0.2907087, '72333', 121], ['7170','3', 51.5505329,0.7289543, '72434', 122], ['7171','1', 51.6905395,0.4854721, '72443', 123], ['7172','1', 51.7647179,0.5453505, '72454', 124], ]; 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.4899226,0.3549441); var myOptions = { zoom: 13, 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)); } } }