// JavaScript Document

		var slideShowSpeed = 3000;

		var crossFadeDuration = 3;

		var Pic = new Array(); 
		var PicCaption = new Array(); 
		var strSlideShowID = 'REMSSlideShowViewer1_SlideShow'; 
		
		Pic[0] = 'images/rural/1.jpg';
PicCaption[0] = "";
Pic[1] = 'images/rural/1.jpg';
PicCaption[1] = "";
Pic[2] = 'images/rural/2.jpg';
PicCaption[2] = "";
Pic[3] = 'images/rural/3.jpg';
PicCaption[3] = "";
Pic[4] = 'images/rural/4.jpg';
PicCaption[4] = "";
Pic[1] = 'images/rural/1.jpg';
PicCaption[1] = "";
Pic[2] = 'images/rural/2.jpg';
PicCaption[2] = "";
Pic[3] = 'images/rural/3.jpg';
PicCaption[3] = "";

		
		var m_intTimeOut;
		var m_intCurrentIndex = -1;
		var m_intArrayLen = Pic.length;
		var preLoad = new Array();
		
		for (i = 0; i < m_intArrayLen; i++)	{
			preLoad[i] = new Image();
			preLoad[i].src = Pic[i];
		}// end for
		
		window.onload = runSlideShow,titler(); 
		
		function adjustImageSize() {
			var intStandardWidth = 100;
			var intWidth = 0;
			var intHeight = 0;
			var intPercentDif = 0;
			var intCurrentHeight = 0;
			var intTallestHeight = 0;
			var intCurrentHeight = 0;		
			var objImageArea = document.getElementById('ImageArea');
			
			for (i = 0; i < preLoad.length; i++) {
				intHeight = preLoad[i].height; 
				intWidth = preLoad[i].width; 
				intPercentDif = intStandardWidth / intWidth; 
				intHeight = intHeight * intPercentDif;
																	
				if (intTallestHeight < intHeight) {					
					intTallestHeight = intHeight;
				}//end if				
			}//end for
			
			if (intTallestHeight > objImageArea.height) {
				objImageArea.height = intTallestHeight + 5;	 			
			}//end if					
		}//end adjustImageSize()

		function runSlideShow() {		
			if (m_intArrayLen > 1) {
				adjustImageSize();
			}//end if
			
			if (m_intArrayLen > 0) { 	
				m_intCurrentIndex = m_intCurrentIndex + 1;
				
				if (m_intCurrentIndex > (m_intArrayLen-1)) { 
					m_intCurrentIndex=0
				}// end if
								
				displaySlide();	
				
				clearTimeout(m_intTimeOut); 
				m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed);
			}// end if
		}// end runSlideShow()

		function showPrevSlide() {			
			m_intCurrentIndex = m_intCurrentIndex - 1;
			
			if (m_intCurrentIndex < 0) { 
				m_intCurrentIndex=(m_intArrayLen-1)
			}// end if
			
			displaySlide();	
		}// end showPrevSlide()

		function showNextSlide() {
			m_intCurrentIndex = m_intCurrentIndex + 1;
			
			if (m_intCurrentIndex > (m_intArrayLen-1)) { 
				m_intCurrentIndex=0
			}// end if
			
			displaySlide();	
		}//end showNextSlide()

		function displaySlide() {
			if (document.all) {
				document.images(strSlideShowID).style.filter="blendTrans(duration=2)";
				document.images(strSlideShowID).style.filter="blendTrans(duration=crossFadeDuration)";
				document.images(strSlideShowID).filters.blendTrans.Apply();      
			}// end if
			
			document.images(strSlideShowID).src = preLoad[m_intCurrentIndex].src;
			//document.all.SlideShowCaption.InnerText= PicCaption[m_intCurrentIndex];
							
			document.getElementById("SlideShowCaption").innerHTML = PicCaption[m_intCurrentIndex];
			//window.status= PicCaption[m_intCurrentIndex];
			
			if (document.all) {
				document.images(strSlideShowID).filters.blendTrans.Play();
			}//end if
		}// end displaySlide()

		function showVirtualTour() {
						
		}// end showVirtualTour()

		function showAllPictures() {
			var boolShowAllPics = 'True'
			
			if (boolShowAllPics == 'True'){
				window.open(
	'../Listings/AllPictures.aspx?ETID=100&PID=17212056','','left=200,top=100,width=300,height=200,scrollbars=yes menubar=no toolbar=no');

			}//end if
		}// end showAllPictures()

