// set global vars
var theitemcount;
var theCurrentStory;
var theCurrentLength;
var theDate;
var theStorySummary;
var theCharacterTimeout;
var theStoryTimeout;
var startText, endText;
var theStoryState;
var arrSummaries = new Array();
var arrURLs = new Array();
var arrDates = new Array();
function setupStories() {
arrSummaries[1] = 'New NexPrene Soft TPV for Medical Devices'
arrSummaries[2] = 'Harvest Polymers enters construction sealant market';
arrSummaries[3] = 'Harvest Polymers sponsors the Teenage Cancer Trust ';
arrSummaries[4] = 'Harvest Polymers Ltd- Rifra Masterbatches SpA Agent and Distribution Agreement';
arrSummaries[5] = 'VTC Elastoteknik Launches The Dryflex T Range';
arrSummaries[6] = 'NexPrene wins Global Automotive Approvals';
arrURLs[1] = '6.asp?MainID=6&SubID=38&NewsID=0';
arrURLs[2] = '6.asp?MainID=6&SubID=38&NewsID=11';
arrURLs[3] = '6.asp?MainID=6&SubID=38&NewsID=10';
arrURLs[4] = '6.asp?MainID=6&SubID=38&NewsID=9';
arrURLs[5] = '6.asp?MainID=6&SubID=38&NewsID=7';
arrURLs[6] = '6.asp?MainID=6&SubID=38&NewsID=1';
arrDates[1] = '26 Jun 2003'
arrDates[2] = '09 Nov 2002';
arrDates[3] = '30 Sep 2002';
arrDates[4] = '12 Sep 2002';
arrDates[5] = '05 Sep 2002';
arrDates[6] = '01 Oct 2001';
theItemCount = arrSummaries.length - 1;
return true;
}
function startTicker() {
// check browser v4+
if (parseInt(navigator.appVersion) < 4) { return }
theCharacterTimeout = 100;
theStoryTimeout = 5000;
theStoryState = 1;
theCurrentStory = 0;
theDate = "";
theCurrentLength = 0;
maxStoryLength = 65;
linkHidden = false;
theFont = '';
setupStories();
runTheTicker();
}
function runTheTicker() {
if (theItemCount == 0) { return }
if (theStoryState == 1) { setupNextStory() }
if (theCurrentLength != theStorySummary.length) {
drawStory();
} else {
closeOutStory();
}
}
function setupNextStory() {
theStoryState = 0;
theCurrentStory++;
if (theCurrentStory > theItemCount) { theCurrentStory = 1 }
theStorySummary = arrSummaries[theCurrentStory];
if (theStorySummary.length > maxStoryLength) {
theStorySummary = theStorySummary.substring(0, (maxStoryLength - 3)) + "...";
}
theDate = "Harvest Polymers News:
" + arrDates[theCurrentStory] + "
";
theCurrentLength = 0;
if (arrURLs[theCurrentStory] == '') {
startText = theFont;
endText = "";
} else {
startText = "";
endText = "";
}
}
function drawStory() {
var myWidget;
if ((theCurrentLength % 2) == 1) {
myWidget = "_";
} else {
myWidget = " ";
}
var msg = theDate + startText + theStorySummary.substring(0,theCurrentLength) + myWidget + endText;
if (document.all) { tickerie.innerHTML=msg }
theCurrentLength++;
setTimeout("runTheTicker()", theCharacterTimeout);
}
function closeOutStory() {
var msg = theFont + theDate + startText + theStorySummary + endText;
if (document.all) { tickerie.innerHTML=msg }
theStoryState = 1;
setTimeout("runTheTicker()", theStoryTimeout);
}
function insertTicker() {
if (document.all) {
document.write('
');
document.write(' ');
document.write(' ');
document.write(' ');
document.write(' ');
document.write(' | ');
document.write(' ');
document.write(' | ');
document.write(' ');
document.write(' ');
document.write(' | ');
document.write('
');
document.write('
');
} else {
document.write(' ');
}
}