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

