

function nextImgMy()

{



   var i= getIndex()
  $img1=$('imgid_'+i)
  
  var i= getIndex()
  $img2=$('imgid_'+i)
  
  $img2.setStyle({
                display: 'block'
  });
  
 $img1.fade({ duration: 3.0, from: 1, to: 0 });


    setTimeout("nextImgMy()",5000);

  

}

function getIndex(){
     var total=window.totalImgs
    if( window.curent<total-1){

        window.curent++;

    }

    else

    {

         window.curent=0

    }
  return window.curent
}
