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 = [ ['6881','2', 51.5760166,0.4887948, '63459', 1], ['6882','2', 51.9086612,0.9463409, '63522', 2], ['6883','2', 51.8158735,0.2130924, '63560', 3], ['6885','2', 51.8094720,1.1503017, '63736', 4], ['6886','2', 51.8832729,0.6929092, '63842', 5], ['6887','2', 51.5529087,0.5907021, '63916', 6], ['6888','2', 51.8820627,0.9328428, '63950', 7], ['6889','2', 51.8819363,0.2046247, '63981', 8], ['6890','2', 51.8005007,1.1277192, '63993', 9], ['6891','2', 51.6218811,0.0777977, '64026', 10], ['6892','2', 51.5483071,0.7051917, '64086', 11], ['6894','2', 51.8801916,0.8668231, '64170', 12], ['6893','2', 51.5565794,0.5578127, '64194', 13], ['6895','2', 51.8750176,0.5753059, '64315', 14], ['6896','2', 51.4671881,0.3641382, '64338', 15], ['6898','2', 51.5214724,0.6038980, '64580', 16], ['6900','2', 51.7453937,0.6917433, '64625', 17], ['6901','2', 51.4746484,0.3294780, '64626', 18], ['6902','2', 51.6363307,0.0568779, '64685', 19], ['6904','2', 51.4778536,0.3341472, '64804', 20], ['6905','2', 51.8469089,1.2713044, '64877', 21], ['6906','2', 51.7212787,0.6619401, '64984', 22], ['6909','2', 51.7776544,0.0940405, '65023', 23], ['6910','2', 51.8199737,0.7468135, '65063', 24], ['6912','2', 51.8768768,0.3715727, '65141', 25], ['6911','2', 51.7788946,0.5428986, '65160', 26], ['6913','2', 51.5414735,0.6714711, '65213', 27], ['6914','2', 51.5319835,0.4599838, '65242', 28], ['6915','2', 51.5661741,0.4709335, '65278', 29], ['6916','2', 51.6142219,0.4023269, '65329', 30], ['6917','2', 51.6322576,0.4725197, '65385', 31], ['6918','2', 51.9448273,1.0779262, '65404', 32], ['6919','2', 51.8207824,0.7436397, '65516', 33], ['6921','2', 51.8645980,0.9769929, '65548', 34], ['6922','2', 51.6688959,0.0201298, '65556', 35], ['6924','2', 51.6578366,0.0412317, '65649', 36], ['6923','2', 51.8876992,0.8929505, '65667', 37], ['6925','2', 51.7903145,0.1229789, '65707', 38], ['6926','2', 51.9435627,0.6336172, '65785', 39], ['6927','2', 51.8284251,0.7038550, '65788', 40], ['6928','2', 51.5347439,0.7742600, '65903', 41], ['6929','2', 51.8679376,0.2915527, '65980', 42], ['6930','2', 51.5535554,0.3657955, '66032', 43], ['6931','2', 51.7176207,0.2479084, '66111', 44], ['6932','2', 51.7343313,0.4690888, '04112018', 45], ['6934','2', 51.7506138,0.0338099, '66170', 46], ['6936','2', 51.6564355,0.2817524, '66334', 47], ['6937','2', 51.4829857,0.2820685, '66373', 48], ['6938','2', 51.5883036,0.4908974, '66391', 49], ['6939','2', 51.4829857,0.2820685, '66399', 50], ['6940','2', 51.5673574,0.4584424, '66415', 51], ['6941','2', 51.8885097,0.8925246, '66455', 52], ['6942','2', 51.4769779,0.3306135, '66499', 53], ['6943','2', 51.8695730,0.8932950, '66514', 54], ['6944','2', 51.7450963,0.0888481, '66544', 55], ['6945','2', 51.7734344,1.1027713, '66596', 56], ['6946','2', 51.6918026,0.0987931, '66699', 57], ['6947','2', 51.5441003,0.7005566, '66711', 58], ['6948','2', 51.8382333,1.1977990, '66745', 59], ['6950','2', 51.8614257,0.9107883, '66830', 60], ['6949','2', 51.8854879,0.9088190, '66833', 61], ['6951','2', 51.5762404,0.5136055, '66887', 62], ['6952','2', 51.6024694,0.4209012, '66921', 63], ['6953','2', 51.5444896,0.3611650, '66988', 64], ['6954','2', 51.5601872,0.5406254, '67002', 65], ['6955','3', 51.8899468,0.9421165, '67029', 66], ['6957','3', 51.5214724,0.6038980, '67045', 67], ['6958','3', 51.8773194,0.5605741, '67052', 68], ['6959','3', 51.9454372,0.6056138, '67069', 69], ['6960','3', 51.9522908,0.3440920, '67070', 70], ['6961','3', 51.6269621,0.4285266, '67082', 71], ['6963','3', 51.8991916,0.8931246, '67089', 72], ['6962','3', 51.5822290,0.6010709, '67095', 73], ['6964','3', 51.8480816,1.2722940, '67159', 74], ['6965','3', 51.4869242,0.3095933, '67162', 75], ['6966','3', 51.8841537,0.1743018, '67184', 76], ['6967','3', 51.7948791,1.0333776, '67228', 77], ['6968','1', 51.9002864,0.8997524, '67247', 78], ['6969','1', 51.7551693,0.0711606, '67260', 79], ['6970','1', 52.0192979,0.2838422, '67265', 80], ['6971','1', 52.0437456,0.3204343, '67269', 81], ['6972','1', 51.6428034,0.5522178, '67278', 82], ]; 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)); } } }