


// JavaScript Document

var interval;
var timeoutOne;
var timeoutTwo;

var playerArray=new Array()

playerArray[1] = "url(/phpThumb_178/phpThumb.php?src=/luxury_images/topten/ft_4b675865e51fb.jpg&w=590&h=301)";
playerArray[2] = "url(/phpThumb_178/phpThumb.php?src=/luxury_images/topten/ft_4b552bf087dd6.jpg&w=590&h=301)";
playerArray[3] = "url(/phpThumb_178/phpThumb.php?src=/luxury_images/topten/ft_4b569714ab0b3.jpg&w=590&h=301)";

var slideArray=new Array();
slideArray[1] = "url(/luxury_images/ski_homes/photo_window.png)";
slideArray[2] = "url(/luxury_images/ski_homes/photo_window.png)";
slideArray[3] = "url(/luxury_images/ski_homes/photo_window.png)";



function slideBG(num){

var sarray = new Array("slide_1","slide_2","slide_3"); 
var iarray = new Array("image_text_1","image_text_2","image_text_3"); 
	
    document.getElementById("player_div").style.backgroundImage = playerArray[num];

for(i=0; i<sarray.length; i++){ 
      if(sarray[i] == "slide_"+num){ 
           
			document.getElementById("slide_"+num).style.backgroundColor = "#"; 
            document.getElementById("slide_"+num).style.width = "334px"; 
            document.getElementById("slide_"+num).style.marginLeft = "0px"; 
            document.getElementById("image_text_"+num).style.width = "242px"; 
      }else{ 
            document.getElementById(sarray[i]).style.backgroundColor = "#"; 
            document.getElementById(sarray[i]).style.width = "250px";
            document.getElementById(sarray[i]).style.marginLeft = "84px"; 
            document.getElementById(iarray[i]).style.width = "172px";
      } 
   }
   }


function slideBGloop() {
	slideBG(1);
    timeoutOne = setTimeout ( "slideBG(2)", 2500);
   	timeoutTwo = setTimeout ( "slideBG(3)", 5000);

}
interval = setInterval ( "slideBGloop()", 7500 );

function slideBGin(num){

var sarray = new Array("slide_1","slide_2","slide_3"); 
var iarray = new Array("image_text_1","image_text_2","image_text_3"); 
	
    document.getElementById("player_div").style.backgroundImage = playerArray[num];

for(i=0; i<sarray.length; i++){ 
      if(sarray[i] == "slide_"+num){ 
           
			document.getElementById("slide_"+num).style.backgroundColor = "#"; 
            document.getElementById("slide_"+num).style.width = "334px"; 
            document.getElementById("slide_"+num).style.marginLeft = "0px"; 
            document.getElementById("image_text_"+num).style.width = "242px"; 
      }else{ 
            document.getElementById(sarray[i]).style.backgroundColor = "#"; 
            document.getElementById(sarray[i]).style.width = "250px";
            document.getElementById(sarray[i]).style.marginLeft = "84px"; 
            document.getElementById(iarray[i]).style.width = "172px";
      } 
   }
   clearInterval(interval);
clearTimeout(timeoutOne);
clearTimeout(timeoutTwo);
}
function slideBGout(){
	interval = setInterval ( "slideBGloop()", 7500 );
}


