var stations = [ ['14','1', 51.5719421,0.4586411, 'Station_52_Basildon', 1], ['15','1', 51.5747896,0.5974941, 'Station_35_Rayleigh_Weir', 2], ['16','1', 51.5199734,0.5822190, 'Station_54_Canvey', 3], ['17','1', 51.6206344,0.4166567, 'Station_68_Billericay', 4], ['18','1', 51.6106824,0.5197544, 'Station_69_Wickford', 5], ['20','1', 51.6434383,0.6194760, 'Station_32_South_Woodham_Ferrers', 6], ['21','1', 51.7190856,0.5034946, 'Station_33_Great_Baddow', 7], ['22','1', 51.7363984,0.4608941, 'Station_34_Chelmsford', 8], ['23','1', 51.6287375,0.8171197, 'Station_43_Burnham-on-Crouch', 9], ['24','1', 51.6980932,0.8799774, 'Station_44_Tillingham', 10], ['25','1', 51.7587662,0.8310951, 'Station_45_Tollesbury', 11], ['26','1', 51.7198026,0.6587767, 'Station_46_Maldon', 12], ['28','1', 51.8978747,0.9022088, 'Station_10_Colchester', 13], ['29','1', 51.9317833,1.2598558, 'Station_11_Dovercourt', 14], ['30','1', 51.8046231,1.1453795, 'Station_12_Clacton', 15], ['31','1', 51.9457631,1.0659255, 'Station_17_Manningtree', 16], ['32','1', 51.8375783,1.2481800, 'Station_18_Frinton', 17], ['33','1', 51.8448988,1.1278691, 'Station_19_Weeley', 18], ['34','1', 51.8106928,1.0236798, 'Station_20_Brightlingsea', 19], ['35','1', 51.8683192,0.9632980, 'Station_21_Wivenhoe', 20], ['36','1', 51.7776038,0.9149037, 'Station_22_West_Mersea', 21], ['37','1', 51.8120947,0.7494787, 'Station_23_Tiptree', 22], ['39','1', 51.7725435,0.0916530, 'Station_70_Harlow_Central', 23], ['40','1', 51.7027763,0.2432533, 'Station_71_Ongar', 24], ['41','1', 51.6434101,0.0532422, 'Station_72_Loughton', 25], ['42','1', 51.6835922,0.0012908, 'Station_73_Waltham_Abbey', 26], ['43','1', 51.7833834,0.1373196, 'Station_82_Old_Harlow', 27], ['44','1', 51.6977050,0.1098941, 'Station_89_Epping', 28], ['46','1', 51.5570274,0.7165637, 'Station_30_Southend', 29], ['47','1', 51.5548649,0.6649381, 'Station_31_Leigh', 30], ['48','1', 51.5325143,0.7971511, 'Station_42_Shoeburyness', 31], ['49','1', 51.5974457,0.6657675, 'Station_47_Hawkwell', 32], ['51','1', 51.5804303,0.7070982, 'Station_49_Rochford', 33], ['53','1', 51.4903484,0.3197803, 'Station_50_Grays', 34], ['54','1', 51.6229613,0.3010268, 'Station_51_Brentwood', 35], ['55','1', 51.5071557,0.3833729, 'Station_55_Orsett', 36], ['56','1', 51.5267314,0.4666974, 'Station_66_Corringham', 37], ['57','1', 51.6693873,0.3821726, 'Station_67_Ingatestone', 38], ['59','1', 51.8763232,0.6937408, 'Station_24_Coggeshall', 39], ['60','1', 51.7939759,0.6318327, 'Station_25_Witham', 40], ['61','1', 51.8788575,0.5585779, 'Station_78_Braintree', 41], ['62','1', 51.9527258,0.4838533, 'Station_79_Wethersfield', 42], ['63','1', 51.9793808,0.5868086, 'Station_80_Sible_Hedingham', 43], ['64','1', 51.9402457,0.6396872, 'Station_81_Halstead', 44], ['65','1', 51.9027326,0.1948806, 'Station_83_Stansted', 45], ['66','1', 51.9829447,0.2226788, 'Station_84_Newport', 46], ['67','1', 52.0230310,0.2422232, 'Station_85_Saffron_Walden', 47], ['68','1', 51.9518731,0.3508981, 'Station_86_Thaxted', 48], ['69','1', 51.8731049,0.3606588, 'Station_87_Dunmow', 49], ['70','1', 51.7971544,0.3115783, '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 = [ ['7614','2', 51.8883394,1.1559155, '92357', 1], ['7615','2', 51.4847938,0.3460144, '92409', 2], ['7616','2', 51.7908438,1.1537264, '92456', 3], ['7617','2', 51.8752039,0.5750553, '92669', 4], ['7618','2', 51.5275013,0.4365491, '92696', 5], ['7619','2', 51.5506345,0.7334270, '92828', 6], ['7620','2', 52.0849389,0.6420125, '92913', 7], ['7621','2', 51.4989188,0.2553580, '92916', 8], ['7622','2', 51.7754060,0.0753374, '92933', 9], ['7623','2', 51.8844137,0.9064190, '92973', 10], ['7624','2', 51.7903145,0.1229789, '93202', 11], ['7625','2', 51.7031442,0.2226661, '93221', 12], ['7626','2', 51.6811253,0.0023374, '93383', 13], ['7627','2', 51.5370092,0.6979235, '93451', 14], ['7628','2', 51.6759907,0.2794890, '93545', 15], ['7629','2', 51.7168731,0.4186387, '93616', 16], ['7630','2', 51.5958752,0.5646689, '93693', 17], ['7631','2', 51.9354147,0.9609137, '93710', 18], ['7632','2', 51.7177099,0.5106484, '93844', 19], ['7633','2', 51.7572899,0.1470574, '93964', 20], ['7635','2', 51.8902087,0.9163968, '93977', 21], ['7634','2', 51.6717676,0.2077171, '93978', 22], ['7636','2', 51.7046871,0.8350691, '93980', 23], ['7637','2', 51.9122739,0.5582899, '93987', 24], ['7638','2', 51.6481834,0.2598717, '94012', 25], ['7639','2', 51.7968189,1.1298621, '94129', 26], ['7640','2', 51.6058105,0.5932393, '94130', 27], ['7641','2', 51.6825284,0.0253768, '94136', 28], ['7643','2', 51.8686032,0.5389404, '94160', 29], ['7642','2', 51.9300594,0.8782109, '94172', 30], ['7644','2', 51.4896357,0.3207033, '94198', 31], ['7645','2', 51.9273741,1.2216777, '94397', 32], ['7646','2', 51.8325140,0.9107516, '94430', 33], ['7647','2', 52.0332698,0.6489673, '94451', 34], ['7648','2', 51.6811253,0.0023374, '94500', 35], ['7649','2', 51.7500319,0.4813505, '94556', 36], ['7650','2', 51.7628586,0.1270931, '94616', 37], ['7651','2', 51.5367111,0.7558066, '95761', 38], ['7652','2', 51.8066253,0.5184357, '94870', 39], ['7653','2', 51.7445869,0.0861747, '94923', 40], ['7654','2', 51.6277363,0.3359302, '94935', 41], ['7655','2', 51.8217429,1.1399023, '94939', 42], ['7656','2', 51.9355593,1.2776966, '94944', 43], ['7657','2', 51.7572899,0.1470574, '95020', 44], ['7658','2', 51.8925129,0.2115050, '95029', 45], ['7659','2', 51.8890375,0.9263501, '95049', 46], ['7660','2', 51.4721283,0.3295550, '95060', 47], ['7661','2', 51.6186650,0.0398494, '95143', 48], ['7662','2', 51.7223362,0.4775713, '95190', 49], ['7663','3', 51.6057179,0.2657995, '95275', 50], ['7664','3', 51.5997520,0.3068229, '95331', 51], ['7665','3', 51.5492307,0.7420065, '95356', 52], ['7666','3', 51.5548249,0.6723827, '95465', 53], ['7667','1', 51.8651980,0.5571138, '95509', 54], ['7668','1', 51.7647179,0.5453505, '95519', 55], ['7669','1', 51.9571171,0.2885027, '95522', 56], ['7670','1', 51.7463702,0.4669073, '95553', 57], ]; 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)); } } }