<!-- Hide from old browsers
var indexI = 1;
var banner1= new Image();
banner1.src = "assets/img/sec-rotate/THE-HORIZON-ADVANTAGE-Learn-More-About-The-Advantage-01.jpg";
var banner2 = new Image();
banner2.src = "assets/img/sec-rotate/THE-HORIZON-ADVANTAGE-Learn-More-About-The-Advantage-02.jpg";
var banner3 = new Image();
banner3.src = "assets/img/sec-rotate/THE-HORIZON-ADVANTAGE-Learn-More-About-The-Advantage-03.jpg";
var banner4 = new Image();
banner4.src = "assets/img/sec-rotate/THE-HORIZON-ADVANTAGE-Learn-More-About-The-Advantage-04.jpg";

var description = new Array();
description[1] = "THE HORIZON ADVANTAGE Learn More About The Advantage";
description[2] = "THE HORIZON ADVANTAGE Learn More About The Advantage";
description[3] = "THE HORIZON ADVANTAGE Learn More About The Advantage";
description[4] = "THE HORIZON ADVANTAGE Learn More About The Advantage";

var links = new Array();
links[1] = "advantage.php";
links[2] = "advantage.php";
links[3] = "advantage.php";
links[4] = "advantage.php";

function startTime()
{
        var curDate= new Date();
        hours= curDate.getHours();
        mins= curDate.getMinutes();
        secs= curDate.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=5;	// How many seconds til the next rotation
        Timer();
}

function Timer(){
        var curDate= new Date();
        hours= curDate.getHours();
        mins= curDate.getMinutes();
        secs= curDate.getSeconds();
        curTime=hours*3600+mins*60+secs
        if (curTime>=closeTime)
        {
    		if (indexI < 4)// The number 2 is the amount of banners that you have
            {
    			indexI++;
    			document.getElementById("banner").src = eval("banner" + indexI + ".src");
    		}
    		else
            {
    			indexI = 1;
    			document.getElementById("banner").src = eval("banner" + indexI + ".src");
    		}
    		startTime();
    	}
        else
        {
                window.setTimeout("Timer()",1000)
        }
}
function clickLink(){
	window.open(links[indexI],'_blank');
}
function descript(){
	window.status = description[indexI];
}

$(document).ready(function() {
	document.getElementById("banner").src = banner1.src;
});
// -->

