<!--
// ------------------------------------
// Purpose - display a branch's address
// Author  - timothy
// ------------------------------------
function subBranchInfo(intBranch) {
  strAddress = 'Andrew Sheret Limited - ' + arrBranch[intBranch][2] + '<BR>';
  strAddress = strAddress + arrBranch[intBranch][3] + '<BR>';
  strAddress = strAddress + arrBranch[intBranch][4] + '<BR>';
  strAddress = strAddress + 'Phone: ' + arrBranch[intBranch][5];
  strAddress = strAddress + '&nbsp;&nbsp;&nbsp;&nbsp;';
  strAddress = strAddress + ' Fax: ' + arrBranch[intBranch][6] + '<BR>';
  strAddress = strAddress + arrBranch[intBranch][7] + '<BR>';
  strAddress = strAddress + arrBranch[intBranch][8] + '<BR>';
  document.getElementById("branchinfo").innerHTML = strAddress;
  for (var i = 0; i <= arrBranch.length - 1; i++) {
    document.getElementById(i).style.color = '#5e3509';
    document.getElementById(i).innerHTML = arrBranch[i][2];
  }
  document.getElementById(intBranch).style.color = '#f99b37';
  document.getElementById(intBranch).innerHTML = '[ ' + arrBranch[intBranch][2] + ' ]';
}

// ------------------------------------------
// Purpose - display a Google Map to a branch
// Author  - timothy
// ------------------------------------------
function subGoogleMap(intBranch) {
  numLat = arrBranch[intBranch][0];
  numLong = arrBranch[intBranch][1];
  strAddress = arrBranch[intBranch][3];
  if (GBrowserIsCompatible()) {
    var intZoom = 16;
    var map = new GMap2(document.getElementById("gmap"));
    map.setCenter(new GLatLng(numLat, numLong),  intZoom);
    map.setMapType(G_NORMAL_MAP);
    var marker = new GMarker(map.getCenter());
    map.addOverlay(marker);
    map.openInfoWindow(map.getCenter(), document.createTextNode(strAddress));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
  }
}

// ----------------------------------------------
// Purpose - display a Google Map and the address
// Author  - timothy
// ----------------------------------------------
function subBranchAll(intBranch) {
  subBranchInfo(intBranch);
  subGoogleMap(intBranch);
}
// -->

