var dir = "images/";
var oldImg = "";
var selectedImg = "";

function doOver( source, whatImage ) {
  if (source != selectedImg) document.getElementById(source).src = dir + whatImage;
}

function doOut( source, whatImage ) {
  if (source != selectedImg) document.getElementById(source).src = dir + whatImage;
}

function doSelect( source, whatImage, display ) {
  oldImg = selectedImg;
  selectedImg = source;
  document.getElementById(source).src = dir + whatImage;
  
  if (source != "img1" && oldImg == "img1") document.getElementById("img1").src = dir + "aboutusup.gif";
  if (source != "img2" && oldImg == "img2") document.getElementById("img2").src = dir + "productsup.gif";
  if (source != "img3" && oldImg == "img3") document.getElementById("img3").src = dir + "servicesup.gif";
  if (source != "img4" && oldImg == "img4") document.getElementById("img4").src = dir + "clientsup.gif";
  if (source != "img5" && oldImg == "img5") document.getElementById("img5").src = dir + "newsup.gif";
  if (source != "img6" && oldImg == "img6") document.getElementById("img6").src = dir + "contactusup.gif";
  
  showWhat(display);  
}