

NewImg1 = new Array ('http://www.idxcentral.com/images/mls/metro/respix/2/10069122_n.jpg','http://www.idxcentral.com/images/mls/metro/respix/9/10044799_n.jpg','http://www.idxcentral.com/images/mls/metro/respix/5/10012735_n.jpg','http://www.idxcentral.com/images/mls/metro/respix/7/10019857_n.jpg','http://www.idxcentral.com/images/mls/metro/respix/8/10020988_n.jpg');


NewCap1 = new Array ( '<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$385,000</b><br><b>Bedrooms</b>: 1<br><b>Baths</b>: 3<br><b>Square Feet</b>: 1367<br>Stylish loft living in Midtown Sacramento without HOA fees. ...<br>Listing&nbsp;Broker:&nbsp;Ferdig Real Estate Solutions<br /><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10069122" target="_self"><b><font color="black">View Details</font></b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>', '<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$309,000</b><br><b>Bedrooms</b>: 4<br><b>Baths</b>: 2<br><b>Square Feet</b>: 2171<br>This home has been tastefully updated.  Granite slab counters ...<br>Listing&nbsp;Broker:&nbsp;Ferdig Real Estate Solutions<br /><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10044799" target="_self"><b><font color="black">View Details</font></b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>', '<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$229,900</b><br><b>Bedrooms</b>: 4<br><b>Baths</b>: 2&nbsp;&nbsp;<b>Half</b>: 1<br><b>Square Feet</b>: 2459<br>Best bargain in Oakdale. Great 2 story, 4 bedroom 2.5 bath ...<br>Listing&nbsp;Broker:&nbsp;Sterling Investment & Financial Services<br /><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10012735" target="_self"><b><font color="black">View Details</font></b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>', '<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$214,000</b><br><b>Bedrooms</b>: 2<br><b>Baths</b>: 1<br><b>Square Feet</b>: 1024<br>1910 Craftsman located on Bungalow Row. This two bedroom ...<br>Listing&nbsp;Broker:&nbsp;Lyon Re Downtown<br /><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10019857" target="_self"><b><font color="black">View Details</font></b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>', '<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$130,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2<br><b>Square Feet</b>: 1470<br>Look at this move-in ready home on a quiet cul-de-sac street ...<br>Listing&nbsp;Broker:&nbsp;Ferdig Real Estate Solutions<br /><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10020988" target="_self"><b><font color="black">View Details</font></b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>');
var preLoad1 = new Array()
for (i = 0; i < NewImg1.length; i++)
{
preLoad1[i] = new Image()
preLoad1[i].src = NewImg1[i]
}

/* Slideshow Functions */

var ImgNum1 = 0;
var ImgLength1 = preLoad1.length - 1;
var delay1 = 7000; //Time delay between Slides in milliseconds
var tmpDelay1 = 10000; // temp delay when user clicks on a photo
var lock1 = false;
var run1;
var autoPlay1 = false;
var iPlayed1 = 0;

function chgImg1(direction)
{
	var oSlideshowPic1 = document.getElementById('slideshow1')
	var oSlideshowCap1 = document.getElementById('slideshowCap1')

	if (iPlayed1 > 10)
	{
		lock1 = false;
		autoPlay1 = false;
		window.clearInterval(run1);
	}
	else
	{
		if (document.images)
		{
			ImgNum1 = ImgNum1 + direction;
			if (ImgNum1 > ImgLength1) 
			{
				ImgNum1 = 0;
				iPlayed1 = iPlayed1 + 1
			}
			if (ImgNum1 < 0)
			{
				ImgNum1 = ImgLength1;
			}

			if (document.all)
			{
				oSlideshowPic1.style.filter = "blendTrans(duration=2)"
				oSlideshowPic1.style.filter = "blendTrans(duration=crossFadeDuration)"
				oSlideshowPic1.filters.blendTrans.Apply()

				oSlideshowCap1.style.filter = "blendTrans(duration=2)"
				oSlideshowCap1.style.filter = "blendTrans(duration=crossFadeDuration)"
				oSlideshowCap1.filters.blendTrans.Apply()
			}

			oSlideshowPic1.src = preLoad1[ImgNum1].src;
			oSlideshowCap1.innerHTML = NewCap1[ImgNum1];

			if (document.all)
			{
				oSlideshowPic1.filters.blendTrans.Play()
				oSlideshowCap1.filters.blendTrans.Play()
			}
		}
	}
}

function auto1()
{
	if (lock1 == true)
	{
		lock1 = false;
		autoPlay1 = false;
		window.clearInterval(run1);
		run1 = setInterval("auto1()", tmpDelay1);
	}
	else if (lock1 == false)
	{
		lock1 = true;
		autoPlay1 = true;
		run1 = setInterval("chgImg1(1)", delay1);
	}
}

function showPicture1(whichDir)
{
	var oSlideshowPic1 = document.getElementById('slideshow1')
	var oSlideshowCap1 = document.getElementById('slideshowCap1')

	lock1 = false;
	autoPlay1 = false;
	window.clearInterval(run1);

	if (whichDir == '+')
	{
		if (ImgNum1 == ImgLength1)
		{
			ImgNum1 = 0
		}
		else
		{
			ImgNum1 = ImgNum1 + 1
		}
	}
	else
	{
		if (ImgNum1 == 0)
		{
			ImgNum1 = ImgLength1
		}
		else
		{
			ImgNum1 = ImgNum1 - 1
		}		
	}

	if (autoPlay1 == true) {auto1()}

	if (document.all)
	{
		oSlideshowPic1.style.filter = "blendTrans(duration=2)"
		oSlideshowPic1.style.filter = "blendTrans(duration=crossFadeDuration)"
		oSlideshowPic1.filters.blendTrans.Apply()

		oSlideshowCap1.filter = "blendTrans(duration=2)"
		oSlideshowCap1.style.filter = "blendTrans(duration=crossFadeDuration)"
		oSlideshowCap1.filters.blendTrans.Apply()
	}

	oSlideshowPic1.src = preLoad1[ImgNum1].src;
	oSlideshowCap1.innerHTML = NewCap1[ImgNum1];

	if (document.all)
	{
		oSlideshowPic1.filters.blendTrans.Play()
		oSlideshowCap1.filters.blendTrans.Play()
	}
}

auto1()


/*Output HTML - Escape any double quotes used */

document.write(" <table width='100%' cellpadding='0' cellspacing='0'><tr><td align='center'><img width='244' height='181' border=0 id='slideshow1' name='slideshow1' src='http://www.idxcentral.com/images/mls/metro/respix/2/10069122_n.jpg'></td></tr><tr><td><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'></td></tr><tr><td align='center'><a onclick='showPicture1(\"-\"); return false' href='' style='text-decoration:none'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'>&laquo; back&nbsp;&nbsp;</font></a><a onclick='showPicture1(\"+\"); return false' href='' style='text-decoration:none'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'>|&nbsp;&nbsp;next &raquo;</font></a></td></tr><tr><td><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'></td></tr><tr><td align='left' bgcolor='' valign='top'><div id='slideshowCap1' name='slideshowCap1'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'><b>$385,000</b><br><b>Bedrooms</b>: 1<br><b>Baths</b>: 3<br><b>Square Feet</b>: 1367<br>Stylish loft living in Midtown Sacramento without HOA fees. ...<br>Listing&nbsp;Broker:&nbsp;Ferdig Real Estate Solutions<br /><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'><br><a href='http://www.idxcentral.com/metro/idxsearch.cfm?idxid=uferdig&pg=profile&mls=10069122' target='_self'><b><font color='black'>View Details</font></b></a><br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'></font></div></td></tr></table>");
