function preloadImages() {
  var imageObj = new Image();
  var images = [
    "__.png",
    "ag.png",
    "ba.png",
    "bi.png",
    "de.png",
    "mg.png",
    "go.png",
    "la.png",
    "tu.png"
  ];
  for (var i = 0; i < images.length; i++) {
    imageObj.src = images[i];
  }
}

// Update the logo with the given image name.
function u(name) {
  var img = document.getElementById("logo");
  img.src = name + ".png";
  var xml_http = new XMLHttpRequest();
  xml_http.open("GET", "/garden/cgi-bin/u?name=" + name);
  xml_http.send(null);
}

// Reset the logo with the empty image.
function r() {
  u("__");
}

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17416373-1']);
_gaq.push(['_trackPageview']);

(function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();

window.onload = preloadImages;

