function showBox(x,y,w,h) {
  var mnImg = document.getElementById("mainImg");
  var box = document.createElement("img");
  box.style.position = "absolute";
  box.src = idot.src;
  box.width = w;
  box.height = h;
  box.style.top = mnImg.offsetTop+y+"px";
  box.style.left = mnImg.offsetLeft+x+"px";
  box.id = "outlineBox";
  var main = document.getElementById("sturMain");
  box.style.visibility = "visible";
  main.appendChild(box);
  flashBox("light");
}

function flashBox(color) {
  var box;
  if (box = document.getElementById("outlineBox")) {
    if (color == "light") {
      box.style.borderColor = "#F4E5C5";
      window.setTimeout("flashBox(\"dark\")",400);
    } else {
      box.style.borderColor = "#E5B219";
      window.setTimeout("flashBox(\"light\")",400);
    }
  }
}

function hideBox() {
  var box = document.getElementById("outlineBox");
  box.style.visibility = "hidden";
  var main = document.getElementById("sturMain");
  main.removeChild(box);
}

var idot = new Image();
function preLoad() {
  idot.src = "/projects/sturbridge/img/idot.gif";
}

window.onload = preLoad;
