var timerID = 0;
var tImageID = 0;

function UpdateTimer() {
	if( timerID ) {
		clearTimeout( timerID );
		clockID = 0;
	}
	
	DoTransition();
	timerID = setTimeout( "UpdateTimer()", 7500 );
}

function DoTransition() {
	tImageID++;
	if( tImageID >= ixf.imgs.length ) {
		tImageID = 0;
	}
	crossfade( $('photolayer'), ixf.cache[tImageID].src, '2' );
}

function InitializeTransitions( obevent ) {
	timerID  = setTimeout( "UpdateTimer()", 5000 );
}

Event.observe( window, 'load', InitializeTransitions, false );
