NewImg2 = new Array ('http://www.idxcentral.com/images/mls/tsmls/5/20100995_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/1/20102281_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/5/20102465_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/2/20102132_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/6/20101656_1_n.jpg'); NewCap2 = new Array ('<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$389,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2<br><b>Square Feet</b>: 1196<br><b>Approx. Acreage</b>: .26 - .5<br>Great Agate Bay location on a quiet street with minimal ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20100995"><b>View Details</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>$525,000</b><br><b>Bedrooms</b>: 4<br><b>Baths</b>: 3.5<br><b>Square Feet</b>: 2485<br><b>Approx. Acreage</b>: 0 - .255<br>Wonderful end-of-road setting backing to the third tee ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20102281"><b>View Details</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>$599,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2.5<br><b>Square Feet</b>: 2025<br><b>Approx. Acreage</b>: .26 - .5<br>Exceptionally private setting near end of cul-de-sac and ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20102465"><b>View Details</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>$624,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 3<br><b>Square Feet</b>: 1961<br><b>Approx. Acreage</b>: .26 - .5<br>"Exceptionally well maintained Tahoe retreat with beautiful ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20102132"><b>View Details</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>$1,295,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 3.5<br><b>Square Feet</b>: 2805<br><b>Approx. Acreage</b>: .26 - .5<br>PRICE INCLUDES ADDITIONAL PARCEL (095-440-040).  Stunning ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20101656"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"></font>'); 
var preLoad2 = new Array()
for (i = 0; i < NewImg2.length; i++)
{
preLoad2[i] = new Image()
preLoad2[i].src = NewImg2[i]
}

/* Slideshow Functions */

var ImgNum2 = 0;
var ImgLength2 = preLoad2.length - 1;
var delay2 = 7000; //Time delay between Slides in milliseconds
var tmpDelay2 = 10000; // temp delay when user clicks on a photo
var lock2 = false;
var run2;
var autoPlay2 = false;
var iPlayed2 = 0;

function chgImg2(direction)
{
	var oSlideshowPic2 = document.getElementById('slideshow2')
	var oslideshowCap2 = document.getElementById('slideshowCap2')

	if (iPlayed2 > 10)
	{
		lock2 = false;
		autoPlay2 = false;
		window.clearInterval(run2);
	}
	else
	{
		if (document.images)
		{
			ImgNum2 = ImgNum2 + direction;
			if (ImgNum2 > ImgLength2) 
			{
				ImgNum2 = 0;
				iPlayed2 = iPlayed2 + 1
			}
			if (ImgNum2 < 0)
			{
				ImgNum2 = ImgLength2;
			}

			if (document.all)
			{
				oSlideshowPic2.style.filter = "blendTrans(duration=2)"
				oSlideshowPic2.style.filter = "blendTrans(duration=crossFadeDuration)"
				oSlideshowPic2.filters.blendTrans.Apply()

				oslideshowCap2.style.filter = "blendTrans(duration=2)"
				oslideshowCap2.style.filter = "blendTrans(duration=crossFadeDuration)"
				oslideshowCap2.filters.blendTrans.Apply()
			}

			oSlideshowPic2.src = preLoad2[ImgNum2].src;
			oslideshowCap2.innerHTML = NewCap2[ImgNum2];

			if (document.all)
			{
				oSlideshowPic2.filters.blendTrans.Play()
				oslideshowCap2.filters.blendTrans.Play()
			}
		}
	}
}

function auto2()
{
	if (lock2 == true)
	{
		lock2 = false;
		autoPlay2 = false;
		window.clearInterval(run2);
		run2 = setInterval("auto2()", tmpDelay2);
	}
	else if (lock2 == false)
	{
		lock2 = true;
		autoPlay2 = true;
		run2 = setInterval("chgImg2(1)", delay2);
	}
}

function showPicture2(whichDir)
{
	var oSlideshowPic2 = document.getElementById('slideshow2')
	var oslideshowCap2 = document.getElementById('slideshowCap2')

	lock2 = false;
	autoPlay2 = false;
	window.clearInterval(run2);

	if (whichDir == '+')
	{
		if (ImgNum2 == ImgLength2)
		{
			ImgNum2 = 0
		}
		else
		{
			ImgNum2 = ImgNum2 + 1
		}
	}
	else
	{
		if (ImgNum2 == 0)
		{
			ImgNum2 = ImgLength2
		}
		else
		{
			ImgNum2 = ImgNum2 - 1
		}		
	}

	if (autoPlay2 == true) {auto2()}

	if (document.all)
	{
		oSlideshowPic2.style.filter = "blendTrans(duration=2)"
		oSlideshowPic2.style.filter = "blendTrans(duration=crossFadeDuration)"
		oSlideshowPic2.filters.blendTrans.Apply()

		oslideshowCap2.filter = "blendTrans(duration=2)"
		oslideshowCap2.style.filter = "blendTrans(duration=crossFadeDuration)"
		oslideshowCap2.filters.blendTrans.Apply()
	}

	oSlideshowPic2.src = preLoad2[ImgNum2].src;
	oslideshowCap2.innerHTML = NewCap2[ImgNum2];

	if (document.all)
	{
		oSlideshowPic2.filters.blendTrans.Play()
		oslideshowCap2.filters.blendTrans.Play()
	}
}

auto2()


/*Output HTML - Escape any double quotes used */

document.write("<table width='100%' cellpadding='0' cellspacing='0'><tr><td align='center'><img width='300' height='224' border=0 id='slideshow2' name='slideshow2' src='http://www.idxcentral.com/images/mls/tsmls/5/20100995_1_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='showPicture2(\"-\"); 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='showPicture2(\"+\"); 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='CC982A' valign='top'><div id='slideshowCap2' name='slideshowCap2'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'><b>$389,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2<br><b>Square Feet</b>: 1196<br><strong>Approx. Acreage</strong>: .26 - .5<br>Great Agate Bay location on a quiet street with minimal ...<br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'><br><a href='http://www.idxcentral.com/idxsearch.cfm?idxid=tmills&pg=profile&mls=20100995'><b>View Details</b></a><br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'></font></div></td></tr></table>");
