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.7782500,0.1541817, '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 = [ ['7224','2', 51.5808074,0.6259270, '74444', 1], ['7225','2', 51.9260179,1.2098786, '74543', 2], ['7226','2', 51.7947189,1.1470165, '74545', 3], ['7227','2', 51.5525541,0.6114621, '74581', 4], ['7228','2', 51.5615206,0.6711081, '74608', 5], ['7229','2', 51.8619901,0.9613802, '74648', 6], ['7230','2', 51.8860181,0.2388661, '74696', 7], ['7231','2', 51.5599188,0.6534409, '74698', 8], ['7233','2', 51.6919843,0.7986484, '74939', 9], ['7234','2', 51.7572899,0.1470574, '74954', 10], ['7235','2', 51.5452549,0.6978721, '74963', 11], ['7236','2', 51.7235100,0.4509803, '75012', 12], ['7237','2', 51.6521494,0.6472157, '75038', 13], ['7238','2', 51.5630398,0.4826764, '75177', 14], ['7239','2', 51.7264770,0.4459304, '75180', 15], ['7240','2', 51.6715923,0.7148421, '75210', 16], ['7241','2', 51.7768960,0.1198940, '75253', 17], ['7242','2', 51.9279193,0.5064627, '75276', 18], ['7243','2', 51.7651454,0.1281225, '75368', 19], ['7244','2', 51.6581442,0.4704250, '75435', 20], ['7245','2', 51.5494701,0.5580633, '75456', 21], ['7246','2', 51.7730893,0.1063110, '75493', 22], ['7247','2', 51.7756788,0.1139373, '75525', 23], ['7248','2', 51.5240883,0.4623543, '75596', 24], ['7249','2', 51.7654866,0.6888100, '75597', 25], ['7250','2', 51.5830489,0.4710404, '75613', 26], ['7251','2', 51.5836214,0.4247367, '75658', 27], ['7252','2', 51.9324404,0.2514062, '75769', 28], ['7255','2', 51.8098500,1.1505432, '75950', 29], ['7259','2', 51.5801099,0.5011413, '76068', 30], ['7258','2', 51.5633634,0.4982435, '76070', 31], ['7256','2', 51.4812334,0.2913284, '76075', 32], ['7257','2', 51.6003937,0.6570108, '76081', 33], ['7260','2', 52.0428110,0.4889400, '76101', 34], ['7261','2', 51.5564863,0.6865228, '76171', 35], ['7265','2', 51.6007259,0.6973298, '76221', 36], ['7262','2', 51.8163025,0.9111532, '76229', 37], ['7266','2', 51.7956370,1.1505033, '76278', 38], ['7269','2', 51.5035798,0.2369511, '76357', 39], ['7268','2', 51.8128402,0.2208126, '76371', 40], ['7270','2', 51.7598560,0.0942505, '76492', 41], ['7271','2', 51.5642514,0.5091005, '76496', 42], ['7272','2', 51.9135667,0.9251153, '76497', 43], ['7274','2', 51.5773149,0.5975774, '76541', 44], ['7273','2', 51.6936387,0.4689429, '76542', 45], ['7275','2', 51.9260380,0.6156244, '76544', 46], ['7276','2', 51.4593126,0.3676355, '76571', 47], ['7279','2', 51.5389472,0.4702760, '76741', 48], ['7280','2', 51.7970373,1.1496938, '76821', 49], ['7281','2', 51.8375754,0.3307676, '76886', 50], ['7282','2', 51.4974098,0.3387825, '76920', 51], ['7283','2', 51.6815230,0.0729941, '76962', 52], ['7284','2', 51.6112384,0.5054971, '76974', 53], ['7285','2', 51.6270944,0.5380384, '77016', 54], ['7286','2', 51.6428604,0.0880514, '77050', 55], ['7287','2', 51.5850255,0.4616490, '77141', 56], ['7288','2', 51.8854625,0.9152307, '77144', 57], ['7289','2', 51.6062232,0.5455751, '77154', 58], ['7290','2', 51.8937867,0.5503733, '77202', 59], ['7291','2', 51.5786508,0.5015698, '77245', 60], ['7292','2', 51.5402044,0.7271199, '77258', 61], ['7293','2', 51.5698653,0.6502648, '77295', 62], ['7294','2', 51.7487593,0.4893368, '77335', 63], ['7296','2', 51.6243123,0.3406587, '77347', 64], ['7298','2', 51.4830337,0.3665966, '77488', 65], ['7299','2', 51.6823897,0.0213604, '77499', 66], ['7300','2', 51.8423921,0.9965057, '77536', 67], ['7301','2', 51.8888725,0.9040389, '77580', 68], ['7302','2', 51.5360138,0.6847619, '77611', 69], ['7303','3', 51.5648997,0.5108538, '77640', 70], ['7304','3', 51.8927315,0.2117570, '77642', 71], ['7305','3', 51.5472923,0.7173744, '77702', 72], ['7306','3', 51.8876825,0.9390803, '77711', 73], ['7307','3', 51.5542530,0.6907907, '77769', 74], ['7309','3', 51.9303655,1.2514554, '77820', 75], ['7310','3', 51.7598159,0.1292131, '77828', 76], ['7311','1', 51.5737580,0.4732237, '77874', 77], ]; 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)); } } }