// Seconds to wait before rotating content
var durationByline = 9;

// Start the byline counter at 0
var currentByline = 0;

// Define array length constants
var bylineItems = 2;

/* ============================= Data ============================= */

// Define the array of copy to rotate in the home page's top banner 
var arrByline = new Array(bylineItems);
arrByline[0] = "Pinpoint the advertising agency <br />by name or type you are looking for";
arrByline[1] = "Zero in on market spend, identify agencies, <br />key contacts and brand ownership";
//arrByline[2] = "Let us alert you to people <br />changes directly to your email";

/* ============================= Functions ============================= */

function rotateByline() {
    document.getElementById("divByline").innerHTML = arrByline[currentByline];
    currentByline = (currentByline == arrByline.length - 1) ? 0 : currentByline + 1;
    setTimeout("rotateByline()", durationByline * 1000);
}

function init() {
	rotateByline();
	rotateSpotlight();
}

window.onload = init;
