// JavaScript Document
//var m_imgCount = 6;
var RotImgsSpeed = 3000;
//var sBaseStr = "filter : progid:DXImageTransform.Microsoft.RandomDissolve ( ";
var m_oParentDiv;
var m_nSelIndex, m_nOldIndex = 0;

function rdl_doInit(){
	do {
		m_nSelIndex = Math.abs( Math.round( Math.random() * m_imgCount - 1 ) );
	} while ( m_nSelIndex == m_nOldIndex );
	
	m_oParentDiv = document.all( "photo_body" );
	rdl_play();
}

function rdl_play() {
	with ( m_oParentDiv ) {
		if ( children[m_nOldIndex].style.visibility == "hidden" ) 
			children[m_nSelIndex].style.visibility = "visible";
		else 
			children[m_nSelIndex].style.visibility = "hidden";
		
		filters[0].apply();
		
		if ( children[m_nOldIndex].style.visibility == "hidden" ) 
			children[m_nOldIndex].style.visibility = "visible";
		else 
			children[m_nOldIndex].style.visibility = "hidden";
			
		if ( children[m_nSelIndex].style.visibility == "hidden" ) 
			children[m_nSelIndex].style.visibility = "visible";
		else 
			children[m_nSelIndex].style.visibility = "hidden";
			
		filters[0].play();
	}
	
	m_nSelIndex += m_nOldIndex;
	m_nOldIndex = m_nSelIndex - m_nOldIndex;
	m_nSelIndex = m_nSelIndex - m_nOldIndex;
}

function photo_doInit()
{
	IntervalPhotoId = setInterval("rdl_doInit();", RotImgsSpeed);
}

