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 = [ ['7509','2', 51.8786228,0.7354996, '86550', 1], ['7510','2', 51.7295752,0.3083438, '86584', 2], ['7511','2', 51.9175977,0.9058088, '86598', 3], ['7512','2', 51.6545442,0.1865433, '86618', 4], ['7513','2', 51.8849981,0.9162574, '86640', 5], ['7514','2', 51.4604598,0.3449433, '86684', 6], ['7516','2', 51.7064310,0.2451348, '86730', 7], ['7517','2', 51.9117334,0.9202740, '86749', 8], ['7518','2', 51.5047913,0.3730518, '86808', 9], ['7519','2', 51.8967561,0.8915073, '86813', 10], ['7520','2', 51.5487314,0.8112681, '86900', 11], ['7521','2', 51.7990956,1.1460540, '86932', 12], ['7522','2', 51.7753828,0.5927134, '87044', 13], ['7523','2', 51.8160306,0.5226408, '87106', 14], ['7524','2', 51.5773364,0.3374460, '87358', 15], ['7525','2', 51.5517220,0.4642066, '87405', 16], ['7526','2', 51.9491987,0.1248505, '87467', 17], ['7527','2', 51.6397586,0.2594743, '87586', 18], ['7528','2', 51.7639821,0.8052270, '87620', 19], ['7529','2', 51.9098015,0.8964807, '87691', 20], ['7530','2', 51.5773149,0.5975774, '87710', 21], ['7531','2', 51.7463702,0.4669073, '87888', 22], ['7533','2', 51.8859926,0.5333892, '87997', 23], ['7534','2', 51.7671076,0.1064516, '88010', 24], ['7535','2', 51.5496579,0.5605594, '88012', 25], ['7536','2', 51.6428604,0.0880514, '88077', 26], ['7537','2', 51.5252112,0.5673484, '88152', 27], ['7538','2', 51.5517220,0.4642066, '88332', 28], ['7539','2', 51.7649642,0.0886729, '88377', 29], ['7540','2', 51.9701390,0.9809187, '88494', 30], ['7541','2', 51.7939769,1.1599690, '88508', 31], ['7542','2', 51.5133490,0.6048009, '88571', 32], ['7543','2', 51.5884318,0.4994017, '88745', 33], ['7544','2', 51.9839874,0.3569074, '88829', 34], ['7545','2', 51.4987633,0.3147092, '88855', 35], ['7546','2', 51.7369262,0.5089995, '88930', 36], ['7547','2', 51.7972054,1.1498152, '88950', 37], ['7548','2', 51.6981951,0.1407627, '89007', 38], ['7549','2', 51.8338200,1.1555494, '89181', 39], ['7550','2', 52.0248189,0.2594576, '89186', 40], ['7551','2', 51.5619143,0.6540354, '89243', 41], ['7552','2', 51.6176827,0.6431700, '89244', 42], ['7553','2', 51.8108776,1.1594075, '89442', 43], ['7554','2', 51.7627092,0.1427985, '89481', 44], ['7555','2', 51.7119317,0.0336134, '89547', 45], ['7556','2', 51.5339801,0.7933451, '89634', 46], ['7557','2', 52.0158460,0.5633220, '89653', 47], ['7559','2', 51.8034637,1.1267295, '89697', 48], ['7560','2', 51.5628977,0.6581391, '89832', 49], ['7561','2', 52.0939139,0.2960779, '89871', 50], ['7562','2', 51.7475688,0.0721760, '89929', 51], ['7563','2', 51.7463702,0.4669073, '89939', 52], ['7564','2', 51.5609726,0.6533319, '89973', 53], ['7565','2', 51.9458729,1.0650481, '90012', 54], ['7566','2', 51.6421391,0.0440486, '90043', 55], ['7567','3', 51.5720664,0.4748740, '90103', 56], ['7568','3', 51.6541817,0.8236024, '90149', 57], ['7569','3', 51.6264903,0.5524281, '90157', 58], ['7570','3', 51.8890375,0.9263501, '90171', 59], ]; 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)); } } }