// JavaScript Document

<!--
var secs
var counter
var timerID = null
var timerRunning = false
var delay = 1000
var articles_images
var site_images
var articles_content
var articles_links
var articles_number

function InitializeTimer(articles_images1, articles_content1, articles_links1, counter1)
{
    // Set the length of the timer, in seconds
    secs = 0
	counter = 0
	articles_images = articles_images1.split(";");
	articles_content = articles_content1.split(";");
	articles_links = articles_links1.split(";");
	articles_number = counter1;
    StartTheTimer()
}

function img_change(img_name, img_src)
{
	document[img_name].src = img_src;
}


function StartTheTimer()
{
    if (secs==0)
    {
        img_change('rot_pic1', articles_images[counter]);
	
		var handle = document.getElementById("rot_content");
		handle.innerHTML = articles_content[counter];
		
		var handle1 = document.getElementById("rot_href");
		handle1.href = articles_links[counter];
		
		secs = 5;
		counter++;
		if(counter == articles_number)
		counter = 0
		timerID = self.setTimeout("StartTheTimer()", delay)

    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

//-->

