Vediamo... ho un link in cui nell'evento onclick vorrei che succedesse un acceso/spento... quindi ho fatto questo script, non funzionante naturalmente... sob!

codice:
//TRA I TAG SCRIPT

function clic() {


if (cont == 1) {

document.getElementById(id).style.backgroundImage="url('spento.gif'); background-repeat: repeat-x;"
cont = 0;

}

else {

document.getElementById(id).style.backgroundImage="url('acceso.gif'); background-repeat: repeat-x;"
cont = 1;

}

}


//NEL BODY

ACCESO-SPENTO

Il problema è che non riconosce l'elemento!


Grazie ancora e a presto!