	// IDX Broker Slideshow version 2.0
	// Copyright ©2012 All rights reserved.
	// This script exists soley for the purposes of allowing real estate professionals to display
	// their property information easily on their own web site. All other use prohibited.
	
	var c;
		
	var timeCharlotteSlideShowout = 3000;
	var cCharlotteSlideShowwi = 0;
	
	// iCharlotteSlideShowsf1.11 :: Image swap-fade 
	// *****************************************************
	// DOM scripting by brothercake -- http://www.brothercake.com/
	//******************************************************
	//global object
	var iCharlotteSlideShowsf = { 'clock' : null, 'fade' : true, 'count' : 1 }
	
	
	//swapCharlotteSlideShowfade setup function
	function swapCharlotteSlideShowfade()
	{
		//if the timer is not already going
		if(iCharlotteSlideShowsf.clock == null)
		{
			//copy the image object 
			iCharlotteSlideShowsf.obj = arguments[0];
			
			//copy the image src argument 
			iCharlotteSlideShowsf.src = arguments[1];
			
			//store the supported form of opacity
			if(typeof iCharlotteSlideShowsf.obj.style.opacity != 'undefined')
			{
				iCharlotteSlideShowsf.type = 'w3c';
			}
			else if(typeof iCharlotteSlideShowsf.obj.style.MozOpacity != 'undefined')
			{
				iCharlotteSlideShowsf.type = 'moz';
			}
			else if(typeof iCharlotteSlideShowsf.obj.style.KhtmlOpacity != 'undefined')
			{
				iCharlotteSlideShowsf.type = 'khtml';
			}
			else if(typeof iCharlotteSlideShowsf.obj.filters == 'object')
			{
				//weed out win/ie5.0 by testing the length of the filters collection (where filters is an object with no data)
				//then weed out mac/ie5 by testing first the existence of the alpha object (to prevent errors in win/ie5.0)
				//then the returned value type, which should be a number, but in mac/ie5 is an empty string
				iCharlotteSlideShowsf.type = (iCharlotteSlideShowsf.obj.filters.length > 0 && typeof iCharlotteSlideShowsf.obj.filters.alpha == 'object' && typeof iCharlotteSlideShowsf.obj.filters.alpha.opacity == 'number') ? 'ie' : 'none';
			}
			else
			{
				iCharlotteSlideShowsf.type = 'none';
			}
			
			//change the image alt text if defined
			if(typeof arguments[3] != 'undefined' && arguments[3] != '')
			{
				iCharlotteSlideShowsf.obj.alt = arguments[3];
			}
			
			//if any kind of opacity is supported
			if(iCharlotteSlideShowsf.type != 'none')
			{
				//copy and convert fade duration argument 
				//the duration specifies the whole transition
				//but the swapCharlotteSlideShowfade is two distinct transitions
				iCharlotteSlideShowsf.length = parseInt(arguments[2], 10) * 500;
				
				//create fade resolution argument as 20 steps per transition
				//again, split for the two distrinct transitions
				iCharlotteSlideShowsf.resolution = parseInt(arguments[2], 10) * 10;
				
				//start the timer
				iCharlotteSlideShowsf.clock = setInterval('iCharlotteSlideShowsf.swapCharlotteSlideShowfade()', iCharlotteSlideShowsf.length/iCharlotteSlideShowsf.resolution);
			}
			
			//otherwise if opacity is not supported
			else
			{
				//just do the image swap
				iCharlotteSlideShowsf.obj.src = iCharlotteSlideShowsf.src;
			}
			
		}
	};
	
	
	//swapCharlotteSlideShowfade timer function
	iCharlotteSlideShowsf.swapCharlotteSlideShowfade = function()
	{
		//increase or reduce the counter on an exponential scale
		iCharlotteSlideShowsf.count = (iCharlotteSlideShowsf.fade) ? iCharlotteSlideShowsf.count * 0.9 : (iCharlotteSlideShowsf.count * (1/0.9)); 
		
		//if the counter has reached the bottom
		if(iCharlotteSlideShowsf.count < (1 / iCharlotteSlideShowsf.resolution))
		{
			//clear the timer
			clearInterval(iCharlotteSlideShowsf.clock);
			iCharlotteSlideShowsf.clock = null;
	
			//do the image swap
			iCharlotteSlideShowsf.obj.src = iCharlotteSlideShowsf.src;
	
			//reverse the fade direction flag
			iCharlotteSlideShowsf.fade = false;
			
			//restart the timer
			iCharlotteSlideShowsf.clock = setInterval('iCharlotteSlideShowsf.swapCharlotteSlideShowfade()', iCharlotteSlideShowsf.length/iCharlotteSlideShowsf.resolution);
	
		}
		
		//if the counter has reached the top
		if(iCharlotteSlideShowsf.count > (1 - (1 / iCharlotteSlideShowsf.resolution)))
		{
			//clear the timer
			clearInterval(iCharlotteSlideShowsf.clock);
			iCharlotteSlideShowsf.clock = null;
	
			//reset the fade direction flag
			iCharlotteSlideShowsf.fade = true;
			
			//reset the counter
			iCharlotteSlideShowsf.count = 1;
		}
	
		//set new opacity value on element
		//using whatever method is supported
		switch(iCharlotteSlideShowsf.type)
		{
			case 'ie' :
				iCharlotteSlideShowsf.obj.filters.alpha.opacity = iCharlotteSlideShowsf.count * 100;
				break;
				
			case 'khtml' :
				iCharlotteSlideShowsf.obj.style.KhtmlOpacity = iCharlotteSlideShowsf.count;
				break;
				
			case 'moz' : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iCharlotteSlideShowsf.obj.style.MozOpacity = (iCharlotteSlideShowsf.count == 1 ? 0.9999999 : iCharlotteSlideShowsf.count);
				break;
				
			default : 
				//restrict max opacity to prevent a visual popping effect in firefox
				iCharlotteSlideShowsf.obj.style.opacity = (iCharlotteSlideShowsf.count == 1 ? 0.9999999 : iCharlotteSlideShowsf.count);
		}
	};



	
	document.writeln('<style type="text/css" media="all">');
	document.writeln('#IDX-CharlotteSlideShow-slideshow { text-align: center;  }');
	document.writeln('#IDX-CharlotteSlideShow-slideshowImage span { text-align: center; }');
	document.writeln('</style>');
	var nextCharlotteSlideShow = 1;
	prevCharlotteSlideShow = 10 - 1;

	document.writeln('<div id="IDX-CharlotteSlideShow-slideshow">');
	document.writeln('<div id="IDX-CharlotteSlideShow-slideshowImage">');
	document.writeln('<span><a href="" id="IDX-CharlotteSlideShow-ssImageURL" class="IDX-CharlotteSlideShow-ssLinkText"><img id="IDX-CharlotteSlideShow-ssImage" name="CharlotteSlideShow-ssImage" alt="Slideshow image" border="0"  class="IDX-CharlotteSlideShow-image" src="http://photos-5.idxco.com/096f3ff83339fb8f4e0381655635da447ee3071761" ></a></span>');
	document.writeln('</div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-priceLine"></div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-addressLine"></div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-cszLine"></div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-bedLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-bathLine" style="display:none;"></div>');
	document.writeln('<div id="IDX-CharlotteSlideShow-remarkLine" style="display:none;"></div>');
	
	document.writeln('</div>');

	function playCharlotteSlideShow()
	{
		
		
		urlVarCharlotteSlideShow = '<a href="'+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][6]+'" class="IDX-CharlotteSlideShow-ssLinkText">';
		swapCharlotteSlideShowfade(document.getElementById('IDX-CharlotteSlideShow-ssImage'), preLoadCharlotteSlideShow.src, '1', ' ');
		document.getElementById('IDX-CharlotteSlideShow-ssImageURL').href = propertiesCharlotteSlideShow[cCharlotteSlideShowwi][6];
		document.getElementById('IDX-CharlotteSlideShow-priceLine').innerHTML = urlVarCharlotteSlideShow+'$'+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][0]+'</a>';
		document.getElementById('IDX-CharlotteSlideShow-addressLine').innerHTML =  urlVarCharlotteSlideShow+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][1]+'</a>';
		document.getElementById('IDX-CharlotteSlideShow-cszLine').innerHTML = urlVarCharlotteSlideShow+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][2]+'</a>';
		document.getElementById('IDX-CharlotteSlideShow-bedLine').innerHTML = urlVarCharlotteSlideShow+'Beds: '+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][7]+'</a>';
		document.getElementById('IDX-CharlotteSlideShow-bathLine').innerHTML = urlVarCharlotteSlideShow+'Baths: '+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][8]+'</a>';
		document.getElementById('IDX-CharlotteSlideShow-remarkLine').innerHTML = urlVarCharlotteSlideShow+propertiesCharlotteSlideShow[cCharlotteSlideShowwi][9]+'</a>';
		
		preLoadCharlotteSlideShow = new Image();
		preLoadCharlotteSlideShow.src = propertiesCharlotteSlideShow[nextCharlotteSlideShow][3];
		
		updateCharlotteSlideShow();
		
		cCharlotteSlideShow = setTimeout('playCharlotteSlideShow()', timeCharlotteSlideShowout);	
		
		
	} // end play()
	function updateCharlotteSlideShow()
	{		
		cCharlotteSlideShowwi = nextCharlotteSlideShow;		
		genNextCharlotteSlideShow();
		genPrevCharlotteSlideShow();
		
	}
	function genNextCharlotteSlideShow()
	{
		nextCharlotteSlideShow = cCharlotteSlideShowwi + 1;
		if (nextCharlotteSlideShow >= 10)
			nextCharlotteSlideShow = 0;
	} // end genNext
	function genPrevCharlotteSlideShow()
	{
		prevCharlotteSlideShow = cCharlotteSlideShowwi - 1;
		if (prevCharlotteSlideShow < 0)
			prevCharlotteSlideShow = 10 - 1;
	} // end genPrev

	var propertiesCharlotteSlideShow = new Array(10);
	propertiesCharlotteSlideShow[0] = new Array('5,750,000','311 Whalley Rd','Charlotte, VT 05445 ','http://photos-5.idxco.com/096f3ff83339fb8f4e0381655635da447ee3071761','3071761','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=3071761&idxID=096','5','5','A long, private drive leads to this spectacular 68Â± acre pr...');
	propertiesCharlotteSlideShow[1] = new Array('3,850,000','1277 Thompson`s Point Rd','Charlotte, VT 05445 ','http://photos-5.idxco.com/09680cbb5cf46a913781cb0870fc7590ef04074750','4074750','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4074750&idxID=096','7','5','Cedar Farm is a glorious, historic 14-acre estate with 700+/...');
	propertiesCharlotteSlideShow[2] = new Array('1,395,000','1351 Thompsons Point Rd','Charlotte, VT 05445 ','http://photos-5.idxco.com/096efd8330759eeec98ce69999f4972b5be3108846','3108846','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=3108846&idxID=096','3','3','Lovely home with privacy and lake views and 30\\\\\\\' of lake f...');
	propertiesCharlotteSlideShow[3] = new Array('1,395,000','800 Crosswind Drive','Charlotte, VT 05445 ','http://photos-5.idxco.com/096945af979b8ba77f81cae0fe65e6e3c204067345','4067345','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4067345&idxID=096','4','1','Magnificent Adirondack shingle-style home on The Preserve! A...');
	propertiesCharlotteSlideShow[4] = new Array('1,295,000','490 Lime Kiln Road','Charlotte, VT 05445 ','http://photos-5.idxco.com/0966de7ce6c68ae22217c4f3fc03676c15e4053495','4053495','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4053495&idxID=096','4','1','Perfect for the hobby farmer or as a gentleman\\\\\\\'s farm. So...');
	propertiesCharlotteSlideShow[5] = new Array('1,295,000','220 Turtle Moon Road','Charlotte, VT 05445 ','http://photos-5.idxco.com/0969f03c08768bbb6c455f2153cb21153974080166','4080166','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4080166&idxID=096','3','2','Private Charlotte retreat with 190 feet frontage on Lake Cha...');
	propertiesCharlotteSlideShow[6] = new Array('1,295,000','347 Popple Dungeon','Charlotte, VT 05445 ','http://photos-5.idxco.com/0964031198542b7cb42a6421e00c6d24e7b4103021','4103021','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4103021&idxID=096','4','2','One of a kind location near Lake Champlain! Popple Dungeon R...');
	propertiesCharlotteSlideShow[7] = new Array('1,250,000','2766 Mt. Philo Road','Charlotte, VT 05445 ','http://photos-5.idxco.com/09626cc353001bb93e1a508840fd3676e3b4079317','4079317','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4079317&idxID=096','5','2','Rare opportunity for a large parcel in Charlotte. Wonderful ...');
	propertiesCharlotteSlideShow[8] = new Array('1,195,000','503 One Mile Road','Charlotte, VT 05445 ','http://photos-5.idxco.com/096f43dadf5e6428241caa3f66b383532144092377','4092377','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4092377&idxID=096','3','3','Stunning architect designed Shingle Style Contemporary on a ...');
	propertiesCharlotteSlideShow[9] = new Array('1,175,000','343 White Birch Lane','Charlotte, VT 05445 ','http://photos-5.idxco.com/0969b890ef173a5f004222ac030f34431c54044298','4044298','096','http://vermont-mls.startinghome.com/idx/7739/details.php?listingID=4044298&idxID=096','3','3','Sweeping views of Lake Champlain and the Adirondacks are uns...');
	var urlVarCharlotteSlideShow;
	var preLoadCharlotteSlideShow = new Image();
	preLoadCharlotteSlideShow.src = propertiesCharlotteSlideShow[cCharlotteSlideShowwi][3];
	onLoad = playCharlotteSlideShow();

