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 = [ ['7533','2', 51.8859926,0.5333892, '87997', 1], ['7534','2', 51.7671076,0.1064516, '88010', 2], ['7535','2', 51.5496579,0.5605594, '88012', 3], ['7536','2', 51.6428604,0.0880514, '88077', 4], ['7537','2', 51.5252112,0.5673484, '88152', 5], ['7538','2', 51.5517220,0.4642066, '88332', 6], ['7539','2', 51.7649642,0.0886729, '88377', 7], ['7540','2', 51.9701390,0.9809187, '88494', 8], ['7541','2', 51.7939769,1.1599690, '88508', 9], ['7542','2', 51.5133490,0.6048009, '88571', 10], ['7543','2', 51.5884318,0.4994017, '88745', 11], ['7544','2', 51.9839874,0.3569074, '88829', 12], ['7545','2', 51.4987633,0.3147092, '88855', 13], ['7546','2', 51.7369262,0.5089995, '88930', 14], ['7547','2', 51.7972054,1.1498152, '88950', 15], ['7548','2', 51.6981951,0.1407627, '89007', 16], ['7549','2', 51.8338200,1.1555494, '89181', 17], ['7550','2', 52.0248189,0.2594576, '89186', 18], ['7551','2', 51.5619143,0.6540354, '89243', 19], ['7552','2', 51.6176827,0.6431700, '89244', 20], ['7553','2', 51.8108776,1.1594075, '89442', 21], ['7554','2', 51.7627092,0.1427985, '89481', 22], ['7555','2', 51.7119317,0.0336134, '89547', 23], ['7556','2', 51.5339801,0.7933451, '89634', 24], ['7557','2', 52.0158460,0.5633220, '89653', 25], ['7559','2', 51.8034637,1.1267295, '89697', 26], ['7560','2', 51.5628977,0.6581391, '89832', 27], ['7561','2', 52.0939139,0.2960779, '89871', 28], ['7562','2', 51.7475688,0.0721760, '89929', 29], ['7563','2', 51.7463702,0.4669073, '89939', 30], ['7564','2', 51.5609726,0.6533319, '89973', 31], ['7565','2', 51.9458729,1.0650481, '90012', 32], ['7566','2', 51.6421391,0.0440486, '90043', 33], ['7567','2', 51.5720664,0.4748740, '90103', 34], ['7568','2', 51.6541817,0.8236024, '90149', 35], ['7569','2', 51.6264903,0.5524281, '90157', 36], ['7570','2', 51.8890375,0.9263501, '90171', 37], ['7571','2', 51.5776977,0.7162954, '90388', 38], ['7572','2', 51.4954954,0.2688919, '90458', 39], ['7573','2', 51.8868945,0.9387195, '90465', 40], ['7575','2', 51.6260267,0.0644775, '90522', 41], ['7574','2', 51.5556343,0.4772588, '90523', 42], ['7576','2', 51.9662268,0.4487790, '13:52', 43], ['7577','2', 51.5335417,0.7098914, '90743', 44], ['7578','2', 51.5469606,0.7296149, '90751', 45], ['7580','2', 51.8875629,0.8932305, '90810', 46], ['7581','2', 51.7042042,0.5183006, '90846', 47], ['7582','2', 51.7111721,0.4372136, '90870', 48], ['7583','2', 51.5446028,0.5619147, '90915', 49], ['7584','2', 51.6874368,0.2341071, '90922', 50], ['7585','2', 51.8907278,0.9447392, '90973', 51], ['7587','2', 51.6322317,0.2977724, '91087', 52], ['7588','2', 51.8604612,1.2827475, '91120', 53], ['7589','2', 51.5113988,0.4803207, '91188', 54], ['7590','3', 51.8683727,0.2738850, '91337', 55], ['7591','3', 51.6260267,0.0644775, '91361', 56], ['7592','3', 51.7343313,0.4690888, '91414', 57], ['7593','1', 51.5616196,0.6725367, '91436', 58], ['7594','1', 51.6369672,0.2934987, '91472', 59], ['7595','1', 51.8006951,0.9160995, '91498', 60], ]; 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.6835922,0.0012908); 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)); } } }