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 = [ ['7464','2', 51.6826213,-0.0607153, '84881', 1], ['7465','2', 51.7349851,0.5053474, '84894', 2], ['7466','2', 51.5324865,0.7815429, '84940', 3], ['7467','2', 51.6887092,0.0982819, '84984', 4], ['7468','2', 51.5249358,0.5709452, '', 5], ['7469','2', 51.9132408,0.2361506, '84994', 6], ['7470','2', 51.7522739,0.0161836, '85041', 7], ['7471','2', 51.7119317,0.0336134, '85083', 8], ['7472','2', 51.7642796,0.5156175, '85109', 9], ['7473','2', 51.5546287,0.5563173, '85123', 10], ['7474','2', 51.8735161,0.2308748, '85149', 11], ['7475','2', 51.5640472,0.4259813, '85261', 12], ['7476','2', 51.5277816,0.5590725, '85284', 13], ['7477','2', 51.7929067,1.1358100, '85817', 14], ['7478','2', 51.7554723,0.4618315, '85359', 15], ['7479','2', 51.6963885,0.6500124, '85375', 16], ['7480','2', 51.6562296,0.6898827, '85462', 17], ['7481','2', 51.6915901,0.0300458, '85492', 18], ['7482','2', 51.4604598,0.3449433, '85671', 19], ['7483','2', 51.8681874,0.3666660, '85726', 20], ['7484','2', 51.8726169,0.9285834, '85744', 21], ['7485','2', 51.9475101,0.5918771, '85747', 22], ['7488','2', 51.4602964,0.3772050, '85831', 23], ['7489','2', 51.6587465,0.0696206, '85898', 24], ['7490','2', 51.5745791,0.5707048, '85959', 25], ['7492','2', 51.8875629,0.8932305, '85992', 26], ['7493','2', 51.4763107,0.2900384, '86007', 27], ['7495','2', 51.8820688,0.7907288, '86016', 28], ['7497','2', 51.7887835,1.1552994, '86044', 29], ['7499','2', 51.9416897,0.6349681, '86135', 30], ['7500','2', 51.5238781,0.5820679, '86159', 31], ['7501','2', 51.6102448,0.2694022, '86378', 32], ['7502','2', 51.8979677,0.8446355, '86441', 33], ['7503','2', 51.7735759,1.1062561, '86452', 34], ['7504','2', 51.9916265,0.3107882, '86455', 35], ['7506','2', 51.8960114,0.8956376, '86458', 36], ['7505','2', 51.5355288,0.7162148, '86488', 37], ['7507','2', 51.6410007,0.6144253, '86522', 38], ['7508','2', 51.6057179,0.2657995, '86535', 39], ['7509','2', 51.8786228,0.7354996, '86550', 40], ['7510','2', 51.7295752,0.3083438, '86584', 41], ['7511','2', 51.9175977,0.9058088, '86598', 42], ['7512','2', 51.6545442,0.1865433, '86618', 43], ['7513','2', 51.8849981,0.9162574, '86640', 44], ['7514','2', 51.4604598,0.3449433, '86684', 45], ['7516','2', 51.7064310,0.2451348, '86730', 46], ['7517','2', 51.9117334,0.9202740, '86749', 47], ['7518','2', 51.5047913,0.3730518, '86808', 48], ['7519','2', 51.8967561,0.8915073, '86813', 49], ['7520','2', 51.5487314,0.8112681, '86900', 50], ['7521','2', 51.7990956,1.1460540, '86932', 51], ['7522','2', 51.7753828,0.5927134, '87044', 52], ['7523','2', 51.8160306,0.5226408, '87106', 53], ['7524','2', 51.5773364,0.3374460, '87358', 54], ['7525','2', 51.5517220,0.4642066, '87405', 55], ['7526','2', 51.9491987,0.1248505, '87467', 56], ['7527','2', 51.6397586,0.2594743, '87586', 57], ['7528','2', 51.7639821,0.8052270, '87620', 58], ['7529','2', 51.9098015,0.8964807, '87691', 59], ['7530','2', 51.5773149,0.5975774, '87710', 60], ['7531','2', 51.7463702,0.4669073, '87888', 61], ['7533','2', 51.8859926,0.5333892, '87997', 62], ['7534','2', 51.7671076,0.1064516, '88010', 63], ['7535','2', 51.5496579,0.5605594, '88012', 64], ['7536','2', 51.6428604,0.0880514, '88077', 65], ['7537','2', 51.5252112,0.5673484, '88152', 66], ['7538','3', 51.5517220,0.4642066, '88332', 67], ['7539','3', 51.7649642,0.0886729, '88377', 68], ['7540','1', 51.9701390,0.9809187, '88494', 69], ]; 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)); } } }