	// IDX Broker Slideshow version 2.0
	// Copyright ©2012 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 time8fbfdcba06out = 5000;
	var c8fbfdcba06wi = 0;
	
	// i8fbfdcba06sf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var i8fbfdcba06sf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swap8fbfdcba06fade setup function
	function swap8fbfdcba06fade()
	{
		//if the timer is not already going
		if(i8fbfdcba06sf.clock == null)
		{
			//copy the image object 
			i8fbfdcba06sf.obj = arguments[0];
			
			//copy the image src argument 
			i8fbfdcba06sf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof i8fbfdcba06sf.obj.style.opacity != 'undefined')
			{
				i8fbfdcba06sf.type = 'w3c';
			}
			else if(typeof i8fbfdcba06sf.obj.style.MozOpacity != 'undefined')
			{
				i8fbfdcba06sf.type = 'moz';
			}
			else if(typeof i8fbfdcba06sf.obj.style.KhtmlOpacity != 'undefined')
			{
				i8fbfdcba06sf.type = 'khtml';
			}
			else if(typeof i8fbfdcba06sf.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
				i8fbfdcba06sf.type = (i8fbfdcba06sf.obj.filters.length > 0 && typeof i8fbfdcba06sf.obj.filters.alpha == 'object' && typeof i8fbfdcba06sf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				i8fbfdcba06sf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				i8fbfdcba06sf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(i8fbfdcba06sf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swap8fbfdcba06fade is two distinct transitions
				i8fbfdcba06sf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				i8fbfdcba06sf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				i8fbfdcba06sf.clock = setInterval('i8fbfdcba06sf.swap8fbfdcba06fade()', i8fbfdcba06sf.length/i8fbfdcba06sf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				i8fbfdcba06sf.obj.src = i8fbfdcba06sf.src;
			}
			
		}
	};
	
	
	//swap8fbfdcba06fade timer function
	i8fbfdcba06sf.swap8fbfdcba06fade = function()
	{
		//increase or reduce the counter on an exponential scale
		i8fbfdcba06sf.count = (i8fbfdcba06sf.fade) ? i8fbfdcba06sf.count * 0.9 : (i8fbfdcba06sf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(i8fbfdcba06sf.count < (1 / i8fbfdcba06sf.resolution))
		{
			//clear the timer
			clearInterval(i8fbfdcba06sf.clock);
			i8fbfdcba06sf.clock = null;
	
			//do the image swap
			i8fbfdcba06sf.obj.src = i8fbfdcba06sf.src;
	
			//reverse the fade direction flag
			i8fbfdcba06sf.fade = false;
			
			//restart the timer
			i8fbfdcba06sf.clock = setInterval('i8fbfdcba06sf.swap8fbfdcba06fade()', i8fbfdcba06sf.length/i8fbfdcba06sf.resolution);
	
		}
		
		//if the counter has reached the top
		if(i8fbfdcba06sf.count > (1 - (1 / i8fbfdcba06sf.resolution)))
		{
			//clear the timer
			clearInterval(i8fbfdcba06sf.clock);
			i8fbfdcba06sf.clock = null;
	
			//reset the fade direction flag
			i8fbfdcba06sf.fade = true;
			
			//reset the counter
			i8fbfdcba06sf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(i8fbfdcba06sf.type)
		{
			case 'ie' :
				i8fbfdcba06sf.obj.filters.alpha.opacity = i8fbfdcba06sf.count * 100;
				break;
				
			case 'khtml' :
				i8fbfdcba06sf.obj.style.KhtmlOpacity = i8fbfdcba06sf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				i8fbfdcba06sf.obj.style.MozOpacity = (i8fbfdcba06sf.count == 1 ? 0.9999999 : i8fbfdcba06sf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				i8fbfdcba06sf.obj.style.opacity = (i8fbfdcba06sf.count == 1 ? 0.9999999 : i8fbfdcba06sf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-8fbfdcba06-slideshow { text-align: center; width: 300px;  }');
	document.writeln('.IDX-8fbfdcba06-image { width: 250px;  }');
	document.writeln('#IDX-8fbfdcba06-slideshowImage span { text-align: center; }');
	document.writeln('</style>');

