	// IDX Broker Slideshow version 2.0
	// Copyright ©2010 All rights reserved.
	// This script exists soley for the purposes of allowing real estate professionals to display
	// their property information easily on their own web site. All other use prohibited.
	
	var c;
		
	var time429ad03ebbout = 7000;
	var c429ad03ebbwi = 0;
	
	// i429ad03ebbsf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var i429ad03ebbsf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swap429ad03ebbfade setup function
	function swap429ad03ebbfade()
	{
		//if the timer is not already going
		if(i429ad03ebbsf.clock == null)
		{
			//copy the image object 
			i429ad03ebbsf.obj = arguments[0];
			
			//copy the image src argument 
			i429ad03ebbsf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof i429ad03ebbsf.obj.style.opacity != 'undefined')
			{
				i429ad03ebbsf.type = 'w3c';
			}
			else if(typeof i429ad03ebbsf.obj.style.MozOpacity != 'undefined')
			{
				i429ad03ebbsf.type = 'moz';
			}
			else if(typeof i429ad03ebbsf.obj.style.KhtmlOpacity != 'undefined')
			{
				i429ad03ebbsf.type = 'khtml';
			}
			else if(typeof i429ad03ebbsf.obj.filters == 'object')
			{
				//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
				//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
				//then the returned value type, which should be a number, but in mac/ie5 is an empty string
				i429ad03ebbsf.type = (i429ad03ebbsf.obj.filters.length > 0 && typeof i429ad03ebbsf.obj.filters.alpha == 'object' && typeof i429ad03ebbsf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				i429ad03ebbsf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				i429ad03ebbsf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(i429ad03ebbsf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swap429ad03ebbfade is two distinct transitions
				i429ad03ebbsf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				i429ad03ebbsf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				i429ad03ebbsf.clock = setInterval('i429ad03ebbsf.swap429ad03ebbfade()', i429ad03ebbsf.length/i429ad03ebbsf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				i429ad03ebbsf.obj.src = i429ad03ebbsf.src;
			}
			
		}
	};
	
	
	//swap429ad03ebbfade timer function
	i429ad03ebbsf.swap429ad03ebbfade = function()
	{
		//increase or reduce the counter on an exponential scale
		i429ad03ebbsf.count = (i429ad03ebbsf.fade) ? i429ad03ebbsf.count * 0.9 : (i429ad03ebbsf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(i429ad03ebbsf.count < (1 / i429ad03ebbsf.resolution))
		{
			//clear the timer
			clearInterval(i429ad03ebbsf.clock);
			i429ad03ebbsf.clock = null;
	
			//do the image swap
			i429ad03ebbsf.obj.src = i429ad03ebbsf.src;
	
			//reverse the fade direction flag
			i429ad03ebbsf.fade = false;
			
			//restart the timer
			i429ad03ebbsf.clock = setInterval('i429ad03ebbsf.swap429ad03ebbfade()', i429ad03ebbsf.length/i429ad03ebbsf.resolution);
	
		}
		
		//if the counter has reached the top
		if(i429ad03ebbsf.count > (1 - (1 / i429ad03ebbsf.resolution)))
		{
			//clear the timer
			clearInterval(i429ad03ebbsf.clock);
			i429ad03ebbsf.clock = null;
	
			//reset the fade direction flag
			i429ad03ebbsf.fade = true;
			
			//reset the counter
			i429ad03ebbsf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(i429ad03ebbsf.type)
		{
			case 'ie' :
				i429ad03ebbsf.obj.filters.alpha.opacity = i429ad03ebbsf.count * 100;
				break;
				
			case 'khtml' :
				i429ad03ebbsf.obj.style.KhtmlOpacity = i429ad03ebbsf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				i429ad03ebbsf.obj.style.MozOpacity = (i429ad03ebbsf.count == 1 ? 0.9999999 : i429ad03ebbsf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				i429ad03ebbsf.obj.style.opacity = (i429ad03ebbsf.count == 1 ? 0.9999999 : i429ad03ebbsf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-429ad03ebb-slideshow { text-align: center;  }');
	document.writeln('.IDX-429ad03ebb-image { height: 300px;  }');
	document.writeln('#IDX-429ad03ebb-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
