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