// JavaScript Document
//SLIDE SHOW SETTINGS
// Set slideShowSpeed (seconds)
var slideShowSpeed = 3

// Duration of crossfade (seconds)
var crossFadeDuration = 2


// Specify the images
var Pic = new Array() // 
Pic[0] = "../_images/_slideshows/_about/building_16.jpg";
Pic[1] = "../_images/_slideshows/_about/building_13.jpg";
Pic[2] = "../_images/_slideshows/_about/building_4.jpg";
Pic[3] = "../_images/_slideshows/_about/building18.jpg";
Pic[4] = "../_images/_slideshows/_about/building_2.jpg";
Pic[5] = "../_images/_slideshows/_about/building_12.jpg";
Pic[6] = "../_images/_slideshows/_about/building_10.jpg";
Pic[7] = "../_images/_slideshows/_about/building_9.jpg";
Pic[8] = "../_images/_slideshows/_about/building_5.jpg";
Pic[9] = "../_images/_slideshows/_about/building_11.jpg";
Pic[10] = "../_images/_slideshows/_about/building_8.jpg";
Pic[11] = "../_images/_slideshows/_about/building20.jpg";
Pic[12] = "../_images/_slideshows/_about/building_3.jpg";
Pic[13] = "../_images/_slideshows/_about/building_15.jpg";
Pic[14] = "../_images/_slideshows/_about/building_14.jpg";


var t
var j = 0
var p = Pic.length
var showOn=1
var slideShowSpeed= slideShowSpeed*1000;
var pauseBtnText = document.getElementById("pause");

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

var IE = (document.all) ? 1 : 0;
var DOM = 0; 
if (parseInt(navigator.appVersion) >=5) {DOM=1};




function runSlideShow(){
	
	if (showOn == 1 ) {
	   changeContent()
	   j = j + 1
	   l= j-1;
	   if (j > (p-1)) j=0
	   t = setTimeout('runSlideShow()', slideShowSpeed)
	}
}

function linkClicked() {
	location.href=NextLinks[l];	
}


function tabPause() {
	if (showOn == 1) {
		showOn = 0
		//document.images.pauseBtn.src="_images/tab_play.gif";
		var pauseBtnText = document.getElementById("pause");
		pauseBtnText.innerHTML="[Play]";
		pauseBtnText.style.color="#4379b1";
	} else if (showOn == 0) {
		showOn = 1
		runSlideShow()
		//document.images.pauseBtn.src="_images/tab_pause.gif";
		var pauseBtnText = document.getElementById("pause");
		pauseBtnText.innerHTML="[Pause]";
		pauseBtnText.style.color="#4379b1";
	}
}

function tabButton(w) {
	showOn = 0
	//document.images.pauseBtn.src="_images/tab_play.gif";
	var pauseBtnText = document.getElementById("pause");
	pauseBtnText.innerHTML="[Play]";
	pauseBtnText.style.color="#4379b1";
	j=w
	l=w

	changeContent()
	
}

function resetTabColors() {
	tab1=document.getElementById('tabOne');
	tab2=document.getElementById('tabTwo');
	tab3=document.getElementById('tabThree');
	tab4=document.getElementById('tabFour');
	tab5=document.getElementById('tabFive');
	tab6=document.getElementById('tabSix');
	tab7=document.getElementById('tabSeven');
	tab8=document.getElementById('tabEight');
	tab9=document.getElementById('tabNine');
	tab10=document.getElementById('tabTen');
	tab11=document.getElementById('tabEleven');
	tab12=document.getElementById('tabTwelve');
	tab13=document.getElementById('tabThirteen');
	tab14=document.getElementById('tabFourteen');
	tab15=document.getElementById('tabFifteen');

	tab1.style.color="#4379b1";
	tab2.style.color="#4379b1"; 
	tab3.style.color="#4379b1";
	tab4.style.color="#4379b1";
	tab5.style.color="#4379b1";
	tab6.style.color="#4379b1";
	tab7.style.color="#4379b1";
	tab8.style.color="#4379b1";
	tab9.style.color="#4379b1";
	tab10.style.color="#4379b1";
	tab11.style.color="#4379b1";
	tab12.style.color="#4379b1";
	tab13.style.color="#4379b1";
	tab14.style.color="#4379b1";	
	tab15.style.color="#4379b1";
}

function changeContent() {
	
	
	
   
   if (j == 0) {
	   
		resetTabColors();
		tab1=document.getElementById('tabOne');
		tab1.style.color="#da922b";
	   
		
	
	} else if (j == 1) {
	 
	   	resetTabColors();
		tab2=document.getElementById('tabTwo');
		tab2.style.color="#da922b";
	   
		
	   
   } else if (j == 2) {
	   	resetTabColors();
		tab3=document.getElementById('tabThree');
		tab3.style.color="#da922b";
	   
		
	   
   } else if (j == 3) {
	   	resetTabColors();
		tab4=document.getElementById('tabFour');
		tab4.style.color="#da922b";
	   
	
	   
   } else if (j == 4) {
	   	resetTabColors();
		tab5=document.getElementById('tabFive');
		tab5.style.color="#da922b";
	   
		
	   
   } else if (j == 5) {
		resetTabColors();
		tab6=document.getElementById('tabSix');
		tab6.style.color="#da922b";
	   
		
	   
   } else if (j == 6) {
                resetTabColors();
                tab7=document.getElementById('tabSeven');
                tab7.style.color="#da922b";



   } else if (j == 7) {
                resetTabColors();
                tab8=document.getElementById('tabEight');
                tab8.style.color="#da922b";



   } else if (j == 8) {
                resetTabColors();
                tab9=document.getElementById('tabNine');
                tab9.style.color="#da922b";



   } else if (j == 9) {
                resetTabColors();
                tab10=document.getElementById('tabTen');
                tab10.style.color="#da922b";



   } else if (j == 10) {
                resetTabColors();
                tab11=document.getElementById('tabEleven');
                tab11.style.color="#da922b";



   } else if (j == 11) {
                resetTabColors();
                tab12=document.getElementById('tabTwelve');
                tab12.style.color="#da922b";



   } else if (j == 12) {
                resetTabColors();
                tab13=document.getElementById('tabThirteen');
                tab13.style.color="#da922b";



   } else if (j == 13) {
                resetTabColors();
                tab14=document.getElementById('tabFourteen');
                tab14.style.color="#da922b";



   } else if (j == 14) {
                resetTabColors();
                tab15=document.getElementById('tabFifteen');
                tab15.style.color="#da922b";



   } else if (j == 15) {
                resetTabColors();
                tab16=document.getElementById('tabSixteen');
                tab16.style.color="#da922b";



   } else if (j == 16) {
                resetTabColors();
                tab17=document.getElementById('tabSeventeen');
                tab17.style.color="#da922b";



   } else if (j == 17) {
                resetTabColors();
                tab18=document.getElementById('tabEightteen');
                tab18.style.color="#da922b";



   }

   if (document.all){
	  document.images.SlideShow.style.filter="blendTrans(duration=2)"
	  document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
	  document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
	  document.images.SlideShow.filters.blendTrans.Play()
   }
}

