<!-- Begin
// SLIDESHOW from http://javascript.internet.com/miscellaneous/fading-slide-show.html
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/slide1.jpg';
Pic[1] = 'images/slide2.jpg';
Pic[2] = 'images/slide3.jpg';

var spanishMode = false;
var url = window.location.href;
if( url.indexOf("spanish") != -1 )
	spanishMode = true;

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) 
{
	var picPath = Pic[i];
	
	// prepend a "../" if we are in the spanish folder
	if( spanishMode )
		picPath = ("../" + picPath);
		
	preLoad[i] = new Image();
	preLoad[i].src = picPath;
}

//**************************************
// Starts the slideshow
//**************************************
function runSlideShow() 
{
	if(document.all) 
	{
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}
	document.images.SlideShow.src = preLoad[j].src;
	if (document.all) 
	{
		document.images.SlideShow.filters.blendTrans.Play();
	}
	j = j + 1;
	if (j > (p - 1)) 
		j = 0;
	t = setTimeout('runSlideShow()', slideShowSpeed);
}
//  End of SlideShow code -->

//*******************************************************
// This gets call onLoad. It starts the message scroller
// and the image rotator
//*******************************************************
function start()
{
	// preload the images that we don't want to take a while
	//preLoadImages();
	
	// this starts the rotating of the image
	//startImageRotator();
	runSlideShow();
	
	// this starts the text scroller
	startScroller();
}

//************************************************
// Gets called when the user goes over a property
// in the properties page
//************************************************
function OnPropertyMouseOver( propertyRow )
{
    // change the color of the row
    propertyRow.style.backgroundColor = "whitesmoke";
}

//***********************************************
// Gets called when the mouse leaves a property row
// in the properties page
//***********************************************
function OnPropertyMouseOut( propertyRow )
{
   propertyRow.style.backgroundColor = "white";
}

//*****************************************************
// Gets called when the user clicks on a property
// in the properties page
//*****************************************************
function OnPropertyClick( mlsNumber )
{
    //window.open( "property.aspx?mlsnumber=" + mlsNumber, '_blank', 'width=800, height=600, align=center, top=200, left=200' );
    window.location = "property.aspx?mlsnumber=" + mlsNumber;
}

// Changes the picture displayed within the currPic SPAN tag in the property page
function changePic( picPath )
{
	var span = document.getElementById('currPic');
	span.innerHTML = "<img class='listing_pic' src='" + picPath + "' />";
}