<!--
//set the number of divs on the page
var DivTotal = 3
var DivName = "billboard"


// Change the opacity of the selected div
function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 
	hideDiv(id);
	
	 
    //dissolve the selected div in 
    for(i = opacStart; i <= opacEnd; i++) 
		{ 
		setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
		timer++; 
    	} 
	//turn the selected div's text link on
	var textLink = document.getElementById("text"+id);
	textLink.className = DivName+"LinkOn";
	
	//reorder the divs after the dissolve
	reorderDivs(id);
} 

//turn the opacity of the selected div to 0% and move to the front
function hideDiv(id) {
	var object = document.getElementById(DivName+id).style; 
	object.opacity = 0; 
    object.MozOpacity = 0; 
    object.KhtmlOpacity = 0; 
    object.filter = "alpha(opacity=0)";
	object.zIndex = DivTotal+1; 
}

//reorder zIndex of divs and set text links to off
function reorderDivs(id) {
	var divCount
	for (divCount=1;divCount<=DivTotal;divCount=divCount+1) 	{
   	 if(id != divCount) { 
	 var object = document.getElementById(DivName+divCount).style; 
      	object.zIndex = object.zIndex - 1; 
	 var textLink = document.getElementById("text"+divCount);
		textLink.className = DivName+"LinkOff";	
	   	}
	}
}

// Highlight the text link on mouseover
function hightlightText(id) {
	 var textLink = document.getElementById('text'+id);
	 if (textLink.className != DivName+"LinkOn") {
		textLink.className = (textLink.className==DivName+"LinkOff")?DivName+"LinkHighlight":DivName+"LinkOff";
		}
}

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(DivName+id).style; 
	object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 	

function shiftOpacity(id, millisec) { 
    //restart the autoDissolve and set it to the next div in the sequence
	var nextDiv
	if(id == 1) {
		nextDiv = DivTotal
	} else {
		nextDiv = id - 1
	}
	autoDissolve(nextDiv);
	//dissolve the div in if it is not the one the top
 	if(document.getElementById(DivName+id).style.zIndex != DivTotal+1) {
		opacity(id, 0, 100, millisec); 
   } 
	
} 

// Sets the autoDissolve to show the next div in the sequence after a certain time
var xtime
function autoDissolve(id) {
	clearTimeout(xtime);
	xtime = setTimeout("shiftOpacity('" + id + "',750)",7500);
	}


function init() {
	autoDissolve('3');
	hightlightText('3');
}
window.onload = init; 

-->
