function runStories()
{
	// :: Set the Start Values ::
	intActiveStory = 4;
	intCurrentLen = 0;

	if (document.getElementById) {	
		objStoryScroller = document.getElementById("StoryScroller");
		startStories();
	}
}

function startStories()
{
	var myTimeout;  
	// Go for the next story data block
	if(intCurrentLen == 0)
	{
		intActiveStory++;
		intActiveStory = intActiveStory % intTotalStories;
		theStorySummary = arrNewsStories[intActiveStory][0];		
		objStoryScroller.href = arrNewsStories[intActiveStory][1];
	}
	// :: update the scroller to the current story ::
	objStoryScroller.innerHTML = theStorySummary.substring(0,intCurrentLen) + '_';

	// :: set the length and timeout for this story ::
	if(intCurrentLen < theStorySummary.length)
	{
		intCurrentLen++;
		intTimeout = theCharacterTimeout;
	}
	else
	{
		intCurrentLen = 0;
		intTimeout = intStoryChange;
	}

	// :: loop to the next story ::
	setTimeout("startStories()", intTimeout);
}

var theCharacterTimeout = 43;
var intStoryChange = 4500;
var arrNewsStories = new Array();

arrNewsStories[0] = new Array(2);

arrNewsStories[0][0] = "New Gallery Launched - Cornish Riding Holidays";
arrNewsStories[0][1] = "Default.asp?Area=News&Story=400";
arrNewsStories[1] = new Array(2);

arrNewsStories[1][0] = "Looking for work in Redruth Cornwall? try our new site";
arrNewsStories[1][1] = "Default.asp?Area=News&Story=401";
arrNewsStories[2] = new Array(2);

arrNewsStories[2][0] = "Cheekymonkeyparties.co.uk - New online shop opens for business";
arrNewsStories[2][1] = "Default.asp?Area=News&Story=372";

var intTotalStories = 3;

