<div id="r_def">
<div id="right" class="div">
<img src="images/r_2.jpg" id="imj_1" style="position:absolute; opacity_r: 0; filter: alpha(opacity_r=0);" />
<img src="images/r_3.jpg" id="imj_2" style="position:absolute;opacity_r: 0; filter: alpha(opacity_r=0); " />
<img src="images/r_4.jpg" id="imj_3" style="position:absolute;opacity_r: 0; filter: alpha(opacity_r=0); " />
<img src="images/r_5.jpg" id="imj_4" style="position:absolute;opacity_r: 0; filter: alpha(opacity_r=0); " />
<img src="images/r_1.jpg" id="imj_5" style="position:absolute;opacity_r: 0; filter: alpha(opacity_r=0); " />
</div>
<script type="text/javascript">
var image_count_r = 15;
var interval_r = 5000; //пауза
var time_out_r = 15; //скорость смены картинки
var i_r = 15;
var timeout_r;
var opacity_r = 100;
function change_image_r() {
opacity_r--;
var j_r = i_r + 1;
var current_image_r = 'imj_' + i_r;
if (i_r == image_count_r) j_r = 1;
var next_image_r = 'imj_' + j_r;
document.getElementById(current_image_r).style.opacity_r=opacity_r/100;
document.getElementById(current_image_r).style.filter='alpha(opacity_r='+opacity_r+')';
document.getElementById(next_image_r).style.opacity_r= (100-opacity)/100;
document.getElementById(next_image_r).style.filter=' alpha(opacity_r='+(100-opacity_r)+')';
timeout_r = setTimeout("change_image_r()", time_out_r);
if (opacity_r==1) {
opacity_r = 100;
clearTimeout(timeout_r);
i_r++;
if (i_r>image_count_r) i_r=11;
timeout_r = setTimeout("change_image_r()", interval_r);
}
}
change_image_r()
</script>
<div id="right_1" class="div">Правая колонка Меню Меню Меню Меню</div>
</div>
Вроде всё сменил, а смена не работает, в чём моя ошибка?