	// 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 timeMainPageShowout = 5000;
	var cMainPageShowwi = 0;
	
	// iMainPageShowsf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var iMainPageShowsf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swapMainPageShowfade setup function
	function swapMainPageShowfade()
	{
		//if the timer is not already going
		if(iMainPageShowsf.clock == null)
		{
			//copy the image object 
			iMainPageShowsf.obj = arguments[0];
			
			//copy the image src argument 
			iMainPageShowsf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof iMainPageShowsf.obj.style.opacity != 'undefined')
			{
				iMainPageShowsf.type = 'w3c';
			}
			else if(typeof iMainPageShowsf.obj.style.MozOpacity != 'undefined')
			{
				iMainPageShowsf.type = 'moz';
			}
			else if(typeof iMainPageShowsf.obj.style.KhtmlOpacity != 'undefined')
			{
				iMainPageShowsf.type = 'khtml';
			}
			else if(typeof iMainPageShowsf.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
				iMainPageShowsf.type = (iMainPageShowsf.obj.filters.length > 0 && typeof iMainPageShowsf.obj.filters.alpha == 'object' && typeof iMainPageShowsf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				iMainPageShowsf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				iMainPageShowsf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(iMainPageShowsf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swapMainPageShowfade is two distinct transitions
				iMainPageShowsf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				iMainPageShowsf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				iMainPageShowsf.clock = setInterval('iMainPageShowsf.swapMainPageShowfade()', iMainPageShowsf.length/iMainPageShowsf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				iMainPageShowsf.obj.src = iMainPageShowsf.src;
			}
			
		}
	};
	
	
	//swapMainPageShowfade timer function
	iMainPageShowsf.swapMainPageShowfade = function()
	{
		//increase or reduce the counter on an exponential scale
		iMainPageShowsf.count = (iMainPageShowsf.fade) ? iMainPageShowsf.count * 0.9 : (iMainPageShowsf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(iMainPageShowsf.count < (1 / iMainPageShowsf.resolution))
		{
			//clear the timer
			clearInterval(iMainPageShowsf.clock);
			iMainPageShowsf.clock = null;
	
			//do the image swap
			iMainPageShowsf.obj.src = iMainPageShowsf.src;
	
			//reverse the fade direction flag
			iMainPageShowsf.fade = false;
			
			//restart the timer
			iMainPageShowsf.clock = setInterval('iMainPageShowsf.swapMainPageShowfade()', iMainPageShowsf.length/iMainPageShowsf.resolution);
	
		}
		
		//if the counter has reached the top
		if(iMainPageShowsf.count > (1 - (1 / iMainPageShowsf.resolution)))
		{
			//clear the timer
			clearInterval(iMainPageShowsf.clock);
			iMainPageShowsf.clock = null;
	
			//reset the fade direction flag
			iMainPageShowsf.fade = true;
			
			//reset the counter
			iMainPageShowsf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(iMainPageShowsf.type)
		{
			case 'ie' :
				iMainPageShowsf.obj.filters.alpha.opacity = iMainPageShowsf.count * 100;
				break;
				
			case 'khtml' :
				iMainPageShowsf.obj.style.KhtmlOpacity = iMainPageShowsf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iMainPageShowsf.obj.style.MozOpacity = (iMainPageShowsf.count == 1 ? 0.9999999 : iMainPageShowsf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iMainPageShowsf.obj.style.opacity = (iMainPageShowsf.count == 1 ? 0.9999999 : iMainPageShowsf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-MainPageShow-slideshow { text-align: center;  }');
	document.writeln('.IDX-MainPageShow-image { height: 300px;  }');
	document.writeln('#IDX-MainPageShow-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextMainPageShow = 1;
	prevMainPageShow = 4 - 1;

	document.writeln('<div id="IDX-MainPageShow-slideshow">');
	document.writeln('<div id="IDX-MainPageShow-slideshowImage">');
	document.writeln('<span><a href="" id="IDX-MainPageShow-ssImageURL" class="IDX-MainPageShow-ssLinkText"><img id="IDX-MainPageShow-ssImage" name="MainPageShow-ssImage" alt="Slideshow image" border="0"  class="IDX-MainPageShow-image" src="http://photos-4.idxco.com/080b38daae9864bfc0cbcf730e54682e4b5825969" ></a></span>');
	document.writeln('</div>');
	document.writeln('<div id="IDX-MainPageShow-priceLine"></div>');
	document.writeln('<div id="IDX-MainPageShow-addressLine"></div>');
	document.writeln('<div id="IDX-MainPageShow-cszLine"></div>');
	document.writeln('<div id="IDX-MainPageShow-bedLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-MainPageShow-bathLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-MainPageShow-remarkLine" style="display:none;"></div>');
	
	document.writeln('</div>');

	function playMainPageShow()
	{
		
		
		urlVarMainPageShow = '<a href="'+propertiesMainPageShow[cMainPageShowwi][6]+'" class="IDX-MainPageShow-ssLinkText">';
		swapMainPageShowfade(document.getElementById('IDX-MainPageShow-ssImage'), preLoadMainPageShow.src, '1', ' ');
		document.getElementById('IDX-MainPageShow-ssImageURL').href = propertiesMainPageShow[cMainPageShowwi][6];
		document.getElementById('IDX-MainPageShow-priceLine').innerHTML = urlVarMainPageShow+'$'+propertiesMainPageShow[cMainPageShowwi][0]+'</a>';
		document.getElementById('IDX-MainPageShow-addressLine').innerHTML =  urlVarMainPageShow+propertiesMainPageShow[cMainPageShowwi][1]+'</a>';
		document.getElementById('IDX-MainPageShow-cszLine').innerHTML = urlVarMainPageShow+propertiesMainPageShow[cMainPageShowwi][2]+'</a>';
		document.getElementById('IDX-MainPageShow-bedLine').innerHTML = urlVarMainPageShow+'Beds: '+propertiesMainPageShow[cMainPageShowwi][7]+'</a>';
		document.getElementById('IDX-MainPageShow-bathLine').innerHTML = urlVarMainPageShow+'Baths: '+propertiesMainPageShow[cMainPageShowwi][8]+'</a>';
		document.getElementById('IDX-MainPageShow-remarkLine').innerHTML = urlVarMainPageShow+propertiesMainPageShow[cMainPageShowwi][9]+'</a>';
		
		preLoadMainPageShow = new Image();
		preLoadMainPageShow.src = propertiesMainPageShow[nextMainPageShow][3];
		
		updateMainPageShow();
		
		cMainPageShow = setTimeout('playMainPageShow()', timeMainPageShowout);	
		
		
	} // end play()
	function updateMainPageShow()
	{		
		cMainPageShowwi = nextMainPageShow;		
		genNextMainPageShow();
		genPrevMainPageShow();
		
	}
	function genNextMainPageShow()
	{
		nextMainPageShow = cMainPageShowwi + 1;
		if (nextMainPageShow >= 4)
			nextMainPageShow = 0;
	} // end genNext
	function genPrevMainPageShow()
	{
		prevMainPageShow = cMainPageShowwi - 1;
		if (prevMainPageShow < 0)
			prevMainPageShow = 4 - 1;
	} // end genPrev

	var propertiesMainPageShow = new Array(4);
	propertiesMainPageShow[0] = new Array('249,900','6 Collins Hill Rd','Lytle, TX 78052 ','http://photos-4.idxco.com/080b38daae9864bfc0cbcf730e54682e4b5825969','825969','080','http://idx.southtexashomeseller.com/idx/6070/details.php?listingID=825969&idxID=080','1','2','This beautiful pecan orchard has 10 sprawling acres with app...');
	propertiesMainPageShow[1] = new Array('133,400','16396 Wheeler Rd','Atascosa, TX 78002 ','http://photos-4.idxco.com/080b11b7ddb95b321d982e365772e1a01e3821105','821105','080','http://idx.southtexashomeseller.com/idx/6070/details.php?listingID=821105&idxID=080','4','2','Great home with lots of space inside, outside in additional ...');
	propertiesMainPageShow[2] = new Array('118,000','14410 Mangold Way','Atascosa, TX 78002 ','http://photos-4.idxco.com/080f025712fd7c58564b15e8aa1babe1aac824700','824700','080','http://idx.southtexashomeseller.com/idx/6070/details.php?listingID=824700&idxID=080','3','2','...');
	propertiesMainPageShow[3] = new Array('47,900','325 Meadowview Dr','Lytle, TX 78052 ','http://photos-4.idxco.com/080496b0565d659343a4a69c8e692d20a01828696','828696','080','http://idx.southtexashomeseller.com/idx/6070/details.php?listingID=828696&idxID=080','','','...');
	var urlVarMainPageShow;
	var preLoadMainPageShow = new Image();
	preLoadMainPageShow.src = propertiesMainPageShow[cMainPageShowwi][3];
	onLoad = playMainPageShow();
