var nazwy = new Array('obrazek', 'piesek', 'kotek', 'czekolada') for (x=0; x<nazwy.length; x++) { var obr[x] = new Array(); obr[x]['on'] = new Image(); obr[x]['on'].src = nazwy[x]+'on.jpg'; obr[x]['off'] = new Image(); obr[x]['off'].src = nazwy[x]+'off.jpg' }
var nazwy = new Array('obrazek', 'piesek', 'kotek', 'czekolada')
for (x=0; x<nazwy.length; x++) {
var obr[x] = new Array();
obr[x]['on'] = new Image();
obr[x]['on'].src = nazwy[x]+'on.jpg';
obr[x]['off'] = new Image();
obr[x]['off'].src = nazwy[x]+'off.jpg'
}
document.getElementById('obrazek').onmouseover = function() {
this.src = obr[1]['on'];
}
document.getElementById('obrazek').onmouseout = function() {
this.src = obr[1]['off'];
}