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

