function PhotoObj(photoLoc, photoComment) {
   this.location = photoLoc || "http://photos.realestatefederation.com/photo_soon.jpg";
   this.comment = photoComment || "&nbsp;";
}

var photoarrayFL = new Array();

	photoarrayFL[0] = 'photoFL1';
	var photoFL1 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_000.jpg', 'comment 1');
	
	photoarrayFL[1] = 'photoFL2';
	var photoFL2 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_001.jpg', 'comment 2');
	
	photoarrayFL[2] = 'photoFL3';
	var photoFL3 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_002.jpg', 'comment 3');
	
	photoarrayFL[3] = 'photoFL4';
	var photoFL4 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_003.jpg', 'comment 4');
	
	photoarrayFL[4] = 'photoFL5';
	var photoFL5 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_004.jpg', 'comment 5');
	
	photoarrayFL[5] = 'photoFL6';
	var photoFL6 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_005.jpg', 'comment 6');
	
	photoarrayFL[6] = 'photoFL7';
	var photoFL7 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_006.jpg', 'comment 7');
	
	photoarrayFL[7] = 'photoFL8';
	var photoFL8 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_007.jpg', 'comment 8');
	
	photoarrayFL[8] = 'photoFL9';
	var photoFL9 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_008.jpg', 'comment 9');
	
	photoarrayFL[9] = 'photoFL10';
	var photoFL10 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_009.jpg', 'comment 10');
	
	photoarrayFL[10] = 'photoFL11';
	var photoFL11 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_010.jpg', 'comment 11');
	
	photoarrayFL[11] = 'photoFL12';
	var photoFL12 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_011.jpg', 'comment 12');
	
	photoarrayFL[12] = 'photoFL13';
	var photoFL13 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_012.jpg', 'comment 13');
	
	photoarrayFL[13] = 'photoFL14';
	var photoFL14 = new PhotoObj('http://photos.leadmaxx.lantrax.com/mls/29/R2/11/R2807711_013.jpg', 'comment 14');
	
var photoarray7Dorothy = new Array();

	photoarray7Dorothy[0] = 'photo7Dorothy1';
	var photo7Dorothy1 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706.jpg', 'comment 1');
	
	photoarray7Dorothy[1] = 'photo7Dorothy2';
	var photo7Dorothy2 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_002.jpg', 'comment 2');
	
	photoarray7Dorothy[2] = 'photo7Dorothy3';
	var photo7Dorothy3 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_003.jpg', 'comment 3');
	
	photoarray7Dorothy[3] = 'photo7Dorothy4';
	var photo7Dorothy4 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_004.jpg', 'comment 4');
	
	photoarray7Dorothy[4] = 'photo7Dorothy5';
	var photo7Dorothy5 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_005.jpg', 'comment 5');
	
	photoarray7Dorothy[5] = 'photo7Dorothy6';
	var photo7Dorothy6 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_006.jpg', 'comment 6');
	
	photoarray7Dorothy[6] = 'photo7Dorothy7';
	var photo7Dorothy7 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_007.jpg', 'comment 7');
	
	photoarray7Dorothy[7] = 'photo7Dorothy8';
	var photo7Dorothy8 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_008.jpg', 'comment 8');
	
	photoarray7Dorothy[8] = 'photo7Dorothy9';
	var photo7Dorothy9 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_009.jpg', 'comment 9');
	
	photoarray7Dorothy[9] = 'photo7Dorothy10';
	var photo7Dorothy10 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_010.jpg', 'comment 10');
	
	photoarray7Dorothy[10] = 'photo7Dorothy11';
	var photo7Dorothy11 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_011.jpg', 'comment 11');
	
	photoarray7Dorothy[11] = 'photo7Dorothy12';
	var photo7Dorothy12 = new PhotoObj('featuredRealEstateImages/7-dorothys-way/gallery_files/254706_012.jpg', 'comment 12');
	

var slidecounter=0;
var slideshowrunning=0;

function PhotoClick(direction, showname) {
	//alert("PhotoClick-Showname:"+showname);	
	if(showname == "FL") {
		currShow = photoarrayFL;
		//alert("PhotoClick: setting currshow");
	}
	else if(showname == "7Dorothy") {
		currShow = photoarray7Dorothy;
	}
	
    if (slideshowrunning == 1) {
        slideshowrunning=0;
        clearTimeout(slideshowid);
    }
	
    if (direction == "back") { slidecounter--; }
   	else if (direction == "next") { slidecounter++; }
	else { slidecounter = direction-1;}

	if (slidecounter > eval(currShow.length-1)) { slidecounter = 0; }  
    if (slidecounter < 0) { slidecounter = eval(currShow.length-1); }

	if (navigator.appName == "Microsoft Internet Explorer") {
		document.images.photo.style.filter="blendTrans(duration=.25)";
		document.images.photo.filters.blendTrans.Apply();
		document.images.photo.filters.blendTrans.Play();
	}
    document.images.photo.src = eval(currShow[slidecounter]).location;
	if (document.images.SlideShowIcon) { document.images.SlideShowIcon.src='../images/icons/play.gif'; }
}

function SlideShow(photocount, showname, propertyID) {
		//alert("SlideShow-Showname:"+showname);
	if(showname == "FL") {
		currShow = photoarrayFL;
		//alert("SlideShow: setting currshow");		
	}
	else if(showname == "7Dorothy") {
		currShow = photoarray7Dorothy;
	}
	
	if (document.images.SlideShowIcon) {
	    if (slideshowrunning == 0) {
			slideshowrunning = 1;
			document.images.SlideShowIcon.src='../images/icons/pause.gif';
			var tooltip = document.getElementById('slideshowTooltip');
			tooltip.title="header=[Slideshow] body=[Click to Pause]";

				reScanBO(tooltip);

			tooltip.title='';
			var button = document.getElementById('slideshowTooltipButton');
			button.title="Pause";			
		}
	    else if (slideshowrunning == 1) {
			slideshowrunning = 0;
			document.images.SlideShowIcon.src='../images/icons/play.gif';
			var tooltip = document.getElementById('slideshowTooltip');			
			tooltip.title="header=[Slideshow] body=[Click to Play]";

				reScanBO(tooltip);

			tooltip.title='';			
			var button = document.getElementById('slideshowTooltipButton');
			button.title="Play";
		}
	    RunSlideShow(photocount, slideshowrunning, showname);
	}
}
function RunSlideShow(photocount, showname) {
	//alert("RunSlideShow-Showname:"+showname);
	if(showname == "FL") {
		currShow = photoarrayFL;
		//alert("RunSlideShow: setting currshow");		
	}
	else if(showname == "7Dorothy") {
		currShow = photoarray7Dorothy;
	}
	
    if (slideshowrunning == 1) {
        var photourl = eval(currShow[slidecounter]).location;
		if (navigator.appName == "Microsoft Internet Explorer") {
			document.images.photo.style.filter="blendTrans(duration=.5)";
			document.images.photo.filters.blendTrans.Apply();	
		}
	    document.images.photo.src = photourl;
		if (navigator.appName == "Microsoft Internet Explorer") {
			document.images.photo.filters.blendTrans.Play();
		}
        slidecounter++;
        if (slidecounter == photocount) slidecounter = 0;
        slideshowid = setTimeout('RunSlideShow(' + photocount + ', ' + slideshowrunning + ')', 2050);
     }
     if (slideshowrunning == 0) {
        clearTimeout(slideshowid);
     }
}
