2008-11-17 11:00:00 +00:00
|
|
|
function first(nombre){
|
|
|
|
for(i = 1; i <= nombre; i++) {
|
|
|
|
var object = document.getElementById('quadri' + i).style;
|
|
|
|
object.opacity = (0);
|
|
|
|
object.MozOpacity = (0);
|
|
|
|
object.KhtmlOpacity = (0);
|
|
|
|
object.filter = "alpha(opacity=" + 0 + ")";
|
|
|
|
}
|
2008-11-04 11:00:00 +00:00
|
|
|
if (nombre > 0) setTimeout("appel('-1','" + nombre + "')",3333);
|
2008-11-17 11:00:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function appel(num, max) {
|
|
|
|
num++;
|
|
|
|
|
|
|
|
if (num >= max) {
|
|
|
|
numb = 0;
|
|
|
|
numa = max;
|
|
|
|
num = -1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
numa = num;
|
|
|
|
numb = num + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (max > 0) {
|
|
|
|
opacity('quadri' + numa, 'quadri' + numb, 100, 0, 1000);
|
2008-11-04 11:00:00 +00:00
|
|
|
setTimeout("appel(" + num + ",'" + max + "')",3333);
|
2008-11-17 11:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function opacity(id, idd, opacStart, opacEnd, millisec) {
|
|
|
|
//speed for each frame
|
|
|
|
var speed = Math.round(millisec / 100);
|
|
|
|
var timer = 0;
|
|
|
|
|
|
|
|
//determine the direction for the blending, if start and end are the same nothing happens
|
|
|
|
if(opacStart > opacEnd) {
|
|
|
|
for(i = opacStart; i >= opacEnd; i--) {
|
|
|
|
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
|
|
|
|
j = opacStart - i;
|
|
|
|
setTimeout("changeOpac(" + j + ",'" + idd + "')",(timer * speed));
|
|
|
|
timer++;
|
|
|
|
}
|
|
|
|
} else if(opacStart < opacEnd) {
|
|
|
|
for(i = opacStart; i <= opacEnd; i++)
|
|
|
|
{
|
|
|
|
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
|
|
|
|
j = opacEnd - i;
|
|
|
|
setTimeout("changeOpac(" + j + ",'" + idd + "')",(timer * speed));
|
|
|
|
timer++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//change the opacity for different browsers
|
|
|
|
function changeOpac(opacity, id) {
|
|
|
|
var object = document.getElementById(id).style;
|
|
|
|
object.opacity = (opacity / 100);
|
|
|
|
object.MozOpacity = (opacity / 100);
|
|
|
|
object.KhtmlOpacity = (opacity / 100);
|
|
|
|
object.filter = "alpha(opacity=" + opacity + ")";
|
|
|
|
}
|