<doctype html Public "_//w3c// DTD html 4.0 Frameset//En"
"_The_latest_version_/frameset.dta">
<html>
<head>
<title>Затухание слайдов</title>
<script>
var slide = new Array;
var pictureName = new Array("scrin1.jpg", "scrin2.jpg", "scrin3.jpg", "scrin4.jpg","scrin5.jpg", "img3.jpg");
for (var i = 0; i < pictureName.length; i++) {
slide[i] = new Image();
slide[i].src = pictureName[i];
}
var l=100;
var k=0;
var i=0;
function next(){
l=l-1;
document.getElementById("before").width=400;
document.getElementById("before").height=300;
document.getElementById("before_div").style.filter ="alpha(opacity="+l+")";
k++;
document.getElementById("after").width=400;
document.getElementById("after").height=300;
document.getElementById("after_div").style.filter ="alpha(opacity="+k+")";
setTimeout("next()",50);
if(k==100)return;
}
function Slaid(){
if(i<=4){
l=100; k=0;
document.getElementById("before").src=pictureName[i];
i++
document.getElementById("after").src=pictureName[i];
next();
}
if(i==5){
l=100; k=0;
document.getElementById("before").src=pictureName[i];
i=0;
document.getElementById("after").src=pictureName[i];
next();
}
setTimeout('Slaid()',5000);
}
</script>
<style>
.pic { position: absolute; top: 40px; left: 10px }
</style>
<body onload="setTimeout('Slaid()',1000)">
<div id="before_div" class="pic"><img id="before" src="scrin1.jpg" width=400 height=300></div>
<div id="after_div" class="pic"><img id="after" src="scrin2.jpg" width=400 height=300></div>
</body>
</html>
|