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 = [ ['6904','2', 51.4778536,0.3341472, '64804', 1], ['6905','2', 51.8469089,1.2713044, '64877', 2], ['6906','2', 51.7212787,0.6619401, '64984', 3], ['6909','2', 51.7776544,0.0940405, '65023', 4], ['6910','2', 51.8199737,0.7468135, '65063', 5], ['6912','2', 51.8768768,0.3715727, '65141', 6], ['6911','2', 51.7788946,0.5428986, '65160', 7], ['6913','2', 51.5414735,0.6714711, '65213', 8], ['6914','2', 51.5319835,0.4599838, '65242', 9], ['6915','2', 51.5661741,0.4709335, '65278', 10], ['6916','2', 51.6142219,0.4023269, '65329', 11], ['6917','2', 51.6322576,0.4725197, '65385', 12], ['6918','2', 51.9448273,1.0779262, '65404', 13], ['6919','2', 51.8207824,0.7436397, '65516', 14], ['6921','2', 51.8645980,0.9769929, '65548', 15], ['6922','2', 51.6688959,0.0201298, '65556', 16], ['6924','2', 51.6578366,0.0412317, '65649', 17], ['6923','2', 51.8876992,0.8929505, '65667', 18], ['6925','2', 51.7903145,0.1229789, '65707', 19], ['6926','2', 51.9435627,0.6336172, '65785', 20], ['6927','2', 51.8284251,0.7038550, '65788', 21], ['6928','2', 51.5347439,0.7742600, '65903', 22], ['6929','2', 51.8679376,0.2915527, '65980', 23], ['6930','2', 51.5535554,0.3657955, '66032', 24], ['6931','2', 51.7176207,0.2479084, '66111', 25], ['6932','2', 51.7343313,0.4690888, '04112018', 26], ['6934','2', 51.7506138,0.0338099, '66170', 27], ['6936','2', 51.6564355,0.2817524, '66334', 28], ['6937','2', 51.4829857,0.2820685, '66373', 29], ['6938','2', 51.5883036,0.4908974, '66391', 30], ['6939','2', 51.4829857,0.2820685, '66399', 31], ['6940','2', 51.5673574,0.4584424, '66415', 32], ['6941','2', 51.8885097,0.8925246, '66455', 33], ['6942','2', 51.4769779,0.3306135, '66499', 34], ['6943','2', 51.8695730,0.8932950, '66514', 35], ['6944','2', 51.7450963,0.0888481, '66544', 36], ['6945','2', 51.7734344,1.1027713, '66596', 37], ['6946','2', 51.6918026,0.0987931, '66699', 38], ['6947','2', 51.5441003,0.7005566, '66711', 39], ['6948','2', 51.8382333,1.1977990, '66745', 40], ['6950','2', 51.8614257,0.9107883, '66830', 41], ['6949','2', 51.8854879,0.9088190, '66833', 42], ['6951','2', 51.5762404,0.5136055, '66887', 43], ['6952','2', 51.6024694,0.4209012, '66921', 44], ['6953','2', 51.5444896,0.3611650, '66988', 45], ['6954','2', 51.5601872,0.5406254, '67002', 46], ['6955','2', 51.8899468,0.9421165, '67029', 47], ['6957','2', 51.5214724,0.6038980, '67045', 48], ['6958','2', 51.8773194,0.5605741, '67052', 49], ['6959','2', 51.9454372,0.6056138, '67069', 50], ['6960','2', 51.9522908,0.3440920, '67070', 51], ['6961','2', 51.6269621,0.4285266, '67082', 52], ['6963','2', 51.8991916,0.8931246, '67089', 53], ['6962','2', 51.5822290,0.6010709, '67095', 54], ['6964','2', 51.8480816,1.2722940, '67159', 55], ['6965','2', 51.4869242,0.3095933, '67162', 56], ['6966','2', 51.8841537,0.1743018, '67184', 57], ['6967','2', 51.7948791,1.0333776, '67228', 58], ['6968','2', 51.9002864,0.8997524, '67247', 59], ['6969','2', 51.7551693,0.0711606, '67260', 60], ['6970','2', 52.0192979,0.2838422, '67265', 61], ['6971','2', 52.0437456,0.3204343, '67269', 62], ['6972','2', 51.6428034,0.5522178, '67278', 63], ['6973','2', 51.7065853,0.2451012, '67317', 64], ['6974','2', 51.7319044,0.4745573, '67356', 65], ['6975','2', 51.9910062,0.2131421, '67360', 66], ['6976','2', 51.7804425,0.6082270, '67367', 67], ['6977','2', 51.8450392,1.2665779, '67373', 68], ['6978','2', 51.4954954,0.2688919, '67396', 69], ['6979','2', 51.8961015,0.2163467, '67461', 70], ['6980','2', 51.5181581,0.4186643, '67506', 71], ['6981','2', 51.6948725,0.1393167, '67528', 72], ['6982','2', 51.8450392,1.2665779, '67534', 73], ['6983','2', 51.8657054,0.3544496, '67538', 74], ['6984','2', 51.6379861,0.4131464, '67554', 75], ['6985','2', 51.6263453,0.2371897, '67598', 76], ['6986','2', 51.5958752,0.5646689, '67604', 77], ['6987','2', 51.7490381,0.0968072, '67610', 78], ['6988','2', 51.5322228,0.7478545, '67690', 79], ['6989','2', 51.8813905,0.9284681, '67715', 80], ['6990','2', 51.5308399,0.7428715, '', 81], ['6991','2', 51.9474267,1.2554988, '67872', 82], ['6992','2', 51.7905970,1.1536562, '47882', 83], ['6993','2', 51.7572899,0.1470574, '67886', 84], ['6994','2', 51.4987633,0.3147092, '67887', 85], ['6995','2', 51.9078092,0.9661611, '67889', 86], ['6996','2', 51.8814324,0.2153914, '67897', 87], ['6997','2', 51.5976450,0.3470405, '67900', 88], ['6998','2', 51.8596157,1.1065497, '67901', 89], ['6999','2', 51.6406307,0.7986382, '67975', 90], ['7000','2', 51.7147357,0.3897221, '68001', 91], ['7001','2', 51.6057179,0.2657995, '68012', 92], ['7002','2', 51.6312202,0.3606392, '68045', 93], ['7003','2', 51.8364709,0.5889579, '68063', 94], ['7004','2', 51.7820382,0.3935848, '68183', 95], ['7005','2', 51.8977137,0.1995740, '68188', 96], ['7006','2', 51.9264014,0.7266905, '68194', 97], ['7007','2', 51.5326331,0.7604179, '68238', 98], ['7008','2', 51.7887835,1.1552994, '68247', 99], ['7009','2', 51.8086889,1.0223493, '68250', 100], ['7010','2', 51.5621563,0.4834946, '68318', 101], ['7011','3', 51.6311153,0.0706800, '68324', 102], ['7013','3', 51.5647384,0.4735165, '68322', 103], ['7014','3', 51.6019129,0.4685011, '68370', 104], ['7012','3', 51.6057179,0.2657995, '68376', 105], ['7015','3', 51.5791800,0.5146528, '68407', 106], ['7016','3', 51.4954954,0.2688919, '68434', 107], ['7017','3', 51.6359412,0.3992083, '68466', 108], ['7018','3', 51.8565380,0.9391401, '68468', 109], ['7019','3', 51.7704613,0.1030593, '68493', 110], ['7020','3', 51.6359412,0.3992083, '68523', 111], ['7021','3', 51.9002136,1.0344272, '68549', 112], ['7022','1', 51.6253008,0.4173232, '68640', 113], ]; 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.6437269,0.0528183); 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)); } } }