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 = [ ['6834','2', 51.9027868,0.7857168, '61578', 1], ['6835','2', 51.4602891,0.3658284, '61601', 2], ['6836','2', 51.7995032,0.7068804, '61605', 3], ['6837','2', 51.6097906,0.4351014, '61627', 4], ['6838','2', 51.5773149,0.5975774, '61654', 5], ['6839','2', 51.9939110,0.5519370, '61685', 6], ['6840','2', 51.5410663,0.7103155, '61782', 7], ['6841','2', 52.0106778,0.5601802, '61809', 8], ['6842','2', 51.7804425,0.6082270, '61821', 9], ['6843','2', 51.8804415,0.7861841, '61846', 10], ['6844','2', 52.0085846,0.5305441, '61898', 11], ['6845','2', 51.6353006,0.0764113, '61974', 12], ['6846','2', 51.8657054,0.3544496, '61996', 13], ['6847','2', 51.8907711,0.5467368, '62002', 14], ['6848','2', 51.7572899,0.1470574, '62073', 15], ['6849','2', 51.9025421,0.8788137, '62108', 16], ['6850','2', 51.8843539,0.5333948, '62159', 17], ['6851','2', 51.5504079,0.6906215, '62214', 18], ['6852','2', 51.8565490,0.5312736, '62233', 19], ['6853','2', 51.6302892,0.0506400, '62275', 20], ['6854','2', 51.6353006,0.0764113, '62303', 21], ['6855','2', 51.8879909,0.9028007, '62349', 22], ['6856','2', 51.8092925,0.6529995, '62370', 23], ['6857','2', 51.5562356,0.7258666, '62421', 24], ['6858','2', 51.5705213,0.4108742, '62469', 25], ['6859','2', 51.6322317,0.2977724, '62549', 26], ['6860','2', 51.8440995,0.8601937, '62555', 27], ['6861','2', 51.8814252,0.9609483, '62621', 28], ['6862','2', 51.8059762,0.7383102, '62658', 29], ['6863','2', 51.4906712,0.2941416, '62817', 30], ['6864','2', 51.5939305,0.2856566, '62859', 31], ['6865','2', 51.7150298,0.4488817, '63066', 32], ['6866','2', 51.4797654,0.3273398, '63088', 33], ['6868','2', 51.8574624,0.4402522, '63153', 34], ['6867','2', 51.8123214,0.2164870, '63156', 35], ['6869','2', 51.7852666,1.0529322, '63164', 36], ['6870','2', 51.7839584,0.1116362, '63301', 37], ['6871','2', 51.5391378,0.6974441, '63312', 38], ['6872','2', 51.7126364,0.1522257, '63321', 39], ['6873','2', 51.7852666,1.0529322, '63331', 40], ['6874','2', 51.5849728,0.4489571, '63349', 41], ['6875','2', 51.8879909,0.9028007, '63350', 42], ['6880','2', 51.5474994,0.3474153, '63402', 43], ['6876','2', 51.9757273,0.2672506, '63408', 44], ['6877','2', 51.5329848,0.7205272, '63411', 45], ['6878','2', 51.8814252,0.9609483, '63445', 46], ['6879','2', 51.9335542,0.9063551, '63449', 47], ['6881','2', 51.5760166,0.4887948, '63459', 48], ['6882','2', 51.9086612,0.9463409, '63522', 49], ['6883','2', 51.8158735,0.2130924, '63560', 50], ['6885','2', 51.8094720,1.1503017, '63736', 51], ['6886','2', 51.8832729,0.6929092, '63842', 52], ['6887','2', 51.5529087,0.5907021, '63916', 53], ['6888','2', 51.8820627,0.9328428, '63950', 54], ['6889','2', 51.8819363,0.2046247, '63981', 55], ['6890','2', 51.8005007,1.1277192, '63993', 56], ['6891','2', 51.6218811,0.0777977, '64026', 57], ['6892','2', 51.5483071,0.7051917, '64086', 58], ['6894','2', 51.8801916,0.8668231, '64170', 59], ['6893','2', 51.5565794,0.5578127, '64194', 60], ['6895','2', 51.8750176,0.5753059, '64315', 61], ['6896','2', 51.4671881,0.3641382, '64338', 62], ['6898','2', 51.5214724,0.6038980, '64580', 63], ['6900','2', 51.7453937,0.6917433, '64625', 64], ['6901','2', 51.4746484,0.3294780, '64626', 65], ['6902','2', 51.6363307,0.0568779, '64685', 66], ['6904','2', 51.4778536,0.3341472, '64804', 67], ['6905','2', 51.8469089,1.2713044, '64877', 68], ['6906','3', 51.7212787,0.6619401, '64984', 69], ['6909','3', 51.7776544,0.0940405, '65023', 70], ['6910','3', 51.8199737,0.7468135, '65063', 71], ['6912','3', 51.8768768,0.3715727, '65141', 72], ['6911','3', 51.7788946,0.5428986, '65160', 73], ['6913','1', 51.5414735,0.6714711, '65213', 74], ['6914','1', 51.5319835,0.4599838, '65242', 75], ['6915','1', 51.5661741,0.4709335, '65278', 76], ]; 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(52.0085846,0.5305441); 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)); } } }