var GoValue;
GoValue = "";

//Create list of texts
var line=new Array();
line[1]="SolutionsPT Employees Embark on an Extra Mile Challenge";
line[2]="Visual KPI from Transpara ";
line[3]="Accreditation for the Best Companies in the North West revealed";
line[4]="SolutionsPT Launches New VersionDog Website";
line[5]="SolutionsPT is appointed UK and Ireland distributor of Versiondog";
line[6]="Members of SolutionsPT are taking on the biggest race of their lives ";
line[7]="SolutionsPT Ltd achieves 3 Star Status - Best Companies 2010";
line[8]="SolutionsPT Ltd Continues to Invest for the Future ";
line[9]="SolutionsPT Ltd wins Excellence in Customer Experience Accreditation";
line[10]="SolutionsPT Ltd wins special award for most improved company";
line[11]="Latest SolutionsPT News";

//Create list of links
var linkage=new Array();
linkage[1]="/news/solutionspt-employees-embark-on-an-extra-mile-challenge/13/";
linkage[2]="/news/visual-kpi-from-transpara-/12/";
linkage[3]="/news/accreditation-for-the-best-companies-in-the-north-west-revealed/10/";
linkage[4]="/news/solutionspt-launches-new-versiondog-website/9/";
linkage[5]="/news/solutionspt-is-appointed-uk-and-ireland-distributor-of-versiondog/8/";
linkage[6]="/news/members-of-solutionspt-are-taking-on-the-biggest-race-of-their-lives-/7/";
linkage[7]="/news/solutionspt-ltd-achieves-3-star-status---best-companies-2010/6/";
linkage[8]="/news/solutionspt-ltd-continues-to-invest-for-the-future-/5/";
linkage[9]="/news/solutionspt-ltd-wins-excellence-in-customer-experience-accreditation/4/";
linkage[10]="/news/solutionspt-ltd-wins-special-award-for-most-improved-company/3/";
linkage[11]="";

//Specify font size for scoller
var ts_fontsize="10px";

//Scroll through the texts and see which is longest
var longestmessage=1;
for (i=2;i<line.length;i++)
{
if (line[i].length>line[longestmessage].length)
{
longestmessage=i;
}
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length;

lines=line.length-1;

//if IE 4+ or NS6
if (document.all||document.getElementById)
{
document.write('<div id="contentToWrite"></div>');
}

temp="";
ahref="";
nextchar=-1;
nextline=1;
cursor="_";

function animate()
{
if(temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines)
{
//At this point the type has scrolled, we want to add the link to either side
ahref=linkage[nextline];
GoValue=ahref;
nextline++;
nextchar=-1;
if(ahref != "")
{
document.getElementById('contentToWrite').innerHTML="<p><a href=\"" + ahref + "\">" + temp + "</a></p>";
}
else
{
document.getElementById('contentToWrite').innerHTML="<p><strong>" + temp + "</strong></p>";
}
temp="";
ahref="";
setTimeout("nextstep()",5000);
}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length)
{
nextline=1;
nextchar=-1;
document.getElementById('contentToWrite').innerHTML="<p><strong>" + temp + "</strong></p>";
temp="";
setTimeout("nextstep()",5000);
}
else
{
nextstep();
}
}

function nextstep()
{
nextchar++;
temp+=line[nextline].charAt(nextchar);
if(nextline != "11")
{
document.getElementById('contentToWrite').innerHTML="<p><strong>" + temp + cursor + "</strong></p>";
}
else
{
document.getElementById('contentToWrite').innerHTML="<p><strong>" + temp + cursor + "</strong></p>";
}
setTimeout("animate()",25);
}

function go_button()
{
if(GoValue != "")
{
document.location.href = GoValue;
}
}
//if IE 4+ or NS6
if (document.all||document.getElementById)
{
window.onload=animate;
}

