var nt=new Object;
nt.link=new Array();
nt.text=new Array();
nt.title=new Array();

nt.link[0]="http://www.investmentu.com/2010/September/carbon-capture.html";
nt.text[0]="Is ‘Carbon Capture’ Commercially Viable? (INVESTMENT U)";
nt.title[0]="Mike Stephenson, the head of the British Geological Survey’s energy division, sympathized with the public’s concerns. But he also says that the CO2 could be stored for thousands, if not millions of years in the sandstone saline aquifiers Statoil uses. (INVESTMENT U)";
nt.link[1]="http://www.americanscientist.org/science/pub/-1063";
nt.text[1]="New Zealand Quake Was 'Known Unknown' (American Scientist)";
nt.title[1]="from New Scientist  The magnitude 7.1 earthquake that struck the South Island of New Zealand on Saturday occurred on a previously unknown fault.  The quake occurred at 4:35 am local time due to faulting in the Pacific... (American Scientist)";
nt.link[2]="http://www.bbc.co.uk/news/uk-scotland-edinburgh-east-fife-11200836";
nt.text[2]="Study into volcanic ash cloud effects planned (BBC News UK)";
nt.title[2]="A £430,000 research project into the effects of Icelandic volcanic activity on Scotland is to... (BBC News UK)";
nt.link[3]="http://www.thisisbristol.co.uk/lifestyle/Excuses-excuses-closure/article-2595847-detail/article.html";
nt.text[3]="Excuses, excuses over closure (This is Bristol)";
nt.title[3]="FOR Bristol Corporation to claim that Bridge Valley Road will remain closed indefinitely due to... (This is Bristol)";
nt.link[4]="http://www.bbc.co.uk/news/uk-scotland-north-east-orkney-shetland-11151963";
nt.text[4]="Earthquake recorded in North Sea (BBC News UK)";
nt.title[4]="An earthquake has been detected in the North Sea about 155 miles (250km) east of... (BBC News UK)";
nt.link[5]="http://googlemapsmania.blogspot.com/2010/09/uk-geology-on-google-maps.html";
nt.text[5]="UK Geology on Google Maps (Google Maps Mania)";
nt.title[5]="The British Geological Survey have a number of examples of Google Maps created with... (Google Maps Mania)";
nt.link[6]="http://edinburghnews.scotsman.com/news/Dont-tell-the-protesters-but.6503471.jp";
nt.text[6]="Don't tell the protesters, but the RBS HQ is opening to the public (Edinburgh Evening News)";
nt.title[6]="FOR the protesters who staged a week-long demo on its front lawn, the Royal Bank of Scotland's... (Edinburgh Evening News)";
nt.link[7]="http://www.yorkpress.co.uk/news/8363042.Two_earthquakes_hit_North_Yorkshire/";
nt.text[7]="Two earthquakes hit North Yorkshire (The Press)";
nt.title[7]="TWO earthquakes have hit North Yorkshire, scientists have revealed.  The epicentre of the first,.. (The Press)";
nt.link[8]="http://geologyecology.suite101.com/article.cfm/the-geology-of-the-cairngorm-mountains-in-scotland";
nt.text[8]="The Geology of the Cairngorm Mountains in Scotland (Suite101.com)";
nt.title[8]="Weathered granite on Braeriach, Cairngorm plateau - Photo by Donald Thomas Scotland's Cairngorm Mountains are the result of millions of years of earth-changing geological processes, involving mountain building and... (Suite101.com)";
nt.link[9]="http://www.indiaedunews.net/pressreleases/users/Geology_Rocks_For_International_Students_1.asp";
nt.text[9]="Geology Rocks For International Students (INDIAedunews.net)";
nt.title[9]="A summer school at the University of Derby, based in the East Midlands of the UK, has attracted students from around the world, who have been investigating the unique geology of Derbyshire and the Peak District on a number of field... (INDIAedunews.net)";



nt.ix=0;
nt.item=0;
nt.id=0;
nt.fps=12;
nt.speed=1000/nt.fps;

function startTicker(){
	nt.id=setInterval('runTicker()',nt.speed);
	}
	
function runTicker(){
	var ntRef=document.getElementById('newsTicker');
	var ntlRef=document.getElementById('newsTickerLink');
	var htmlStr='';
	var currentItem='';
	var currentlink='';
	var currentTitle='';
	
	if(nt.link.length <= nt.item){
		// run out of items - start again at the beginning
		nt.item=0;
		ntRef.innerHTML='';
		ntlRef.href=nt.link[0];
		ntlRef.title=nt.title[0];
		}
	else{
		
		currentItem=nt.text[nt.item] + '          ';
		currentlink=nt.link[nt.item];
		currentTitle=nt.title[nt.item];
				
		if(nt.ix <= currentItem.length){
			// still got some text to output
			htmlStr=currentItem.substring(0,nt.ix);
			ntRef.innerHTML=htmlStr;
			ntlRef.href=currentlink;
			ntlRef.title=currentTitle;
			nt.ix+=1;
			}
		else{
			// reached end of current link
			ntRef.innerHTML=currentItem;
			ntlRef.href=currentlink;
			ntlRef.title=currentTitle;
			nt.ix=0;
			nt.item+=1;
			}
		}
	}
	
function pauseTicker(){
	var ntRef=document.getElementById('newsTicker');
	var ntlRef=document.getElementById('newsTickerLink');
	var currentItem=nt.text[nt.item] + '          ';
	var currentlink=nt.link[nt.item];	
	clearInterval(nt.id);
	ntRef.innerHTML=currentItem;
	ntlRef.href=currentlink;
	}
	
function continueTicker(){
	startTicker();
	}
	

