/*
  * Javascript for Arts Executive Search
  */

	try {
		document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}

	var imagesToFade = new Array('one', 'four', 'three', 'two', 'five');
	var start = 0;
	
	window.onload = function(){
		createFadePanels();
		setInterval('doFades()', 6000);
	};
	
	function doFades(){ 
		Effect.Fade(imagesToFade[start], {duration:4, from:1.0, to:0.0, transition: Effect.Transitions.sinoidal});
		start++;
		if(start > imagesToFade.length - 1){
			start = 0;
		}
		Effect.Appear(imagesToFade[start], {duration:2.5, from:0.0, to:1.0, transition: Effect.Transitions.sinoidal});
	}
	
	function createFadePanels(){
		// var objBody = document.getElementsByTagName("body").item(0);
		// var objBody = document.getElementById("wrapper");
		
		for(i = 1; i < imagesToFade.length; i++){
			// var objPanel = document.createElement("div");
			// objPanel.setAttribute('id', imagesToFade[i]);
			// objPanel.setAttribute('class', 'montage');
			
			// var objh2Question = document.createElement("h2");
			// objh2Question.setAttribute('id', 'question');
			// objh2Question.innerHTML = "What are the essential qualities of arts leaders in the 21st Century?";
			// objPanel.appendChild(objh2Question);
			
			// var objh2Answer = document.createElement("h2");
			// objh2Question.setAttribute('id', 'answer');
			// objh2Question.innerHTML = "A passion for the artform";
			// objPanel.appendChild(objh2Answer);
			
			// objPanel.style.display = 'none';
			
			// objBody.appendChild(objPanel);
			
			document.getElementById(imagesToFade[i]).style.display = "none";
		}
	}

