

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

changePicture = function() {
    ranNum = Math.floor(Math.random()*7)+1;
    name = "bild"+ranNum;
    document.all.image.className=name;
    switch (ranNum) {
    case 1:
      document.getElementById("word").firstChild.data = "MADERA";
    break;
    case 2:
      document.getElementById("word").firstChild.data = "ACEITE";
    break;
    case 3:
      document.getElementById("word").firstChild.data = " ARROZ";
    break;
    case 4:
      document.getElementById("word").firstChild.data = "SAL";
    break;
    case 5:
      document.getElementById("word").firstChild.data = "SALSA";
    break;
    case 6:
      document.getElementById("word").firstChild.data = "TÉ";
    break;
    case 7:
      document.getElementById("word").firstChild.data = "VINAGRE";
    break;
}
    }

  window.onload= changePicture;