	// 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 timeCorvallisHomesout = 7000;
	var cCorvallisHomeswi = 0;
	
	// iCorvallisHomessf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var iCorvallisHomessf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swapCorvallisHomesfade setup function
	function swapCorvallisHomesfade()
	{
		//if the timer is not already going
		if(iCorvallisHomessf.clock == null)
		{
			//copy the image object 
			iCorvallisHomessf.obj = arguments[0];
			
			//copy the image src argument 
			iCorvallisHomessf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof iCorvallisHomessf.obj.style.opacity != 'undefined')
			{
				iCorvallisHomessf.type = 'w3c';
			}
			else if(typeof iCorvallisHomessf.obj.style.MozOpacity != 'undefined')
			{
				iCorvallisHomessf.type = 'moz';
			}
			else if(typeof iCorvallisHomessf.obj.style.KhtmlOpacity != 'undefined')
			{
				iCorvallisHomessf.type = 'khtml';
			}
			else if(typeof iCorvallisHomessf.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
				iCorvallisHomessf.type = (iCorvallisHomessf.obj.filters.length > 0 && typeof iCorvallisHomessf.obj.filters.alpha == 'object' && typeof iCorvallisHomessf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				iCorvallisHomessf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				iCorvallisHomessf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(iCorvallisHomessf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swapCorvallisHomesfade is two distinct transitions
				iCorvallisHomessf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				iCorvallisHomessf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				iCorvallisHomessf.clock = setInterval('iCorvallisHomessf.swapCorvallisHomesfade()', iCorvallisHomessf.length/iCorvallisHomessf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				iCorvallisHomessf.obj.src = iCorvallisHomessf.src;
			}
			
		}
	};
	
	
	//swapCorvallisHomesfade timer function
	iCorvallisHomessf.swapCorvallisHomesfade = function()
	{
		//increase or reduce the counter on an exponential scale
		iCorvallisHomessf.count = (iCorvallisHomessf.fade) ? iCorvallisHomessf.count * 0.9 : (iCorvallisHomessf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(iCorvallisHomessf.count < (1 / iCorvallisHomessf.resolution))
		{
			//clear the timer
			clearInterval(iCorvallisHomessf.clock);
			iCorvallisHomessf.clock = null;
	
			//do the image swap
			iCorvallisHomessf.obj.src = iCorvallisHomessf.src;
	
			//reverse the fade direction flag
			iCorvallisHomessf.fade = false;
			
			//restart the timer
			iCorvallisHomessf.clock = setInterval('iCorvallisHomessf.swapCorvallisHomesfade()', iCorvallisHomessf.length/iCorvallisHomessf.resolution);
	
		}
		
		//if the counter has reached the top
		if(iCorvallisHomessf.count > (1 - (1 / iCorvallisHomessf.resolution)))
		{
			//clear the timer
			clearInterval(iCorvallisHomessf.clock);
			iCorvallisHomessf.clock = null;
	
			//reset the fade direction flag
			iCorvallisHomessf.fade = true;
			
			//reset the counter
			iCorvallisHomessf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(iCorvallisHomessf.type)
		{
			case 'ie' :
				iCorvallisHomessf.obj.filters.alpha.opacity = iCorvallisHomessf.count * 100;
				break;
				
			case 'khtml' :
				iCorvallisHomessf.obj.style.KhtmlOpacity = iCorvallisHomessf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iCorvallisHomessf.obj.style.MozOpacity = (iCorvallisHomessf.count == 1 ? 0.9999999 : iCorvallisHomessf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iCorvallisHomessf.obj.style.opacity = (iCorvallisHomessf.count == 1 ? 0.9999999 : iCorvallisHomessf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-CorvallisHomes-slideshow { text-align: center; width: 175px;  }');
	document.writeln('.IDX-CorvallisHomes-image { width: 165px;  }');
	document.writeln('#IDX-CorvallisHomes-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextCorvallisHomes = 1;
	prevCorvallisHomes = 25 - 1;

	document.writeln('<div id="IDX-CorvallisHomes-slideshow">');
	document.writeln('<div id="IDX-CorvallisHomes-slideshowImage">');
	document.writeln('<span><a href="" id="IDX-CorvallisHomes-ssImageURL" class="IDX-CorvallisHomes-ssLinkText"><img id="IDX-CorvallisHomes-ssImage" name="CorvallisHomes-ssImage" alt="Slideshow image" border="0"  class="IDX-CorvallisHomes-image" src="http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/3/WVMLS636443.jpg" ></a></span>');
	document.writeln('</div>');
	document.writeln('<div id="IDX-CorvallisHomes-priceLine"></div>');
	document.writeln('<div id="IDX-CorvallisHomes-addressLine"></div>');
	document.writeln('<div id="IDX-CorvallisHomes-cszLine"></div>');
	document.writeln('<div id="IDX-CorvallisHomes-bedLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-CorvallisHomes-bathLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-CorvallisHomes-remarkLine" style="display:none;"></div>');
	
	document.writeln('</div>');

	function playCorvallisHomes()
	{
		
		
		urlVarCorvallisHomes = '<a href="'+propertiesCorvallisHomes[cCorvallisHomeswi][6]+'" class="IDX-CorvallisHomes-ssLinkText">';
		swapCorvallisHomesfade(document.getElementById('IDX-CorvallisHomes-ssImage'), preLoadCorvallisHomes.src, '1', ' ');
		document.getElementById('IDX-CorvallisHomes-ssImageURL').href = propertiesCorvallisHomes[cCorvallisHomeswi][6];
		document.getElementById('IDX-CorvallisHomes-priceLine').innerHTML = urlVarCorvallisHomes+'$'+propertiesCorvallisHomes[cCorvallisHomeswi][0]+'</a>';
		document.getElementById('IDX-CorvallisHomes-addressLine').innerHTML =  urlVarCorvallisHomes+propertiesCorvallisHomes[cCorvallisHomeswi][1]+'</a>';
		document.getElementById('IDX-CorvallisHomes-cszLine').innerHTML = urlVarCorvallisHomes+propertiesCorvallisHomes[cCorvallisHomeswi][2]+'</a>';
		document.getElementById('IDX-CorvallisHomes-bedLine').innerHTML = urlVarCorvallisHomes+'Beds: '+propertiesCorvallisHomes[cCorvallisHomeswi][7]+'</a>';
		document.getElementById('IDX-CorvallisHomes-bathLine').innerHTML = urlVarCorvallisHomes+'Baths: '+propertiesCorvallisHomes[cCorvallisHomeswi][8]+'</a>';
		document.getElementById('IDX-CorvallisHomes-remarkLine').innerHTML = urlVarCorvallisHomes+propertiesCorvallisHomes[cCorvallisHomeswi][9]+'</a>';
		
		preLoadCorvallisHomes = new Image();
		preLoadCorvallisHomes.src = propertiesCorvallisHomes[nextCorvallisHomes][3];
		
		updateCorvallisHomes();
		
		cCorvallisHomes = setTimeout('playCorvallisHomes()', timeCorvallisHomesout);	
		
		
	} // end play()
	function updateCorvallisHomes()
	{		
		cCorvallisHomeswi = nextCorvallisHomes;		
		genNextCorvallisHomes();
		genPrevCorvallisHomes();
		
	}
	function genNextCorvallisHomes()
	{
		nextCorvallisHomes = cCorvallisHomeswi + 1;
		if (nextCorvallisHomes >= 25)
			nextCorvallisHomes = 0;
	} // end genNext
	function genPrevCorvallisHomes()
	{
		prevCorvallisHomes = cCorvallisHomeswi - 1;
		if (prevCorvallisHomes < 0)
			prevCorvallisHomes = 25 - 1;
	} // end genPrev

	var propertiesCorvallisHomes = new Array(25);
	propertiesCorvallisHomes[0] = new Array('750,000','2790 NW Sulphur Springs Rd','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/3/WVMLS636443.jpg','636443','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=636443&idxID=139','4','3.5','Stunning contemporary view home in NW Corvallis. 4 bdrms + 2...');
	propertiesCorvallisHomes[1] = new Array('749,900','6115 NW Rosewood Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/8/WVMLS646688.jpg','646688','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646688&idxID=139','4','2.5','This immaculate home was custom built in \\\\\\\'07 with attenti...');
	propertiesCorvallisHomes[2] = new Array('749,900','6440 NW Sisters Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/0/WVMLS648590.jpg','648590','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=648590&idxID=139','3','3','Magnificent Cascade Mtn &amp; Valley views w/superior sunris...');
	propertiesCorvallisHomes[3] = new Array('749,900','6115 NW Rosewood Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/3/WVMLS646473.jpg','646473','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646473&idxID=139','4','2.5','This immaculate home was custom built in \\\\\\\'07 with attenti...');
	propertiesCorvallisHomes[4] = new Array('749,500','26663 NW Sulphur Springs Rd','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/5/WVMLS640225.jpg','640225','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=640225&idxID=139','4','3','Surround yourself w/ luxury &amp; comfort in this custom bui...');
	propertiesCorvallisHomes[5] = new Array('739,000','4471 NW Honeysuckle Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/6/WVMLS646716.jpg','646716','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646716&idxID=139','4','4','Enjoy comfortable and gracious living- The beautiful home fe...');
	propertiesCorvallisHomes[6] = new Array('725,000','8 NW Edgewood Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/8/WVMLS645898.jpg','645898','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=645898&idxID=139','5','4','Stone walkways, hidden pathways &amp; rock terraced gardens ...');
	propertiesCorvallisHomes[7] = new Array('695,000','4665 NW Rosemarie Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/8/WVMLS642818.jpg','642818','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=642818&idxID=139','5','4','Huge 1 acre in town lot with spectacular views. Beautifully ...');
	propertiesCorvallisHomes[8] = new Array('695,000','4665 NW Rosemarie Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/8/WVMLS642798.jpg','642798','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=642798&idxID=139','5','4','Huge 1 acre in town lot with spectacular views. Beautifully ...');
	propertiesCorvallisHomes[9] = new Array('695,000','2367 NW Kinderman Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/5/WVMLS648545.jpg','648545','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=648545&idxID=139','5','4','Soaring ceilings, lots of light, generous rooms. From the mi...');
	propertiesCorvallisHomes[10] = new Array('675,000','26029 SW Inavale Wy','Corvallis, OR 97333 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/9/WVMLS644819.jpg','644819','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=644819&idxID=139','4','4','Exquisite home on 5 ac in Corvallis School District. Beautif...');
	propertiesCorvallisHomes[11] = new Array('675,000','26029 SW Inavale Way','Corvallis, OR 97333 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/4/WVMLS644824.jpg','644824','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=644824&idxID=139','4','4','Exquisite home on 5 ac in Corvallis School District. Beautif...');
	propertiesCorvallisHomes[12] = new Array('619,000','4736 NW Veronica Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/8/WVMLS644738.jpg','644738','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=644738&idxID=139','5','3.5','Green Home: Earth Advantage tested and certified. includes m...');
	propertiesCorvallisHomes[13] = new Array('610,000','3308 NW Swallow Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/5/WVMLS646885.jpg','646885','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646885&idxID=139','3','2.5','Custom SINGLE LEVEL with grand entry to open vaulted, huge l...');
	propertiesCorvallisHomes[14] = new Array('599,000','3110 NW Swan Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/9/WVMLS643879.jpg','643879','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=643879&idxID=139','3','2.5','Fine thoughtful detail &amp; interior refinement like no oth...');
	propertiesCorvallisHomes[15] = new Array('595,000','2790 SW DeArmond Dr','Corvallis, OR 97333 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/6/WVMLS645576.jpg','645576','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=645576&idxID=139','4','2.5','A new direction of living awaits you in this well built home...');
	propertiesCorvallisHomes[16] = new Array('575,000','6920 NW Concord Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/4/WVMLS644814.jpg','644814','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=644814&idxID=139','4','3','Highly desirable Vineyard Mountain Estate. Custom home on 2 ...');
	propertiesCorvallisHomes[17] = new Array('575,000','1224 NW Fernwood Cl (& 1214)','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/1/WVMLS646751.jpg','646751','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646751&idxID=139','3','4.5','Fantastic private location central  to Corvallis, acreage mo...');
	propertiesCorvallisHomes[18] = new Array('549,900','4988 NW Lavender Cl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/9/WVMLS644739.jpg','644739','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=644739&idxID=139','4','3.5','Solar electric net metering agreement with Consumer Power In...');
	propertiesCorvallisHomes[19] = new Array('534,750','7965 NW Ridgewood Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/1/WVMLS648211.jpg','648211','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=648211&idxID=139','3','3.5','Sweeping views &amp; super chic. Designed &amp; remodeled by...');
	propertiesCorvallisHomes[20] = new Array('534,750','7965 NW Ridgewood Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/2/WVMLS648212.jpg','648212','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=648212&idxID=139','3','3.5','Sweeping views &amp; super chic. Designed &amp; remodeled by...');
	propertiesCorvallisHomes[21] = new Array('499,999','6680 NW Niagara Pl','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/6/WVMLS641146.jpg','641146','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=641146&idxID=139','4','3.5','Quality custom home with a stunning valley view! Beautiful h...');
	propertiesCorvallisHomes[22] = new Array('499,000','7955 NW Hope Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/7/WVMLS646057.jpg','646057','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646057&idxID=139','4','2.5','Come home to tranquility! Updated custom home on serene acre...');
	propertiesCorvallisHomes[23] = new Array('499,000','7955 NW Hope Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/6/WVMLS646096.jpg','646096','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=646096&idxID=139','4','2.5','Come home to Tranquility! Updated custom home on serene acre...');
	propertiesCorvallisHomes[24] = new Array('495,000','7010 NW Cardinal Dr','Corvallis, OR 97330 ','http://wvmls.fnismls.com/Paragon/ListingPictures/WVMLS/7/WVMLS643937.jpg','643937','139','http://www.debbiebrand.idxco.com/idx/4847/details.php?listingID=643937&idxID=139','4','3.5','Exceptional McDonald Forest access from this 4BR Russ Peters...');
	var urlVarCorvallisHomes;
	var preLoadCorvallisHomes = new Image();
	preLoadCorvallisHomes.src = propertiesCorvallisHomes[cCorvallisHomeswi][3];
	onLoad = playCorvallisHomes();

