<!-- <![CDATA[

var TIME=(time.duration*1000) + (time.whait*1000);

function head_photo_rotator(){
  show=Math.round(Math.random()*(head_photos.length-1));
  while(show==last_image) show=Math.round(Math.random()*(head_photos.length-1));
  
  last_image=show;
  var img=new Image();
  img.src=myHost+'content/iface/'+head_photos[show]+'.jpg';
  
  
  show2=Math.round(Math.random()*(head_photos.length-1));
  while(show2==last_image) show2=Math.round(Math.random()*(head_photos.length-1));
  
  last_image=show2;
  var img2=new Image();
  img2.src=myHost+'content/iface/'+head_photos[show2]+'.jpg';
  Effect.Fade('head_photo',{
    duration:time.duration,
    afterFinish:function(){
      $('head_photo').src=img2.src;
      setTimeout(function(){
        Effect.Appear('head_photo',{
          duration:time.duration,
          afterFinish:function(){
            $('head_photo_bg').src=img.src;
            setTimeout(head_photo_rotator,TIME);
          }
        });
      },TIME);
      /*Effect.Appear('head_photo',{
        duration:time.duration,
        afterFinish:function(){
          setTimeout(head_photo_rotator,TIME);
        }
      });*/
    }
  });
}


Event.observe(window,'load',function(){setTimeout(head_photo_rotator,time.whait*1000)});
// ]]> -->
