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 = [ ['7255','2', 51.8098500,1.1505432, '75950', 1], ['7259','2', 51.5801099,0.5011413, '76068', 2], ['7258','2', 51.5633634,0.4982435, '76070', 3], ['7256','2', 51.4812334,0.2913284, '76075', 4], ['7257','2', 51.6003937,0.6570108, '76081', 5], ['7260','2', 52.0428110,0.4889400, '76101', 6], ['7261','2', 51.5564863,0.6865228, '76171', 7], ['7265','2', 51.6007259,0.6973298, '76221', 8], ['7262','2', 51.8163025,0.9111532, '76229', 9], ['7266','2', 51.7956370,1.1505033, '76278', 10], ['7269','2', 51.5035798,0.2369511, '76357', 11], ['7268','2', 51.8128402,0.2208126, '76371', 12], ['7270','2', 51.7598560,0.0942505, '76492', 13], ['7271','2', 51.5642514,0.5091005, '76496', 14], ['7272','2', 51.9135667,0.9251153, '76497', 15], ['7274','2', 51.5773149,0.5975774, '76541', 16], ['7273','2', 51.6936387,0.4689429, '76542', 17], ['7275','2', 51.9260380,0.6156244, '76544', 18], ['7276','2', 51.4593126,0.3676355, '76571', 19], ['7279','2', 51.5389472,0.4702760, '76741', 20], ['7280','2', 51.7970373,1.1496938, '76821', 21], ['7281','2', 51.8375754,0.3307676, '76886', 22], ['7282','2', 51.4974098,0.3387825, '76920', 23], ['7283','2', 51.6815230,0.0729941, '76962', 24], ['7284','2', 51.6112384,0.5054971, '76974', 25], ['7285','2', 51.6270944,0.5380384, '77016', 26], ['7286','2', 51.6428604,0.0880514, '77050', 27], ['7287','2', 51.5850255,0.4616490, '77141', 28], ['7288','2', 51.8854625,0.9152307, '77144', 29], ['7289','2', 51.6062232,0.5455751, '77154', 30], ['7290','2', 51.8937867,0.5503733, '77202', 31], ['7291','2', 51.5786508,0.5015698, '77245', 32], ['7292','2', 51.5402044,0.7271199, '77258', 33], ['7293','2', 51.5698653,0.6502648, '77295', 34], ['7294','2', 51.7487593,0.4893368, '77335', 35], ['7296','2', 51.6243123,0.3406587, '77347', 36], ['7298','2', 51.4830337,0.3665966, '77488', 37], ['7299','2', 51.6823897,0.0213604, '77499', 38], ['7300','2', 51.8423921,0.9965057, '77536', 39], ['7301','2', 51.8888725,0.9040389, '77580', 40], ['7302','2', 51.5360138,0.6847619, '77611', 41], ['7303','2', 51.5648997,0.5108538, '77640', 42], ['7304','2', 51.8927315,0.2117570, '77642', 43], ['7305','2', 51.5472923,0.7173744, '77702', 44], ['7306','2', 51.8876825,0.9390803, '77711', 45], ['7307','2', 51.5542530,0.6907907, '77769', 46], ['7309','2', 51.9303655,1.2514554, '77820', 47], ['7310','2', 51.7598159,0.1292131, '77828', 48], ['7311','2', 51.5737580,0.4732237, '77874', 49], ['7312','2', 51.5096303,0.2775798, '77962', 50], ['7313','2', 51.8772200,0.8334636, '78119', 51], ['7314','2', 51.8879656,0.9265463, '78184', 52], ['7315','2', 51.8651624,0.8434266, '78192', 53], ['7316','2', 51.4630240,0.3604980, '29052018', 54], ['7317','2', 51.5773177,0.7146655, '78319', 55], ['7318','2', 51.8545587,0.5296163, '78364', 56], ['7319','2', 51.9836242,0.2088018, '78449', 57], ['7320','2', 51.7852666,1.0529322, '78559', 58], ['7321','2', 51.5784712,0.6164711, '78633', 59], ['7322','2', 51.4877607,0.2334920, '78639', 60], ['7323','2', 51.7536522,0.1135686, '78688', 61], ['7324','2', 51.7734472,0.0313766, '78728', 62], ['7325','2', 51.5525541,0.6114621, '78769', 63], ['7327','2', 51.5180432,0.4725663, '79043', 64], ['7328','2', 51.6382657,0.4284663, '79085', 65], ['7329','2', 51.8600026,0.4641465, '79089', 66], ['7330','2', 51.9500660,0.4117480, '79090', 67], ['7331','2', 51.9415975,0.6913440, '79124', 68], ['7332','2', 51.6416329,0.6172835, '79189', 69], ['7333','2', 51.7119317,0.0336134, '79199', 70], ['7334','2', 52.0080150,0.5313590, '79296', 71], ['7335','3', 51.7363130,0.4292944, '79322', 72], ['7336','3', 51.8172620,1.1280220, '79342', 73], ['7337','3', 51.5274887,0.5910454, '79481', 74], ['7338','3', 51.5402044,0.7271199, '79503', 75], ['7339','3', 51.8944394,0.6185178, '79555', 76], ['7340','1', 51.8726934,0.9176085, '79604', 77], ['7341','1', 51.5722906,0.4412749, '79605', 78], ['7342','1', 51.6101177,0.5063099, '79649', 79], ]; 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.6836573,0.0015612); 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)); } } }