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 = [ ['6974','2', 51.7319044,0.4745573, '67356', 1], ['6975','2', 51.9910062,0.2131421, '67360', 2], ['6976','2', 51.7804425,0.6082270, '67367', 3], ['6977','2', 51.8450392,1.2665779, '67373', 4], ['6978','2', 51.4954954,0.2688919, '67396', 5], ['6979','2', 51.8961015,0.2163467, '67461', 6], ['6980','2', 51.5181581,0.4186643, '67506', 7], ['6981','2', 51.6948725,0.1393167, '67528', 8], ['6982','2', 51.8450392,1.2665779, '67534', 9], ['6983','2', 51.8657054,0.3544496, '67538', 10], ['6984','2', 51.6379861,0.4131464, '67554', 11], ['6985','2', 51.6263453,0.2371897, '67598', 12], ['6986','2', 51.5958752,0.5646689, '67604', 13], ['6987','2', 51.7490381,0.0968072, '67610', 14], ['6988','2', 51.5322228,0.7478545, '67690', 15], ['6989','2', 51.8813905,0.9284681, '67715', 16], ['6990','2', 51.5308399,0.7428715, '', 17], ['6991','2', 51.9474267,1.2554988, '67872', 18], ['6992','2', 51.7905970,1.1536562, '47882', 19], ['6993','2', 51.7572899,0.1470574, '67886', 20], ['6994','2', 51.4987633,0.3147092, '67887', 21], ['6995','2', 51.9078092,0.9661611, '67889', 22], ['6996','2', 51.8814324,0.2153914, '67897', 23], ['6997','2', 51.5976450,0.3470405, '67900', 24], ['6998','2', 51.8596157,1.1065497, '67901', 25], ['6999','2', 51.6406307,0.7986382, '67975', 26], ['7000','2', 51.7147357,0.3897221, '68001', 27], ['7001','2', 51.6057179,0.2657995, '68012', 28], ['7002','2', 51.6312202,0.3606392, '68045', 29], ['7003','2', 51.8364709,0.5889579, '68063', 30], ['7004','2', 51.7820382,0.3935848, '68183', 31], ['7005','2', 51.8977137,0.1995740, '68188', 32], ['7006','2', 51.9264014,0.7266905, '68194', 33], ['7007','2', 51.5326331,0.7604179, '68238', 34], ['7008','2', 51.7887835,1.1552994, '68247', 35], ['7009','2', 51.8086889,1.0223493, '68250', 36], ['7010','2', 51.5621563,0.4834946, '68318', 37], ['7011','2', 51.6311153,0.0706800, '68324', 38], ['7013','2', 51.5647384,0.4735165, '68322', 39], ['7014','2', 51.6019129,0.4685011, '68370', 40], ['7012','2', 51.6057179,0.2657995, '68376', 41], ['7015','2', 51.5791800,0.5146528, '68407', 42], ['7016','2', 51.4954954,0.2688919, '68434', 43], ['7017','2', 51.6359412,0.3992083, '68466', 44], ['7018','2', 51.8565380,0.9391401, '68468', 45], ['7019','2', 51.7704613,0.1030593, '68493', 46], ['7020','2', 51.6359412,0.3992083, '68523', 47], ['7021','2', 51.9002136,1.0344272, '68549', 48], ['7022','2', 51.6253008,0.4173232, '68640', 49], ['7023','2', 51.4747576,0.4215233, '68671', 50], ['7024','2', 51.9131479,1.1388726, '68704', 51], ['7025','2', 51.8638708,0.9555988, '68746', 52], ['7026','2', 51.8812002,0.8719232, '68912', 53], ['7027','2', 51.6811253,0.0023374, '68914', 54], ['7028','2', 51.8763351,0.6297132, '68940', 55], ['7029','2', 51.4947788,0.2602214, '69007', 56], ['7030','2', 51.5289973,0.4418373, '69011', 57], ['7032','2', 51.7753367,0.3158587, '69034', 58], ['7033','2', 51.5542254,0.6574789, '69040', 59], ['7034','2', 51.6943497,0.8064351, '69053', 60], ['7038','2', 51.8490047,1.2688043, '69085', 61], ['7036','2', 51.8009674,1.0850886, '69089', 62], ['7035','2', 51.7423773,0.4225680, '69090', 63], ['7037','2', 51.7109155,0.2740104, '69091', 64], ['7040','2', 51.5594659,0.4844688, '69107', 65], ['7041','2', 51.5360138,0.6847619, '69175', 66], ['7042','2', 51.5411967,0.6487709, '69230', 67], ['7043','2', 51.7282554,0.4615800, '69253', 68], ['7044','2', 51.5524047,0.6649356, '69272', 69], ['7045','2', 51.9612834,0.2366605, '69303', 70], ['7047','2', 51.5701099,0.3488113, '39352', 71], ['7048','2', 51.6322317,0.2977724, '69417', 72], ['7049','2', 51.9825997,0.2138751, '69478', 73], ['7050','2', 51.6176827,0.6431700, '69480', 74], ['7051','2', 51.4971637,0.3412441, '69583', 75], ['7052','2', 51.4901763,0.3719743, '69591', 76], ['7053','2', 51.6606453,0.1827856, '69600', 77], ['7054','2', 51.4773552,0.2820159, '69634', 78], ['7056','2', 51.7343313,0.4690888, '03012018', 79], ['7055','2', 51.8744831,0.4835251, '69652', 80], ['7057','2', 51.5613684,0.7031387, '69684', 81], ['7058','2', 51.6418445,0.0486660, '69691', 82], ['7059','2', 51.5571180,0.4789490, '69718', 83], ['7060','2', 51.4632193,0.3628482, '69728', 84], ['7061','2', 51.5822621,0.7045548, '69753', 85], ['7062','2', 51.5366520,0.5627400, '69794', 86], ['7063','2', 51.5301234,0.3764948, '69801', 87], ['7064','2', 51.5955272,0.5761201, '69820', 88], ['7065','2', 51.5322228,0.7478545, '69862', 89], ['7066','2', 51.6381165,0.3213464, '69879', 90], ['7067','2', 51.8635066,0.3634950, '69890', 91], ['7068','2', 51.8783333,0.8387111, '69971', 92], ['7069','2', 51.7517973,0.5166801, '69988', 93], ['7070','2', 51.7166993,0.5914413, '69998', 94], ['7071','2', 51.9370106,1.0174226, '70004', 95], ['7072','2', 51.4772609,0.2633037, '70006', 96], ['7073','2', 51.5687133,0.6432777, '70040', 97], ['7074','2', 51.6559569,0.5363684, '70081', 98], ['7076','2', 51.9877493,0.3099457, '70148', 99], ['7079','2', 51.8608953,1.0991059, '70186', 100], ['7080','2', 51.7755901,0.7485942, '70203', 101], ['7082','2', 51.9034564,0.8899020, '70272', 102], ['7083','2', 51.6815230,0.0729941, '70370', 103], ['7084','2', 51.5063544,0.3798870, '70426', 104], ['7085','2', 51.4899226,0.3549441, '70438', 105], ['7086','2', 51.9474267,1.2554988, '70463', 106], ['7087','2', 51.6894465,0.1126463, '70473', 107], ['7088','2', 51.5360388,0.7404817, '70502', 108], ['7089','3', 51.7343313,0.4690888, '18012018', 109], ['7090','3', 51.8993401,0.8256223, '70549', 110], ['7091','3', 51.5240075,0.5845134, '70574', 111], ['7092','3', 51.7882024,0.4868821, '70603', 112], ['7094','3', 51.7166993,0.5914413, '70607', 113], ['7095','3', 51.6710795,0.3837473, '70622', 114], ['7096','3', 51.6057179,0.2657995, '70626', 115], ['7097','3', 51.5698653,0.6502648, '70627', 116], ['7098','3', 52.0180930,0.6941119, '70637', 117], ['7099','3', 51.6887415,0.5854435, '70660', 118], ['7100','3', 51.8910364,0.9373474, '70678', 119], ['7101','3', 51.6177350,0.4167136, '70711', 120], ['7102','3', 51.7006270,0.5805578, '70742', 121], ['7103','3', 51.6086267,0.5346594, '70756', 122], ['7104','1', 51.7274871,0.6682539, '70763', 123], ['7105','1', 51.5720664,0.4748740, '70795', 124], ['7106','1', 51.5386271,0.7176766, '70802', 125], ]; 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.8490047,1.2688043); 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)); } } }