	// 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 timewhittierout = 60000;
	var cwhittierwi = 0;
	
	// iwhittiersf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var iwhittiersf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swapwhittierfade setup function
	function swapwhittierfade()
	{
		//if the timer is not already going
		if(iwhittiersf.clock == null)
		{
			//copy the image object 
			iwhittiersf.obj = arguments[0];
			
			//copy the image src argument 
			iwhittiersf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof iwhittiersf.obj.style.opacity != 'undefined')
			{
				iwhittiersf.type = 'w3c';
			}
			else if(typeof iwhittiersf.obj.style.MozOpacity != 'undefined')
			{
				iwhittiersf.type = 'moz';
			}
			else if(typeof iwhittiersf.obj.style.KhtmlOpacity != 'undefined')
			{
				iwhittiersf.type = 'khtml';
			}
			else if(typeof iwhittiersf.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
				iwhittiersf.type = (iwhittiersf.obj.filters.length > 0 && typeof iwhittiersf.obj.filters.alpha == 'object' && typeof iwhittiersf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				iwhittiersf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				iwhittiersf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(iwhittiersf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swapwhittierfade is two distinct transitions
				iwhittiersf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				iwhittiersf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				iwhittiersf.clock = setInterval('iwhittiersf.swapwhittierfade()', iwhittiersf.length/iwhittiersf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				iwhittiersf.obj.src = iwhittiersf.src;
			}
			
		}
	};
	
	
	//swapwhittierfade timer function
	iwhittiersf.swapwhittierfade = function()
	{
		//increase or reduce the counter on an exponential scale
		iwhittiersf.count = (iwhittiersf.fade) ? iwhittiersf.count * 0.9 : (iwhittiersf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(iwhittiersf.count < (1 / iwhittiersf.resolution))
		{
			//clear the timer
			clearInterval(iwhittiersf.clock);
			iwhittiersf.clock = null;
	
			//do the image swap
			iwhittiersf.obj.src = iwhittiersf.src;
	
			//reverse the fade direction flag
			iwhittiersf.fade = false;
			
			//restart the timer
			iwhittiersf.clock = setInterval('iwhittiersf.swapwhittierfade()', iwhittiersf.length/iwhittiersf.resolution);
	
		}
		
		//if the counter has reached the top
		if(iwhittiersf.count > (1 - (1 / iwhittiersf.resolution)))
		{
			//clear the timer
			clearInterval(iwhittiersf.clock);
			iwhittiersf.clock = null;
	
			//reset the fade direction flag
			iwhittiersf.fade = true;
			
			//reset the counter
			iwhittiersf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(iwhittiersf.type)
		{
			case 'ie' :
				iwhittiersf.obj.filters.alpha.opacity = iwhittiersf.count * 100;
				break;
				
			case 'khtml' :
				iwhittiersf.obj.style.KhtmlOpacity = iwhittiersf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iwhittiersf.obj.style.MozOpacity = (iwhittiersf.count == 1 ? 0.9999999 : iwhittiersf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iwhittiersf.obj.style.opacity = (iwhittiersf.count == 1 ? 0.9999999 : iwhittiersf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-whittier-slideshow { text-align: center; width: 200px;  }');
	document.writeln('.IDX-whittier-image { width: 200px; height: 121px;  }');
	document.writeln('#IDX-whittier-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextwhittier = 1;
	prevwhittier = 5 - 1;

	document.writeln('<div id="IDX-whittier-slideshow">');
	document.writeln('<div id="IDX-whittier-slideshowImage">');
	document.writeln('<span><a href="" id="IDX-whittier-ssImageURL" class="IDX-whittier-ssLinkText"><img id="IDX-whittier-ssImage" name="whittier-ssImage" alt="Slideshow image" border="0"  class="IDX-whittier-image" src="http://photos-6.idxco.com/102a6eb0b6d66465d526d576b787caabbeb1061319" ></a></span>');
	document.writeln('</div>');
	document.writeln('<div id="IDX-whittier-priceLine"></div>');
	document.writeln('<div id="IDX-whittier-addressLine"></div>');
	document.writeln('<div id="IDX-whittier-cszLine"></div>');
	document.writeln('<div id="IDX-whittier-bedLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-whittier-bathLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-whittier-remarkLine" style="display:none;"></div>');
	
	document.writeln('</div>');

	function playwhittier()
	{
		
		
		urlVarwhittier = '<a href="'+propertieswhittier[cwhittierwi][6]+'" class="IDX-whittier-ssLinkText">';
		swapwhittierfade(document.getElementById('IDX-whittier-ssImage'), preLoadwhittier.src, '1', ' ');
		document.getElementById('IDX-whittier-ssImageURL').href = propertieswhittier[cwhittierwi][6];
		document.getElementById('IDX-whittier-priceLine').innerHTML = urlVarwhittier+'$'+propertieswhittier[cwhittierwi][0]+'</a>';
		document.getElementById('IDX-whittier-addressLine').innerHTML =  urlVarwhittier+propertieswhittier[cwhittierwi][1]+'</a>';
		document.getElementById('IDX-whittier-cszLine').innerHTML = urlVarwhittier+propertieswhittier[cwhittierwi][2]+'</a>';
		document.getElementById('IDX-whittier-bedLine').innerHTML = urlVarwhittier+'Beds: '+propertieswhittier[cwhittierwi][7]+'</a>';
		document.getElementById('IDX-whittier-bathLine').innerHTML = urlVarwhittier+'Baths: '+propertieswhittier[cwhittierwi][8]+'</a>';
		document.getElementById('IDX-whittier-remarkLine').innerHTML = urlVarwhittier+propertieswhittier[cwhittierwi][9]+'</a>';
		
		preLoadwhittier = new Image();
		preLoadwhittier.src = propertieswhittier[nextwhittier][3];
		
		updatewhittier();
		
		cwhittier = setTimeout('playwhittier()', timewhittierout);	
		
		
	} // end play()
	function updatewhittier()
	{		
		cwhittierwi = nextwhittier;		
		genNextwhittier();
		genPrevwhittier();
		
	}
	function genNextwhittier()
	{
		nextwhittier = cwhittierwi + 1;
		if (nextwhittier >= 5)
			nextwhittier = 0;
	} // end genNext
	function genPrevwhittier()
	{
		prevwhittier = cwhittierwi - 1;
		if (prevwhittier < 0)
			prevwhittier = 5 - 1;
	} // end genPrev

	var propertieswhittier = new Array(5);
	propertieswhittier[0] = new Array('385,000','2834 CHAMPA ST','Denver, CO 80205 ','http://photos-6.idxco.com/102a6eb0b6d66465d526d576b787caabbeb1061319','1061319','102','http://makingdenverhome.idxco.com/idx/4378/details.php?listingID=1061319&idxID=102','3','2','1 block from park,updated, Carrera marble, subway tile, hard...');
	propertieswhittier[1] = new Array('362,500','3015 CALIFORNIA ST','Denver, CO 80205 ','http://photos-6.idxco.com/10263f4d554d9973d5aded9662f90366cba1063133','1063133','102','http://makingdenverhome.idxco.com/idx/4378/details.php?listingID=1063133&idxID=102','3','2','Wonderful House! Nicely updated in Historic Curtis Park w ov...');
	propertieswhittier[2] = new Array('349,900','3030 FRANKLIN ST','Denver, CO 80205 ','http://photos-6.idxco.com/1028434ce2abb9a423a4c162e93baaed04c1063075','1063075','102','http://makingdenverhome.idxco.com/idx/4378/details.php?listingID=1063075&idxID=102','5','3','UPDATED 2 STORY VICTORIAN WITH A HUGE LOT IN WHAT 5280 MAGAZ...');
	propertieswhittier[3] = new Array('345,000','2431 OGDEN ST','Denver, CO 80205 ','http://photos-6.idxco.com/102d265021f52825ec8e091b67eaff82c311060421','1060421','102','http://makingdenverhome.idxco.com/idx/4378/details.php?listingID=1060421&idxID=102','4','2','This Whittier Victorian is centrally located five minutes fr...');
	propertieswhittier[4] = new Array('330,000','2669 MARION ST','Denver, CO 80205 ','http://photos-6.idxco.com/1022ec9e1ae211c814207e5d81bac1776cc1058148','1058148','102','http://makingdenverhome.idxco.com/idx/4378/details.php?listingID=1058148&idxID=102','3','4','SPACIOUS NEWER HOME IN THE HEART OF WHITTIER READY FOR YOU T...');
	var urlVarwhittier;
	var preLoadwhittier = new Image();
	preLoadwhittier.src = propertieswhittier[cwhittierwi][3];
	onLoad = playwhittier();

