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.7837176,0.1377936, '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 = [ ['7170','2', 51.5505329,0.7289543, '72434', 1], ['7171','2', 51.6905395,0.4854721, '72443', 2], ['7172','2', 51.7647179,0.5453505, '72454', 3], ['7173','2', 51.9444887,0.6367897, '72517', 4], ['7174','2', 51.6218188,0.2697965, '72557', 5], ['7175','2', 51.7887742,0.1316355, '72599', 6], ['7176','2', 51.5519771,0.7123360, '72613', 7], ['7177','2', 51.9445393,0.6369150, '72623', 8], ['7178','2', 51.5469741,0.7255357, '72664', 9], ['7179','2', 51.8561147,1.2578241, '72716', 10], ['7180','2', 51.6152610,0.7449249, '72737', 11], ['7181','2', 51.5759971,0.4152279, '72870', 12], ['7182','2', 51.8851323,1.0335617, '72928', 13], ['7184','2', 51.6218125,0.0492668, '72955', 14], ['7183','2', 51.6165142,0.7437238, '72956', 15], ['7185','2', 51.5806694,0.4774641, '72984', 16], ['7186','2', 51.7779468,0.9194452, '73037', 17], ['7187','2', 51.5497679,0.7466454, '73089', 18], ['7188','2', 51.7953918,1.1610533, '73096', 19], ['7189','2', 51.9370106,1.0174226, '73106', 20], ['7190','2', 51.5459269,0.7077123, '73164', 21], ['7191','2', 51.8362100,0.3988640, '73180', 22], ['7192','2', 51.8108635,1.0246465, '73240', 23], ['7193','2', 51.6827847,-0.0000071, '73325', 24], ['7194','2', 51.8219591,1.0202242, '73360', 25], ['7195','2', 51.4711438,0.3885488, '73411', 26], ['7196','2', 51.5525541,0.6114621, '73442', 27], ['7197','2', 51.8408415,1.2426952, '73457', 28], ['7198','2', 51.7151957,0.4698380, '73475', 29], ['7199','2', 51.8768848,0.6136759, '73535', 30], ['7203','2', 51.6399051,0.6762591, '73576', 31], ['7202','2', 51.7273172,0.8886862, '73588', 32], ['7201','2', 51.5816034,0.5080210, '73631', 33], ['7204','2', 51.8808192,0.9337239, '73667', 34], ['7206','2', 51.4646683,0.3718786, '73829', 35], ['7208','2', 51.5489678,0.7087440, '73920', 36], ['7209','2', 52.0020842,0.5285772, '73961', 37], ['7210','2', 51.8012852,0.2114544, '73962', 38], ['7211','2', 51.5831302,0.5342666, '73971', 39], ['7212','2', 51.6990350,0.5185410, '74048', 40], ['7213','2', 51.6811253,0.0023374, '74382', 41], ['7214','2', 51.9421547,1.0823327, '74113', 42], ['7215','2', 52.0303485,0.2431930, '74143', 43], ['7216','2', 51.9358322,0.6306767, '74155', 44], ['7217','2', 51.8377025,0.6986318, '74201', 45], ['7218','2', 51.8720723,0.8594979, '74242', 46], ['7219','2', 51.5065324,0.2892789, '74232', 47], ['7220','2', 51.9478385,0.9420664, '74251', 48], ['7221','2', 51.5545233,0.7221320, '74305', 49], ['7222','2', 51.6304538,0.0508344, '74341', 50], ['7223','2', 51.5280686,0.2806241, '74343', 51], ['7224','2', 51.5808074,0.6259270, '74444', 52], ['7225','2', 51.9260179,1.2098786, '74543', 53], ['7226','2', 51.7947189,1.1470165, '74545', 54], ['7227','2', 51.5525541,0.6114621, '74581', 55], ['7228','2', 51.5615206,0.6711081, '74608', 56], ['7229','2', 51.8619901,0.9613802, '74648', 57], ['7230','2', 51.8860181,0.2388661, '74696', 58], ['7231','2', 51.5599188,0.6534409, '74698', 59], ['7233','2', 51.6919843,0.7986484, '74939', 60], ['7234','2', 51.7572899,0.1470574, '74954', 61], ['7235','2', 51.5452549,0.6978721, '74963', 62], ['7236','2', 51.7235100,0.4509803, '75012', 63], ['7237','2', 51.6521494,0.6472157, '75038', 64], ['7238','2', 51.5630398,0.4826764, '75177', 65], ['7239','2', 51.7264770,0.4459304, '75180', 66], ['7240','2', 51.6715923,0.7148421, '75210', 67], ['7241','2', 51.7768960,0.1198940, '75253', 68], ['7242','2', 51.9279193,0.5064627, '75276', 69], ['7243','2', 51.7651454,0.1281225, '75368', 70], ['7244','2', 51.6581442,0.4704250, '75435', 71], ['7245','2', 51.5494701,0.5580633, '75456', 72], ['7246','2', 51.7730893,0.1063110, '75493', 73], ['7247','2', 51.7756788,0.1139373, '75525', 74], ['7248','3', 51.5240883,0.4623543, '75596', 75], ['7249','3', 51.7654866,0.6888100, '75597', 76], ['7250','3', 51.5830489,0.4710404, '75613', 77], ['7251','3', 51.5836214,0.4247367, '75658', 78], ['7252','1', 51.9324404,0.2514062, '75769', 79], ]; 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)); } } }