// JavaScript Document

      textlist=new Array
      ( 	 
	<!--Put ticker text here, each line, except last, ending with a comma-->
	"The Agripa Ultra system is available FREE as of 1st July 2011",
	"Read all about it – Agripa in the news",
	"Be inspired – follow us on Flickr", 
	"Keep up to date with the latest news from Agripa"
	<!--End of ticker text-->


      );
	  linkslist=new Array
      ( 
	"http://www.agripa.com/freesystem.html",
	"http://www.facebook.com/album.php?aid=65338&id=181767581837152&l=c957acd8de",
	"http://www.flickr.com/photos/agripasolutions/collections/72157625512432450/",
	"http://www.agripa.com/news.php"
	  );
	  
function showlink(arrayno) {
var linkcontent =document.getElementById("textlink");
linkcontent.innerHTML = "<a href = '" + linkslist[arrayno] + "'>" + textlist[arrayno] + "</a>";
}
var timer;
var locator = 0;
var i = 0;
function rotateLinks(i)
{
if (i >=textlist.length) i = 0;
showlink(i);
timer= setTimeout ("rotateLinks("+(i+1)+")",4000);
locator = i +1;
}

function toggle()
{
if (stopgoimg.alt == "pause")
{clearTimeout(timer);
stopgoimg.src = "images/go.gif";
stopgoimg.alt = "go";}
else 
{stopgoimg.src = "images/pause.gif";
stopgoimg.alt = "pause";
rotateLinks(locator);
}}
function prevlink(k)
{
clearTimeout(timer);
stopgoimg.src = "images/go.gif";
stopgoimg.alt = "go";
if (k==0) {k = textlist.length -1;}
else {k = k -1;}
showlink(k);
locator = k;
}

function nextlink(j)
{
clearTimeout(timer);
stopgoimg.src = "images/go.gif";
stopgoimg.alt = "go";
if (j==textlist.length-1)
{j=0;}
else
{j =j + 1;}
showlink(j);
locator = j;
}
