  var objt;  
  var objb;  
  var topop=100;  
  var botop=0;  
  var speed=35;  
  var topnum=0;
  var botnum=1;  
  var test=0;  
  var pics=new Array('images/index_image_1.jpg','images/index_image_2.jpg','images/index_image_3.jpg','images/index_image_4.jpg','images/index_image_5.jpg','images/index_image_6.jpg','images/index_image_7.jpg','images/index_image_8.jpg');
window.onload=function() { 

   objt=document.getElementById('top');  
   objb=document.getElementById('bot');  
   fadeout();
   mouseover(); 
}
function fadeout() {
if(test==0) {   
   topop--;   
   botop++;
 }
if(objt.filters) {
   objt.style.filter='alpha(opacity='+topop+')';
   objb.style.filter='alpha(opacity='+botop+')';
 }
else {
   objt.style.opacity=topop/100;
   objb.style.opacity=botop/100;
 }
if(topop==0){
   topnum+=2;
if(topnum>pics.length-1){
   topnum=0; //if the number of images is odd change this value to 1;
 }
   objt.src=pics[topnum];
   test=1;
 }
if(test==1){
   topop++;
   botop--;
 }if(topop==100){
   botnum+=2;
if(botnum>pics.length-1){
   botnum=1; //if the number of images is odd change this value to 0;
 }
   objb.src=pics[botnum];
   test=0;
 }
setTimeout('fadeout()',speed);
 }