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 = [ ['7576','2', 51.9662268,0.4487790, '13:52', 1], ['7577','2', 51.5335417,0.7098914, '90743', 2], ['7578','2', 51.5469606,0.7296149, '90751', 3], ['7580','2', 51.8875629,0.8932305, '90810', 4], ['7581','2', 51.7042042,0.5183006, '90846', 5], ['7582','2', 51.7111721,0.4372136, '90870', 6], ['7583','2', 51.5446028,0.5619147, '90915', 7], ['7584','2', 51.6874368,0.2341071, '90922', 8], ['7585','2', 51.8907278,0.9447392, '90973', 9], ['7587','2', 51.6322317,0.2977724, '91087', 10], ['7588','2', 51.8604612,1.2827475, '91120', 11], ['7589','2', 51.5113988,0.4803207, '91188', 12], ['7590','2', 51.8683727,0.2738850, '91337', 13], ['7591','2', 51.6260267,0.0644775, '91361', 14], ['7592','2', 51.7343313,0.4690888, '91414', 15], ['7593','2', 51.5616196,0.6725367, '91436', 16], ['7594','2', 51.6369672,0.2934987, '91472', 17], ['7595','2', 51.8006951,0.9160995, '91498', 18], ['7596','2', 51.6164859,0.2537332, '91526', 19], ['7597','2', 51.5124167,0.2893644, '91624', 20], ['7598','2', 51.6486063,0.8766144, '91681', 21], ['7601','2', 51.5436926,0.6584047, '91702', 22], ['7600','2', 51.5441003,0.7005566, '91704', 23], ['7602','2', 51.7967966,1.1685953, '91716', 24], ['7604','2', 51.6880941,-0.0047242, '89719', 25], ['7603','2', 51.5767455,0.7216818, '91722', 26], ['7605','2', 51.7117169,0.1405504, '91753', 27], ['7606','2', 51.7728596,0.0399180, '91787', 28], ['7607','2', 51.4922891,0.3624243, '91926', 29], ['7608','2', 51.5517220,0.4642066, '91960', 30], ['7609','2', 51.9444614,0.3476073, '92124', 31], ['7610','2', 51.9123505,0.9580785, '92208', 32], ['7611','2', 51.5328139,0.7813913, '92240', 33], ['7612','2', 51.5335417,0.7098914, '92242', 34], ['7613','2', 51.7355868,0.4685497, '92284', 35], ['7614','2', 51.8883394,1.1559155, '92357', 36], ['7615','2', 51.4847938,0.3460144, '92409', 37], ['7616','2', 51.7908438,1.1537264, '92456', 38], ['7617','2', 51.8752039,0.5750553, '92669', 39], ['7618','2', 51.5275013,0.4365491, '92696', 40], ['7619','2', 51.5506345,0.7334270, '92828', 41], ['7620','2', 52.0849389,0.6420125, '92913', 42], ['7621','2', 51.4989188,0.2553580, '92916', 43], ['7622','2', 51.7754060,0.0753374, '92933', 44], ['7623','2', 51.8844137,0.9064190, '92973', 45], ['7624','2', 51.7903145,0.1229789, '93202', 46], ['7625','2', 51.7031442,0.2226661, '93221', 47], ['7626','2', 51.6811253,0.0023374, '93383', 48], ['7627','2', 51.5370092,0.6979235, '93451', 49], ['7628','3', 51.6759907,0.2794890, '93545', 50], ['7629','3', 51.7168731,0.4186387, '93616', 51], ['7630','1', 51.5958752,0.5646689, '93693', 52], ['7631','1', 51.9354147,0.9609137, '93710', 53], ]; 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)); } } }