function hilitemap(el){
  el.src = el.getAttribute("mapalt");
  var keyid = 'k'+el.getAttribute("pointno");
  var img = document.getElementById(keyid);
  img.src = img.getAttribute("keyalt");
}

function hilitekey(el){
  el.src = el.getAttribute("keyalt");
  var mapid = 'm'+el.getAttribute("pointno");
  var img = document.getElementById(mapid);
  img.src = img.getAttribute("mapalt");
}

function unhilitemap(el){
  el.src = el.getAttribute("origsrc");
  var keyid = 'k'+el.getAttribute("pointno");
  var img2 = document.getElementById(keyid);
  img2.src = img2.getAttribute("origsrc");
}

function unhilitekey(el){
  el.src = el.getAttribute("origsrc");
  var mapid = 'm'+el.getAttribute("pointno");
  var img = document.getElementById(mapid);
  img.src = img.getAttribute("origsrc");
}

function hilitelocationsetup(){ 

  var y = document.getElementsByTagName("img");

  for (var i=0;i<y.length;i++){
    
    var mapalt = y[i].getAttribute("mapalt");
    if (!mapalt) continue;

    var pointno = y[i].getAttribute("pointno");
    
    y[i].onclick = new Function("gotosite(this);");
    y[i].onmouseover = new Function("hilitemap(this);this.style.cursor='pointer';");
    y[i].onmouseout = new Function("unhilitemap(this);");
    
    y[i].setAttribute("origsrc",y[i].src);
     
    }

  for (var j=0;j<y.length;j++){
    
    var keyalt = y[j].getAttribute("keyalt");
    if (!keyalt) continue;

    var pointno = y[j].getAttribute("pointno");
    
    y[j].onclick = new Function("gotosite(this);");
    y[j].onmouseover = new Function("hilitekey(this);this.style.cursor='pointer';");
    y[j].onmouseout = new Function("unhilitekey(this);");
    
    y[j].setAttribute("origsrc",y[j].src);
    
  }

}
