NewImg2 = new Array ('http://www.idxcentral.com/images/mls/tsmls/5/2902065_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/5/2902705_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/7/20102057_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/6/2900216_1_n.jpg','http://www.idxcentral.com/images/mls/tsmls/2/20100332_1_n.jpg'); NewCap2 = new Array ('<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b>$595,000</b><br><b>Bedrooms</b>: 1<br><b>Baths</b>: 1<br><b>Approx. Acreage</b>: 0 - .255<br>Gorgeous beach front property in downtown Kings Beach. ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=nsrealty&pg=profile&mls=2902065"><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>$499,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2<br><b>Square Feet</b>: 1204<br><b>Approx. Acreage</b>: .26 - .5<br>Lovely Old Tahoe home sitting on over1/4 acre in 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=nsrealty&pg=profile&mls=2902705"><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>$449,000</b><br><b>Bedrooms</b>: 4<br><b>Baths</b>: 3<br><b>Approx. Acreage</b>: 0 - .255<br>Very well built house on sunny side of the street. Has ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=nsrealty&pg=profile&mls=20102057"><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>$425,000</b><br><b>Bedrooms</b>: 3<br><b>Baths</b>: 2.5<br><b>Square Feet</b>: 1848<br><b>Approx. Acreage</b>: 0 - .255<br>Very spacious condo. Move in condition. No home  owner ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=nsrealty&pg=profile&mls=2900216"><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>$275,000</b><br><b>Bedrooms</b>: 1<br><b>Baths</b>: 1.5<br><b>Approx. Acreage</b>: 0 - .255<br>This house has potential, but needs TLC. Garage does not ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/idxsearch.cfm?idxid=nsrealty&pg=profile&mls=20100332"><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='234' height='173' border=0 id='slideshow2' name='slideshow2' src='http://www.idxcentral.com/images/mls/tsmls/5/2902065_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='' valign='top'><div id='slideshowCap2' name='slideshowCap2'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'><b>$595,000</b><br><b>Bedrooms</b>: 1<br><b>Baths</b>: 1<br><strong>Approx. Acreage</strong>: 0 - .255<br>Gorgeous beach front property in downtown Kings Beach. ...<br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'><br><a href='http://www.idxcentral.com/idxsearch.cfm?idxid=nsrealty&pg=profile&mls=2902065'><b>View Details</b></a><br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'></font></div></td></tr></table>");
