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.6102964,0.5187059, '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.8045435,1.1457777, 'Station_12_Clacton', 15], ['31','1', 51.9457631,1.0659255, 'Station_17_Manningtree', 16], ['32','1', 51.8375224,1.2477329, 'Station_18_Frinton', 17], ['33','1', 51.8433224,1.1257132, '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 = [ ['8684','2', 51.5476216,0.7216353, '143714', 1], ['8686','2', 51.8260243,1.2077596, '143756', 2], ['8687','2', 51.9105752,0.9179042, '143767', 3], ['8688','2', 51.6006629,0.6880647, '143824', 4], ['8689','2', 51.8219895,0.7839836, '143961', 5], ['8690','2', 51.9600409,0.9933733, '144097', 6], ['8691','2', 51.7243334,0.4498478, '144150', 7], ['8692','2', 51.8284513,0.7037869, '144159', 8], ['8694','2', 51.6373804,0.2191512, '144250', 9], ['8695','2', 51.5286427,0.5993258, '144491', 10], ['8696','2', 51.5138241,0.4149251, '144518', 11], ['8697','2', 51.8165044,0.2622537, '144627', 12], ['8698','2', 51.5212206,0.5878652, '144786', 13], ['8699','2', 51.8325140,0.9107516, '144825', 14], ['8700','2', 51.8814324,0.2153914, '145092', 15], ['8701','2', 51.9889269,0.5472408, '145170', 16], ['8702','2', 51.7548582,0.5401677, '145216', 17], ['8703','2', 51.8453830,0.8748277, '145220', 18], ['8704','2', 51.8096229,1.1503665, '145260', 19], ['8705','2', 51.6812188,0.0023621, '145352', 20], ['8706','2', 51.8734342,0.9167480, '145479', 21], ['8707','2', 51.4592387,0.3573981, '145597', 22], ['8708','2', 51.5563057,0.3625939, '145690', 23], ['8709','2', 51.5484103,0.7033112, '145728', 24], ['8710','2', 51.7305993,0.0467372, '145846', 25], ['8711','2', 51.5928109,0.6156206, '146008', 26], ['8712','2', 51.6755591,0.2795475, '146029', 27], ['8713','2', 51.5652417,0.5769420, '146101', 28], ['8716','2', 51.5199600,0.6158256, '146171', 29], ['8717','2', 51.5367111,0.7558066, '146274', 30], ['8718','2', 51.5316838,0.2772361, '146378', 31], ['8719','2', 51.5939618,0.4720423, '146453', 32], ['8720','2', 51.5084151,0.2799031, '146587', 33], ['8721','2', 51.8654788,0.4165435, '146700', 34], ['8722','2', 51.6755308,0.8541106, '146730', 35], ['8723','3', 51.6813730,0.4350944, '146989', 36], ['8724','3', 51.5559140,0.2488940, '147006', 37], ['8725','3', 51.8000642,0.6990648, '147150', 38], ['8726','1', 51.6812188,0.0023621, '147180', 39], ['8727','1', 51.7781735,0.9196112, '147203', 40], ['8728','1', 51.4786333,0.2499857, '147247', 41], ['8729','1', 51.4838624,0.2893034, '147272', 42], ['8730','1', 51.7591490,0.1325649, '147287', 43], ]; 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)); } } }