	// 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 timeNewSlideShowNameout = 8000;
	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: 310px;  }');
	document.writeln('.IDX-NewSlideShowName-image { width: 310px; height: 210px;  }');
	document.writeln('#IDX-NewSlideShowName-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextNewSlideShowName = 1;
	prevNewSlideShowName = 25 - 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://www.stauntonaugustahomes.com/sta/jpg/59902.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 >= 25)
			nextNewSlideShowName = 0;
	} // end genNext
	function genPrevNewSlideShowName()
	{
		prevNewSlideShowName = cNewSlideShowNamewi - 1;
		if (prevNewSlideShowName < 0)
			prevNewSlideShowName = 25 - 1;
	} // end genPrev

	var propertiesNewSlideShowName = new Array(25);
	propertiesNewSlideShowName[0] = new Array('1,000,000','235 LOCUST GROVE LN Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/59902.jpg','59902','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=59902&idxID=208','4','4','Colter farm is the birthplace of John Coter, explorer with t...');
	propertiesNewSlideShowName[1] = new Array('898,900','180 DIAMOND CT Harrisonburg VIRGINIA 22801','Harrisonburg, VA 22801 ','http://www.stauntonaugustahomes.com/sta/jpg/60003.jpg','60003','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60003&idxID=208','6','4','Welcome to prestigious Diamond Court, where city living meet...');
	propertiesNewSlideShowName[2] = new Array('879,000','290 HICKORY HILL RD Fishersville VIRGINIA 22939','Fishersville, VA 22939 ','http://www.stauntonaugustahomes.com/sta/jpg/56321.jpg','56321','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=56321&idxID=208','4','4','GORGEOUS HOME - MAGNIFICENT VIEWS - OUTSTANDING DESIGN. 4 FI...');
	propertiesNewSlideShowName[3] = new Array('739,000','1652 SUMMIT DR Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/60778.jpg','60778','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60778&idxID=208','4','3','COUNTRY CLUB LIVING!! THIS ELEGANT HOME BACKS UP TO WAYNESBO...');
	propertiesNewSlideShowName[4] = new Array('729,000','112 ANEN TOWN LN Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/60923.jpg','60923','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60923&idxID=208','4','3','Privately situated working farm on the South River.  Enjoy t...');
	propertiesNewSlideShowName[5] = new Array('699,900','3351 RAGTOWN RD Harrisonburg VIRGINIA 22801','Harrisonburg, VA 22801 ','http://www.stauntonaugustahomes.com/sta/jpg/61745.jpg','61745','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61745&idxID=208','4','3','See for yourself the quality &amp; detail in this one of a k...');
	propertiesNewSlideShowName[6] = new Array('699,000','157 KIDDSVILLE RD Fishersville VIRGINIA 22939','Fishersville, VA 22939 ','http://www.stauntonaugustahomes.com/sta/jpg/59606.jpg','59606','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=59606&idxID=208','3','5','This exceptional custom built Cape in great location offers ...');
	propertiesNewSlideShowName[7] = new Array('674,900','905 OLD WHITE BRIDGE RD Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/62116.jpg','62116','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=62116&idxID=208','4','3','Professional horse property. Spacious home with open floor p...');
	propertiesNewSlideShowName[8] = new Array('650,000','81 WARREN OAKS LN Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/61815.jpg','61815','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61815&idxID=208','4','4','Athletic Family?  This home has it all!  Pool, indoor volley...');
	propertiesNewSlideShowName[9] = new Array('649,900','23 JASPER LN Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/62474.jpg','62474','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=62474&idxID=208','4','3','Classic plantation home. Upper and lower porches w/access fr...');
	propertiesNewSlideShowName[10] = new Array('649,500','530 CLAREMONT AVE Harrisonburg VIRGINIA 22801','Harrisonburg, VA 22801 ','http://www.stauntonaugustahomes.com/sta/jpg/61244.jpg','61244','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61244&idxID=208','5','4','Stunning new two story home! Elegant and spacious featuring ...');
	propertiesNewSlideShowName[11] = new Array('642,600','32 JASPER LN Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/58847.jpg','58847','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=58847&idxID=208','4','2','Beautiful New Construction to be built (floor plan subject t...');
	propertiesNewSlideShowName[12] = new Array('635,000','104 PELHAM INLET Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/57732.jpg','57732','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=57732&idxID=208','6','7','PRICED BELOW ASSESSMENT!Not a drive by home,the gourmet kitc...');
	propertiesNewSlideShowName[13] = new Array('600,000','140 HERITAGE DR Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/61790.jpg','61790','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61790&idxID=208','4','4','Rear yard has fenced area (See attached list of amenities). ...');
	propertiesNewSlideShowName[14] = new Array('599,900','1000 WHITE OAK RD Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/61173.jpg','61173','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61173&idxID=208','4','4','Classy and Classic. Finely appointed home of exceptional qua...');
	propertiesNewSlideShowName[15] = new Array('589,900','83 WILLOW SPOUT RD Fort Defiance VIRGINIA 24437','Fort Defiance, VA 24437 ','http://www.stauntonaugustahomes.com/sta/jpg/61886.jpg','61886','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61886&idxID=208','4','4','THIS BEAUTIFUL PROPERTY WILL MEET ALL OF YOUR WANTS AND NEED...');
	propertiesNewSlideShowName[16] = new Array('579,900','114 JASPER LN Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/60754.jpg','60754','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60754&idxID=208','4','3','Home currently under construction. Interior can be customize...');
	propertiesNewSlideShowName[17] = new Array('534,999','416 HICKORY HILL DR Fishersville VIRGINIA 22939','Fishersville, VA 22939 ','http://www.stauntonaugustahomes.com/sta/jpg/60303.jpg','60303','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60303&idxID=208','3','3','AWESOME VALUE FOR THIS ONE OF A KIND HOME!!DOUGLAS FIR POST ...');
	propertiesNewSlideShowName[18] = new Array('519,900','172 JASPER LN Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/60751.jpg','60751','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60751&idxID=208','4','3','This flowing floor plan offers casual comfort with the best ...');
	propertiesNewSlideShowName[19] = new Array('499,900','65 WESLEIGH MANOR Waynesboro VIRGINIA 22980','Waynesboro, VA 22980 ','http://www.stauntonaugustahomes.com/sta/jpg/62231.jpg','62231','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=62231&idxID=208','4','2','What a wonderfully built custom home! This home was meticulo...');
	propertiesNewSlideShowName[20] = new Array('498,500','TBD KIDDSVILLE RD Fishersville VIRGINIA 22939','Fishersville, VA 22939 ','http://www.stauntonaugustahomes.com/sta/jpg/59914.jpg','59914','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=59914&idxID=208','4','3','Exceptional craftsmanship throughout this 4 bedroom 3.5 bath...');
	propertiesNewSlideShowName[21] = new Array('489,900','44 MARLENE PL Verona VIRGINIA 24482','Verona, VA 24482 ','http://www.stauntonaugustahomes.com/sta/jpg/62455.jpg','62455','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=62455&idxID=208','3','3','UNIQUE CUSTOM BUILT WESTERN CEDAR LOG HOME SITUATED ON A VER...');
	propertiesNewSlideShowName[22] = new Array('460,000','3260 BAYBROOK DR Harrisonburg VIRGINIA 22801','Harrisonburg, VA 22801 ','http://www.stauntonaugustahomes.com/sta/jpg/60883.jpg','60883','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=60883&idxID=208','5','4','BRAND NEW WASH/DRY! ALL Brick Exterior! Private back yard wi...');
	propertiesNewSlideShowName[23] = new Array('450,000','44 YARMOUTH RD Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/61959.jpg','61959','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=61959&idxID=208','5','2','100% FINANCING AVAILABLE. Rare opportunity to live in a wond...');
	propertiesNewSlideShowName[24] = new Array('449,900','416 WAYNE AVE Stuarts Draft VIRGINIA 24477','Stuarts Draft, VA 24477 ','http://www.stauntonaugustahomes.com/sta/jpg/62127.jpg','62127','208','http://www.valleyhomes4sale.idxco.com/idx/3900/details.php?listingID=62127&idxID=208','6','3','GRANDVIEW The name says it all-miles of Blue Ridge Mtn views...');
	var urlVarNewSlideShowName;
	var preLoadNewSlideShowName = new Image();
	preLoadNewSlideShowName.src = propertiesNewSlideShowName[cNewSlideShowNamewi][3];
	onLoad = playNewSlideShowName();

