Ho inserito questo script in javascript trovato sul sito di html.it
Il problema è che adesso vorrei fare le foto un po' meno opache e più chiare.
Cosa devo cambiare?
function newImage(arg) {
if (document.img) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.img && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.img) {
bottom_03_over = newImage("img/bottom_03-over.jpg");
bottom_05_over = newImage("img/bottom_05-over.jpg");
bottom_07_over = newImage("img/bottom_07-over.jpg");
bottom_09_over = newImage("img/bottom_09-over.jpg");
bottom_11_over = newImage("img/bottom_11-over.jpg");
bottom_13_over = newImage("img/bottom_13-over.jpg");
bottom_15_over = newImage("img/bottom_15-over.jpg");
bottom_34_over = newImage("img/bottom_34-over.jpg");
bottom_36_over = newImage("img/bottom_36-over.jpg");
bottom_38_over = newImage("img/bottom_38-over.jpg");
bottom_40_over = newImage("img/bottom_40-over.jpg");
bottom_42_over = newImage("img/bottom_42-over.jpg");
bottom_44_over = newImage("img/bottom_44-over.jpg");
bottom_46_over = newImage("img/bottom_46-over.jpg");
preloadFlag = true;
}
}
var baseopacity=30
function slowhigh(which2){ //funzione opacizzante
imgobj=which2
browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
highlighting=setInterval("gradualfade(imgobj)",50)
}
function slowlow(which2){
cleartimer()
instantset(baseopacity)
}
function instantset(degree){
if (browserdetect=="mozilla")
imgobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
imgobj.filters.alpha.opacity=degree
}
function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}
function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.sty le.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}