// JavaScript Document

		var slideShowSpeed = 3500;

		// Duration of crossfade (seconds)
		var crossFadeDuration = 3;

		// Specify the image files
		var Pic = new Array(); // don't touch this
		var PicCaption = new Array(); // don't touch this
		var strSlideShowID = 'REMSSlideShowViewer1_SlideShow'; // get the new client ID from the user control
		
		Pic[0] = 'images/colom/Colom1.jpg';
PicCaption[0] = "";
Pic[1] = 'images/colom/Colom1.jpg';
PicCaption[1] = "";
Pic[2] = 'images/colom/Colom2.jpg';
PicCaption[2] = "";
Pic[3] = 'images/colom/Colom3.jpg';
PicCaption[3] = "";
Pic[4] = 'images/colom/Colom4.jpg';
PicCaption[4] = "";
Pic[5] = 'images/colom/Colom5.jpg';
PicCaption[5] = "";
Pic[6] = 'images/colom/Colom6.jpg';
PicCaption[6] = "";
Pic[0] = 'images/colom/Colom1.jpg';
PicCaption[0] = "";
Pic[1] = 'images/colom/Colom2.jpg';
PicCaption[1] = "";
Pic[2] = 'images/colom/Colom3.jpg';
PicCaption[2] = "";
Pic[3] = 'images/colom/Colom4.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; //sets up to run the actual slide show
		
		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++) {//loop through images
				intHeight = preLoad[i].height; //get unaltered height
				intWidth = preLoad[i].width; //get unaltered width
				intPercentDif = intStandardWidth / intWidth; // make it the right size
				intHeight = intHeight * intPercentDif;
																	
				if (intTallestHeight < intHeight) {					
					intTallestHeight = intHeight;
				}//end if				
			}//end for
			
			if (intTallestHeight > objImageArea.height) {
				objImageArea.height = intTallestHeight + 5;	 //add 5 to avoid popping					
			}//end if					
		}//end adjustImageSize()

		function runSlideShow() {		
			if (m_intArrayLen > 1) {//if there is more than one pic
				adjustImageSize();
			}//end if
			
			if (m_intArrayLen > 0) { // if there is a SLIDE SHOW				
				m_intCurrentIndex = m_intCurrentIndex + 1;
				
				if (m_intCurrentIndex > (m_intArrayLen-1)) { // reset back
					m_intCurrentIndex=0
				}// end if
								
				displaySlide();	
				
				clearTimeout(m_intTimeOut); // reset first
				m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed);
			}// end if
		}// end runSlideShow()

		function showPrevSlide() {			
			m_intCurrentIndex = m_intCurrentIndex - 1;
			
			if (m_intCurrentIndex < 0) { // reset back
				m_intCurrentIndex=(m_intArrayLen-1)
			}// end if
			
			displaySlide();	
		}// end showPrevSlide()

		function showNextSlide() {
			m_intCurrentIndex = m_intCurrentIndex + 1;
			
			if (m_intCurrentIndex > (m_intArrayLen-1)) { // reset back
				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()
