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 = [ ['8608','2', 51.8014207,1.1241588, '140607', 1], ['8609','2', 51.5212206,0.5878652, '140721', 2], ['8610','2', 51.8890375,0.9263501, '140729', 3], ['8611','2', 51.5697873,0.4854898, '140775', 4], ['8613','2', 51.4755176,0.3327466, '140831', 5], ['8614','2', 51.5612417,0.6996932, '140853', 6], ['8615','2', 51.5632684,0.5054955, '140892', 7], ['8617','2', 51.9377613,1.2604617, '140896', 8], ['8616','2', 51.5407412,0.6913428, '140901', 9], ['8618','2', 51.5925818,0.6579330, '140917', 10], ['8621','2', 51.8749586,0.4817100, '140933', 11], ['8619','2', 51.4629666,0.3727984, '140904', 12], ['8620','2', 51.6264290,0.4084905, '141010', 13], ['8623','2', 51.5789365,0.7061670, '141115', 14], ['8622','2', 51.5434689,0.7654352, '114128', 15], ['8624','2', 51.5348163,0.7007373, '114152', 16], ['8625','2', 52.0111201,0.2311248, '114168', 17], ['8626','2', 51.9493287,0.3695480, '141251', 18], ['8627','2', 51.7291044,0.6684138, '141332', 19], ['8628','2', 51.6374723,0.6184859, '141382', 20], ['8629','2', 51.7514140,0.1052296, '141491', 21], ['8631','2', 51.8737107,0.9078057, '114519', 22], ['8630','2', 51.8411822,0.9218460, '141527', 23], ['8632','2', 51.5379853,0.7862973, '141565', 24], ['8633','2', 51.7552008,0.5020578, '141678', 25], ['8634','2', 51.5081007,0.4198460, '141778', 26], ['8635','2', 51.6095740,0.5207675, '141950', 27], ['8637','2', 51.6858396,0.5879060, '142028', 28], ['8636','2', 51.7304300,0.4678043, '142032', 29], ['8639','2', 51.5517220,0.4642066, '142047', 30], ['8638','2', 51.9722277,0.7677343, '142057', 31], ['8640','2', 51.8021440,1.1498699, '142077', 32], ['8641','2', 51.6271717,0.0406912, '142079', 33], ['8642','2', 51.7471294,0.4899549, '142805', 34], ['8644','2', 51.5773073,0.3374803, '142123', 35], ['8645','2', 51.5458231,0.7073834, '142152', 36], ['8647','2', 51.9258844,0.7021626, '142185', 37], ['8646','2', 51.5540941,0.6202738, '142189', 38], ['8648','2', 51.4663489,0.3757930, '142192', 39], ['8649','2', 51.5069209,0.3534592, '142198', 40], ['8650','2', 51.9196580,0.2679050, '142357', 41], ['8651','2', 51.5327694,0.7274704, '142359', 42], ['8652','2', 52.0229129,0.2459961, '142409', 43], ['8653','2', 51.5360745,0.7337570, '142443', 44], ['8654','2', 51.5824058,0.4974328, '142558', 45], ['8655','2', 51.7895140,0.9208861, '142602', 46], ['8656','2', 51.8147303,0.6344082, '142689', 47], ['8660','2', 51.4762542,0.3369148, '142744', 48], ['8657','2', 51.8023293,0.7813590, '142712', 49], ['8658','2', 51.6832521,0.3235467, '142714', 50], ['8659','2', 51.6221573,0.5192130, '142730', 51], ['8661','2', 51.4762542,0.3369148, '142744', 52], ['8662','2', 51.5516396,0.5523969, '142858', 53], ['8663','2', 51.4814758,0.3642291, '142893', 54], ['8664','2', 51.9454305,1.0637606, '142915', 55], ['8665','2', 52.0556664,0.2139852, '142989', 56], ['8666','2', 51.8669885,0.2617997, '143062', 57], ['8667','2', 51.6342149,0.2940488, '143073', 58], ['8668','2', 51.8705311,0.5465688, '143074', 59], ['8669','2', 51.5828362,0.6977856, '143137', 60], ['8670','2', 51.7309816,0.6807239, '143141', 61], ['8671','2', 51.9108757,0.1993232, '143177', 62], ['8672','2', 51.7969234,1.1514105, '143191', 63], ['8673','2', 51.8739057,0.9159972, '143247', 64], ['8674','2', 51.6064892,0.2999032, '143275', 65], ['8675','2', 51.5869316,0.6064807, '143375', 66], ['8676','2', 51.5625539,0.4476387, '143407', 67], ['8677','2', 51.5579709,0.6676040, '143425', 68], ['8678','2', 51.8007477,0.9160404, '142482', 69], ['8680','2', 51.6589443,0.0760005, '143507', 70], ['8681','2', 51.6564758,0.0192445, '143555', 71], ['8683','2', 51.4974721,0.3451952, '143561', 72], ['8682','2', 51.8801654,0.7881285, '143562', 73], ['8684','2', 51.5476216,0.7216353, '143714', 74], ['8686','2', 51.8260243,1.2077596, '143756', 75], ['8687','2', 51.9105752,0.9179042, '143767', 76], ['8688','2', 51.6006629,0.6880647, '143824', 77], ['8689','2', 51.8219895,0.7839836, '143961', 78], ['8690','3', 51.9600409,0.9933733, '144097', 79], ['8691','3', 51.7243334,0.4498478, '144150', 80], ['8692','3', 51.8284513,0.7037869, '144159', 81], ['8694','1', 51.6373804,0.2191512, '144250', 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)); } } }