Secondo me se aggiungi alle immagini la stessa funzione che richiama il div all'evento over dovrebbe funzionare.
Dovresti però cambiare la tua funzione over così:
codice:
function load(x) { document.getElementById(x).style.marginBottom = "-2px"; document.getElementById(x).style.opacity = "1.0"; } function over(x) { document.getElementById(x).style.marginBottom = "-2px"; document.getElementById(x).style.opacity = "1.0"; } function bo(x) { window.setTimeout("p('" + x + "')", 500); } function p(x) { document.getElementById(x).style.marginBottom = "-30px"; document.getElementById(x).style.opacity = "0.0"; cnt = 0; } function button(x, y) { document.getElementById(y).style.width = "60px"; document.getElementById(y).style.height = "60px"; document.getElementById(x).style.width = "60px"; document.getElementById(x).style.height = "60px"; } function out(x, y) { document.getElementById(y).style.width = "40px"; document.getElementById(y).style.height = "40px"; document.getElementById(x).style.width = "40px"; document.getElementById(x).style.height = "40px"; }
a così:
codice:
function over(x,n_btn) {document.getElementById(x).style.marginBottom = "-2px"; document.getElementById(x).style.opacity = "1.0"; botton("button_"+n_btn,n_btn); }
così lei ti richiama il button_one o two ma solo se il parametro è verificato... ho cambiato i parametri che la funzione over si aspetta quindi, al div menu aggiungera ,'' così gli passi il secondo parametro ma essendo vuoto non fa nulla, se invece è !='' da vuoto e != null allora richiama la funzione button passandogli button_XXX e XXX... Prova così e fammi sapere.