

NewImg = new Array ('http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1038037_n.jpg','http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1036065_n.jpg','http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1034076_n.jpg','http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1033759_n.jpg','http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1034931_n.jpg');


NewCap = new Array ('<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b class="ss_price">$299,000</b><br><span class="ss_beds"><b>Bedrooms</b>: 3<br></span><span class="ss_baths"><b>Baths</b>: 2<br></span><span class="ss_sqft"><b>Square Feet</b>: 1352<br></span>Nice 32 in great location near Union Hill School on 1.74 ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1038037"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="7"></font>','<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b class="ss_price">$175,000</b><br><span class="ss_beds"><b>Bedrooms</b>: 2<br></span><span class="ss_baths"><b>Baths</b>: 2<br></span><span class="ss_sqft"><b>Square Feet</b>: 1198<br></span>Nice older home, walking distance to downtown GV. New floor ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1036065"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="7"></font>','<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b class="ss_price">$130,000</b><br><span class="ss_beds"><b>Bedrooms</b>: 2<br></span><span class="ss_baths"><b>Baths</b>: 1<br></span><span class="ss_sqft"><b>Square Feet</b>: 600<br></span>Back on the market as an active short sale.  Small home ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1034076"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="7"></font>','<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b class="ss_price">$120,000</b><br><span class="ss_beds"><b>Bedrooms</b>: 1<br></span><span class="ss_baths"><b>Baths</b>: 1<br></span><span class="ss_sqft"><b>Square Feet</b>: 400<br></span>The perfect little cabin in the woods features new remodel ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1033759"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="7"></font>','<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="black"><b class="ss_price">$79,900</b><br><span class="ss_beds"><b>Bedrooms</b>: 3<br></span><span class="ss_baths"><b>Baths</b>: 3<br></span><span class="ss_sqft"><b>Square Feet</b>: 2032<br></span>Freddie Mac Foreclosure Auction on RealtyBid.com. This ...<br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="3"><br><a href="http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1034931"><b>View Details</b></a><br><img src="http://www.idxcentral.com/images/spacer.gif" width="1" height="7"></font>');
var preLoad = new Array()
for (i = 0; i < NewImg.length; i++)
{
preLoad[i] = new Image()
preLoad[i].src = NewImg[i]
}

/* Slideshow Functions */

var ImgNum = 0;
var ImgLength = preLoad.length - 1;
var delay = 7000; //Time delay between Slides in milliseconds
var tmpDelay = 10000; // temp delay when user clicks on a photo
var lock = false;
var run;
var autoPlay = false;
var iPlayed = 0;

function chgImg(direction)
{
	var oSlideshowPic = document.getElementById('slideshow')
	var oSlideshowCap = document.getElementById('slideshowCap')

	if (iPlayed > 10)
	{
		lock = false;
		autoPlay = false;
		window.clearInterval(run);
	}
	else
	{
		if (document.images)
		{
			ImgNum = ImgNum + direction;
			if (ImgNum > ImgLength) 
			{
				ImgNum = 0;
				iPlayed = iPlayed + 1
			}
			if (ImgNum < 0)
			{
				ImgNum = ImgLength;
			}

			if (document.all)
			{
				oSlideshowPic.style.filter = "blendTrans(duration=2)"
				oSlideshowPic.style.filter = "blendTrans(duration=crossFadeDuration)"
				oSlideshowPic.filters.blendTrans.Apply()

				oSlideshowCap.style.filter = "blendTrans(duration=2)"
				oSlideshowCap.style.filter = "blendTrans(duration=crossFadeDuration)"
				oSlideshowCap.filters.blendTrans.Apply()
			}

			oSlideshowPic.src = preLoad[ImgNum].src;
			oSlideshowCap.innerHTML = NewCap[ImgNum];

			if (document.all)
			{
				oSlideshowPic.filters.blendTrans.Play()
				oSlideshowCap.filters.blendTrans.Play()
			}
		}
	}
}

function auto()
{
	if (lock == true)
	{
		lock = false;
		autoPlay = false;
		window.clearInterval(run);
		run = setInterval("auto()", tmpDelay);
	}
	else if (lock == false)
	{
		lock = true;
		autoPlay = true;
		run = setInterval("chgImg(1)", delay);
	}
}

function showPicture(whichDir)
{
	var oSlideshowPic = document.getElementById('slideshow')
	var oSlideshowCap = document.getElementById('slideshowCap')

	lock = false;
	autoPlay = false;
	window.clearInterval(run);

	if (whichDir == '+')
	{
		if (ImgNum == ImgLength)
		{
			ImgNum = 0
		}
		else
		{
			ImgNum = ImgNum + 1
		}
	}
	else
	{
		if (ImgNum == 0)
		{
			ImgNum = ImgLength
		}
		else
		{
			ImgNum = ImgNum - 1
		}		
	}

	if (autoPlay == true) {auto()}

	if (document.all)
	{
		oSlideshowPic.style.filter = "blendTrans(duration=2)"
		oSlideshowPic.style.filter = "blendTrans(duration=crossFadeDuration)"
		oSlideshowPic.filters.blendTrans.Apply()

		oSlideshowCap.filter = "blendTrans(duration=2)"
		oSlideshowCap.style.filter = "blendTrans(duration=crossFadeDuration)"
		oSlideshowCap.filters.blendTrans.Apply()
	}

	oSlideshowPic.src = preLoad[ImgNum].src;
	oSlideshowCap.innerHTML = NewCap[ImgNum];

	if (document.all)
	{
		oSlideshowPic.filters.blendTrans.Play()
		oSlideshowCap.filters.blendTrans.Play()
	}
}

auto()


/*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='slideshow' name='slideshow' src='http://www.idxcentral.com/images/mls/ncbor/respix/Nevada1038037_n.jpg'></td></tr><tr><td align='center'><a onclick='showPicture(\"-\"); return false' href=''><img border=0 width=40 height=19 src='http://www.idxcentral.com/metro/images/idxbutton_back.gif'></a><a onclick='showPicture(\"+\"); return false' href=''><img border=0 width=55 height=19 src='http://www.idxcentral.com/metro/images/idxbutton_next.gif'></a></td></tr><tr><td align='left' bgcolor='' valign='top'><div id='slideshowCap' name='slideshowCap'><font size='1' face='Verdana, Arial, Helvetica, sans-serif' color='black'><b class='ss_price'>$299,000</b><br><span class='ss_beds'><b>Bedrooms</b>: 3<br></span><span class='ss_baths'><b>Baths</b>: 2<br></span><span class='ss_sqft'><b>Square Feet</b>: 1352<br></span>Nice 32 in great location near Union Hill School on 1.74 ...<br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'><br><a href='http://www.idxcentral.com/ncbor/idxsearch.cfm?idxid=mkporter&pg=profile&mls=1038037'><b>View Details</b></a><br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='3'><br><img src='http://www.idxcentral.com/images/spacer.gif' width='1' height='7'></font></div></td></tr></table>");
