	// IDX Broker Slideshow version 2.0
	// Copyright ©2009 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 timeNewSlideShowNameout = 5000;
	var cNewSlideShowNamewi = 0;
	
	// iNewSlideShowNamesf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var iNewSlideShowNamesf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swapNewSlideShowNamefade setup function
	function swapNewSlideShowNamefade()
	{
		//if the timer is not already going
		if(iNewSlideShowNamesf.clock == null)
		{
			//copy the image object 
			iNewSlideShowNamesf.obj = arguments[0];
			
			//copy the image src argument 
			iNewSlideShowNamesf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof iNewSlideShowNamesf.obj.style.opacity != 'undefined')
			{
				iNewSlideShowNamesf.type = 'w3c';
			}
			else if(typeof iNewSlideShowNamesf.obj.style.MozOpacity != 'undefined')
			{
				iNewSlideShowNamesf.type = 'moz';
			}
			else if(typeof iNewSlideShowNamesf.obj.style.KhtmlOpacity != 'undefined')
			{
				iNewSlideShowNamesf.type = 'khtml';
			}
			else if(typeof iNewSlideShowNamesf.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
				iNewSlideShowNamesf.type = (iNewSlideShowNamesf.obj.filters.length > 0 && typeof iNewSlideShowNamesf.obj.filters.alpha == 'object' && typeof iNewSlideShowNamesf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				iNewSlideShowNamesf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				iNewSlideShowNamesf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(iNewSlideShowNamesf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swapNewSlideShowNamefade is two distinct transitions
				iNewSlideShowNamesf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				iNewSlideShowNamesf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				iNewSlideShowNamesf.clock = setInterval('iNewSlideShowNamesf.swapNewSlideShowNamefade()', iNewSlideShowNamesf.length/iNewSlideShowNamesf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				iNewSlideShowNamesf.obj.src = iNewSlideShowNamesf.src;
			}
			
		}
	};
	
	
	//swapNewSlideShowNamefade timer function
	iNewSlideShowNamesf.swapNewSlideShowNamefade = function()
	{
		//increase or reduce the counter on an exponential scale
		iNewSlideShowNamesf.count = (iNewSlideShowNamesf.fade) ? iNewSlideShowNamesf.count * 0.9 : (iNewSlideShowNamesf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(iNewSlideShowNamesf.count < (1 / iNewSlideShowNamesf.resolution))
		{
			//clear the timer
			clearInterval(iNewSlideShowNamesf.clock);
			iNewSlideShowNamesf.clock = null;
	
			//do the image swap
			iNewSlideShowNamesf.obj.src = iNewSlideShowNamesf.src;
	
			//reverse the fade direction flag
			iNewSlideShowNamesf.fade = false;
			
			//restart the timer
			iNewSlideShowNamesf.clock = setInterval('iNewSlideShowNamesf.swapNewSlideShowNamefade()', iNewSlideShowNamesf.length/iNewSlideShowNamesf.resolution);
	
		}
		
		//if the counter has reached the top
		if(iNewSlideShowNamesf.count > (1 - (1 / iNewSlideShowNamesf.resolution)))
		{
			//clear the timer
			clearInterval(iNewSlideShowNamesf.clock);
			iNewSlideShowNamesf.clock = null;
	
			//reset the fade direction flag
			iNewSlideShowNamesf.fade = true;
			
			//reset the counter
			iNewSlideShowNamesf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(iNewSlideShowNamesf.type)
		{
			case 'ie' :
				iNewSlideShowNamesf.obj.filters.alpha.opacity = iNewSlideShowNamesf.count * 100;
				break;
				
			case 'khtml' :
				iNewSlideShowNamesf.obj.style.KhtmlOpacity = iNewSlideShowNamesf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iNewSlideShowNamesf.obj.style.MozOpacity = (iNewSlideShowNamesf.count == 1 ? 0.9999999 : iNewSlideShowNamesf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iNewSlideShowNamesf.obj.style.opacity = (iNewSlideShowNamesf.count == 1 ? 0.9999999 : iNewSlideShowNamesf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-NewSlideShowName-slideshow { text-align: center; width: 230px;  }');
	document.writeln('.IDX-NewSlideShowName-image { width: 220px; height: 158px;  }');
	document.writeln('#IDX-NewSlideShowName-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextNewSlideShowName = 1;
	prevNewSlideShowName = 10 - 1;

	document.writeln('<div id="IDX-NewSlideShowName-slideshow">');
	document.writeln('<div id="IDX-NewSlideShowName-slideshowImage">');
	document.writeln('<span><a href="" id="IDX-NewSlideShowName-ssImageURL" class="IDX-NewSlideShowName-ssLinkText"><img id="IDX-NewSlideShowName-ssImage" name="NewSlideShowName-ssImage" alt="Slideshow image" border="0"  class="IDX-NewSlideShowName-image" src="http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/3/UPSTATEMLS20099253.jpg" ></a></span>');
	document.writeln('</div>');
	document.writeln('<div id="IDX-NewSlideShowName-priceLine"></div>');
	document.writeln('<div id="IDX-NewSlideShowName-addressLine"></div>');
	document.writeln('<div id="IDX-NewSlideShowName-cszLine"></div>');
	document.writeln('<div id="IDX-NewSlideShowName-bedLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-NewSlideShowName-bathLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-NewSlideShowName-remarkLine" style="display:none;"></div>');
	
	document.writeln('</div>');

	function playNewSlideShowName()
	{
		
		
		urlVarNewSlideShowName = '<a href="'+propertiesNewSlideShowName[cNewSlideShowNamewi][6]+'" class="IDX-NewSlideShowName-ssLinkText">';
		swapNewSlideShowNamefade(document.getElementById('IDX-NewSlideShowName-ssImage'), preLoadNewSlideShowName.src, '1', ' ');
		document.getElementById('IDX-NewSlideShowName-ssImageURL').href = propertiesNewSlideShowName[cNewSlideShowNamewi][6];
		document.getElementById('IDX-NewSlideShowName-priceLine').innerHTML = urlVarNewSlideShowName+'$'+propertiesNewSlideShowName[cNewSlideShowNamewi][0]+'</a>';
		document.getElementById('IDX-NewSlideShowName-addressLine').innerHTML =  urlVarNewSlideShowName+propertiesNewSlideShowName[cNewSlideShowNamewi][1]+'</a>';
		document.getElementById('IDX-NewSlideShowName-cszLine').innerHTML = urlVarNewSlideShowName+propertiesNewSlideShowName[cNewSlideShowNamewi][2]+'</a>';
		document.getElementById('IDX-NewSlideShowName-bedLine').innerHTML = urlVarNewSlideShowName+'Beds: '+propertiesNewSlideShowName[cNewSlideShowNamewi][7]+'</a>';
		document.getElementById('IDX-NewSlideShowName-bathLine').innerHTML = urlVarNewSlideShowName+'Baths: '+propertiesNewSlideShowName[cNewSlideShowNamewi][8]+'</a>';
		document.getElementById('IDX-NewSlideShowName-remarkLine').innerHTML = urlVarNewSlideShowName+propertiesNewSlideShowName[cNewSlideShowNamewi][9]+'</a>';
		
		preLoadNewSlideShowName = new Image();
		preLoadNewSlideShowName.src = propertiesNewSlideShowName[nextNewSlideShowName][3];
		
		updateNewSlideShowName();
		
		cNewSlideShowName = setTimeout('playNewSlideShowName()', timeNewSlideShowNameout);	
		
		
	} // end play()
	function updateNewSlideShowName()
	{		
		cNewSlideShowNamewi = nextNewSlideShowName;		
		genNextNewSlideShowName();
		genPrevNewSlideShowName();
		
	}
	function genNextNewSlideShowName()
	{
		nextNewSlideShowName = cNewSlideShowNamewi + 1;
		if (nextNewSlideShowName >= 10)
			nextNewSlideShowName = 0;
	} // end genNext
	function genPrevNewSlideShowName()
	{
		prevNewSlideShowName = cNewSlideShowNamewi - 1;
		if (prevNewSlideShowName < 0)
			prevNewSlideShowName = 10 - 1;
	} // end genPrev

	var propertiesNewSlideShowName = new Array(10);
	propertiesNewSlideShowName[0] = new Array('800,000','311 Willow Oak Court','Seneca, SC 29672 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/3/UPSTATEMLS20099253.jpg','20099253','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20099253&idxID=070','5','4','HUGE REDUCTION !! SHORT SALE APPROVED. Gorgeous all brick ho...');
	propertiesNewSlideShowName[1] = new Array('799,900','5 Autumn View Ridge','Travelers Rest, SC 29690 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/3/UPSTATEMLS20101133.jpg','20101133','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20101133&idxID=070','4','2','This magnificent \\\\\\&quot;Yankee Barn Timber Frame\\\\\\&quot; ...');
	propertiesNewSlideShowName[2] = new Array('799,900','114 Southwind Bay','Seneca, SC 29672 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/8/UPSTATEMLS20093928.jpg','20093928','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20093928&idxID=070','4','3','Enjoy lakefront living at it\\\\\\\'s best.  Attractive Lake Keo...');
	propertiesNewSlideShowName[3] = new Array('799,900','276 Panorama Drive','Lavonia, GA 30553 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/2/UPSTATEMLS20091852.jpg','20091852','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20091852&idxID=070','4','3','Beautiful Southern Living home on almost 5 acres on Hartwell...');
	propertiesNewSlideShowName[4] = new Array('799,900','113 Chestnut Lane','Anderson, SC 29625 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/4/UPSTATEMLS20094034.jpg','20094034','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20094034&idxID=070','5','3','Spectacular View on one-of-a-kind Deep Water Lake lots.  ALW...');
	propertiesNewSlideShowName[5] = new Array('799,900','112 Wynward Pointe Dr','Salem, SC 29676 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/5/UPSTATEMLS20090325.jpg','20090325','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20090325&idxID=070','5','4','Lake Keowee Waterfront:  Custom brick home in Salem on the s...');
	propertiesNewSlideShowName[6] = new Array('799,900','507 S. Ocean Blvd','N.Myrtle Beach, SC 29582 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/0/UPSTATEMLS169000.jpg','169000','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=169000&idxID=070','6','6','...');
	propertiesNewSlideShowName[7] = new Array('799,900','109 Pee Dee Lane','Powdersville, SC 29673 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/5/UPSTATEMLS20099975.jpg','20099975','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20099975&idxID=070','4','3','The Drayton Hall by Don Gardner features unmatched curb appe...');
	propertiesNewSlideShowName[8] = new Array('799,000','1125 Rooks Drive','Anderson, SC 29625 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/8/UPSTATEMLS20098858.jpg','20098858','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20098858&idxID=070','3','3','Views! Views! Views! Quality Construction Throughout. This i...');
	propertiesNewSlideShowName[9] = new Array('799,000','414 E Waterside Drive','Seneca, SC 29672 ','http://upstatemls.fnismls.com/Paragon/ListingPictures/UPSTATEMLS/7/UPSTATEMLS20098967.jpg','20098967','070','http://buyareahomes.idxco.com/idx/4397/details.php?listingID=20098967&idxID=070','4','3','What a value! Breathtaking sunrises &amp; views are yours to...');
	var urlVarNewSlideShowName;
	var preLoadNewSlideShowName = new Image();
	preLoadNewSlideShowName.src = propertiesNewSlideShowName[cNewSlideShowNamewi][3];
	onLoad = playNewSlideShowName();
