var points = new Array();
function loadGoogleMap()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("dealerLocator"));
geocoder = new GClientGeocoder();
map.addMapType(G_SATELLITE_3D_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(54.470038, -3.779297), 5);
mapElement = document.getElementById("dealerLocator");
overlayElement = document.getElementById("instructions");
overlayElement.style.zIndex = 999;
overlayElement.style.display = "block";
overlayElement.style.top = "111px";
showDealers();
}
}
function showDealers()
{
if (geocoder)
{
map.clearOverlays();
//Home logo
var fingerIcon = new GIcon();
fingerIcon.image = "images/yourLocation.gif";
fingerIcon.iconSize = new GSize(25, 28);
fingerIcon.iconAnchor = new GPoint(5, 34);
fingerIcon.infoWindowAnchor = new GPoint(5, 2);
fingerIcon.printImage = "images/yourLocation.gif";
fingerIcon.mozPrintImage = "images/yourLocation.gif";
//Dealership logo
var peugeotIcon = new GIcon();
peugeotIcon.image = "images/dealerMapPointSmall.gif";
peugeotIcon.iconSize = new GSize(25, 25);
peugeotIcon.iconAnchor = new GPoint(5, 34);
peugeotIcon.infoWindowAnchor = new GPoint(5, 2);
peugeotIcon.printImage = "images/dealerMapPoint.gif";
peugeotIcon.mozPrintImage = "images/dealerMapPoint.gif";
var marker = new GMarker(new GLatLng(51.44443, -2.586237) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml('
 | Bristol |
Clarence Road, Bristol, BS1 6PR, Tel: 0117 926 1200 Fax: 0117 926 1201 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.528444, -2.604472) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Bristol Cribbs Causeway |
Lysander Road, Cribbs Causeway, Bristol, BS10 7TS, Tel: 0117 301 1700 Fax: 0117 301 1701 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.47405, -1.88342) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Birmingham Central |
30 High St, Deritend, Birmingham, B12 0LW, Tel: 0121 766 7700 Fax: 0121 766 8140 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.502005, -1.798038) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Birmingham East |
Newport Rd, Castle Bromwich, Birmingham, B36 8BQ, Tel: 0121 747 4712 Fax: 0121 749 4243 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.380524, -1.517218) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Coventry South |
Phoenix Corner, Kenpas Highway, Coventry, CV3 6PE, Tel: 024 76411515 Fax: 024 7669 2044 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.201286, -0.631344) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Guildford |
Hurtmore Rd, Godalming, GU7 2RD, Tel: 01483 414 311 Fax: 01483 426974 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.408985, -2.913828) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Liverpool |
77 Mill Lane, Old Swan, Liverpool, L13 4EJ, Tel: 0151 254 1010 Fax: 0151 254 7317 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.445538, -1.509303) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Coventry North |
318 Holbrook Lane, Holbrooks, Coventry, CV6 4DJ, Tel: 024 76683121 Fax: 024 7663 7296 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.374268, -0.40588) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Walton |
143 Hersham Rd, Walton on Thames, KT12 1RR, Tel: 01932 797350 Fax: 01932 797351 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.415971, -2.335155) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Sale |
253 Washway Road, Sale, Greater Manchester, M33 4BL, Tel: 0161 973 8224 Fax: 0161 962 1186 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.508489, -0.339294) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Hanwell |
144-156 Uxbridge Rd , Hanwell, London, W7 3TB, Tel: 020 8832 1900 Fax: 020 8840 3293 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.602389, -1.178246) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Leicester South |
199 Narborough Road South, Leicester, LE3 2LJ, Tel: 0116 263 2700 Fax: 0116 263 2709 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.492346, -0.281487) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Chiswick |
Chiswick Roundabout, London, W4 5QD, Tel: 020 8957 3000 Fax: 020 8957 3001 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.395113, -2.149412) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Stockport |
110 Buxton Rd, Heaviley, Stockport, SK2 6PL, Tel: 0161 480 0831 Fax: 0161 474 6706 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.923067, -1.45844) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Derby |
4 Chequers Rd, Pentagon Island, Derby, DE21 6EN, Tel: 01332 361626 Fax: 01332 296268 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.617428, -1.104206) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Leicester East |
44 Stoneygate Road, Leicester, LE2 2AF, Tel: 0116 274 6800 Fax: 0116 274 6809 |  |
| More details |
');
var marker = new GMarker(new GLatLng(52.653989, -1.137337) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Leicester Central |
91 Abbey Lane, Leicester, LE4 5QW, Tel: 0116 268 8600 Fax: 0116 268 666 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.475602, -2.260748) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Manchester |
Unit 6, Manchester Industrial Estate, Water Street, Manchester, M3 4JW, Tel: 0161 834 6677 Fax: 0161 830 1700 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.405649, -0.19247) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Morden |
242 Morden Road, London, SW19 3BZ, Tel: 020 8544 8100 Fax: 0845 020 0962 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.608078, -0.275584) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Edgware |
360/366 Burnt Oak Broadway, Edgware, London, HA8 5AE, Tel: 020 8731 1000 Fax: 020 8731 1001 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.56714, -0.228302) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Brent Cross |
393 Edgware Rd, Staples Corner, London, NW2 6LN, Tel: 020 8452 0041 Fax: 020 8450 5487 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.348755, -0.100834) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Croydon |
443a Brighton Road, Croydon, CR2 6EU, Tel: 020 8668 5435 Fax: 020 8668 8146 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.772354, -2.722289) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Preston |
382 Blackpool Rd, Preston, PR2 2DS, Tel: 01772 735 811 Fax: 01772 723692 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.469912, -0.126649) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Clapham |
332-340 Clapham Road, London, SW9 9AB, Tel: 020 7720 5151 Fax: 020 7720 2163 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.498159, -2.102691) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Ashton under Lyne |
Oldham Road, Ashton under Lyne, OL7 9EG, Tel: 0161 343 1333 Fax: 0161 343 1242 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.523104, -0.039042) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | East London |
454-490 Mile End Rd, London, E1 4PE, Tel: 020 7791 9000 Fax: 020 7791 9001 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.570773, 0.083773) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Ilford |
482 Ley Street, Ilford, IG2 7BZ, Tel: 020 8518 9600 Fax: 020 8518 9601 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.380717, -1.476717) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Sheffield Central |
127 Eccleshall Road, Sheffield, S11 8HY, Tel: 0114 270 2800 Fax: 0114 272 4145 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.40311, -1.494988) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Sheffield North |
615 Penistone Road, Sheffield, S6 2HL, Tel: 0114 2856150 Fax: 0114 2856199 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.373871, -1.391543) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Sheffield South |
234 Handsworth Road, Sheffield, S13 9BS, Tel: 0114 261 1111 Fax: 0114 261 7184 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.27232, 0.523074) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Maidstone |
Mill St, Maidstone, ME15 6YD, Tel: 01622 753 333 Fax: 01622 690526 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.385426, 0.50949) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Rochester |
High St, Rochester, ME1 1HF, Tel: 01634 842 231 Fax: 01634 829477 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.8437072665051, -1.63382447450572) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Leeds |
Long Row, Horsforth, Leeds, LS18 5AP, Tel: 0845 6091060 Fax: 0113 393 3445 |  |
| More details |
');
var marker = new GMarker(new GLatLng(53.215473, -0.545585) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Lincoln |
477 - 480 High St, Lincoln, LN5 8JG, Tel: 01522 510 346 Fax: 01522 511318 |  |
| More details |
');
var marker = new GMarker(new GLatLng(51.27476, 1.079476) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Canterbury |
The Pavilion, Rhodaus Town, Canterbury, CT1 2RH, Tel: 01227 451 791 Fax: 01227 455786 |  |
| More details |
');
var marker = new GMarker(new GLatLng(54.950252, -1.61922) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Gateshead |
Lobley Hill, Bensham, Gateshead, Tyne & Wear, NE8 4YJ, Tel: 0191 493 3500 Fax: 0191 460 6945 |  |
| More details |
');
var marker = new GMarker(new GLatLng(54.997395, -1.580148) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Newcastle |
Benton Road, Newcastle upon Tyne, NE7 7DT, Tel: 0191 266 6361 Fax: 0191 270 0660 |  |
| More details |
');
var marker = new GMarker(new GLatLng(55.862067, -4.282973) , peugeotIcon);
map.addOverlay(marker);
marker.bindInfoWindowHtml(' | Glasgow |
100 Minerva Street, Glasgow, G3 8LE, Tel: 0141 248 2345 Fax: 0141 222 5917 |  |
| More details |
');
element = document.getElementById("postcode");
element.style.borderColor = '#99CCCC';
element.style.borderWidth = '1px';
element.style.borderStyle = 'solid';
}
}
function fitMap( map, points, extraZoom )
{
var bounds = new GLatLngBounds();
for (var i=0; i< points.length; i++)
{
bounds.extend(points[i]);
}
map.setZoom(map.getBoundsZoomLevel(bounds) - extraZoom);
map.setCenter(bounds.getCenter());
}
function pointTo(group)
{
var groupArrayLatLng = new Array();
var groupArrayZoom = new Array();
hideInstructions();
groupArrayLatLng[0] = new GLatLng(51.32889547080776, 0.780029296875);
groupArrayZoom[0] = 10;
groupArrayLatLng[1] = new GLatLng(51.43346414054374, -0.27191162109375);
groupArrayZoom[1] = 9;
groupArrayLatLng[2] = new GLatLng(51.48950698022106, -2.6044464111328125);
groupArrayZoom[2] = 11;
groupArrayLatLng[3] = new GLatLng(52.68137768713742, -1.38427734375);
groupArrayZoom[3] = 9;
groupArrayLatLng[4] = new GLatLng(53.558257520097406, -1.15081787109375);
groupArrayZoom[4] = 9;
groupArrayLatLng[5] = new GLatLng(53.63323922888163, -2.52685546875);
groupArrayZoom[5] = 9;
groupArrayLatLng[6] = new GLatLng(54.992585288467666, -1.5875244140625);
groupArrayZoom[6] = 11;
groupArrayLatLng[7] = new GLatLng(55.85373335071352, -4.2626953125);
groupArrayZoom[7] = 10;
map.setCenter(groupArrayLatLng[group], groupArrayZoom[group]);
}
function whereAmI()
{
element = document.getElementById("whereBox");
element.value = "Zoom level: " + map.getZoom() + " Lat/Lng: " + map.getCenter();
}
function hideInstructions()
{
overlayElement = document.getElementById("instructions");
overlayElement.style.display = "none";
}