//The news section of the website may be updated by adding new elements to the 'news' array
//You can use HTML to include links inside the arrays but just make sure that you close all of your tags.
// e.g. To place a link inside a news item define the array element as follows
// news[x] = "01.01.01 - Here is some news. <a href="http://www.yourlink.com">click me</a> for a link
// this will result in an output on the website which shows the news which includes a link where the words "click me" appear.

//'NEWS ARRAY' Array below. Add new elements to update the front page. The front page will only display the last three elements in the news array.

var news = new Array();
news[0] = "04.02.09 - Tim Schmidt to be awarded the prize for largest monkey won in a crooked game show..."
news[1] = "06.02.09 -"
news[2] = "10.02.09 - oh yeah, not bad"
news[3] = "09.02.09 - Welcome to the new honours students Rowan Macqueen and Ben Treverrow who will be joining the photovoltaic project."
news[4] = "13.02.09 - New website launched"
news[5] = "16.02.09 - Dr Tim Schmidt awarded the inaugural RACI Physical Chemistry Division lectureship"
news[6] = "02.03.09 - Welcome to Denis Chen and Murad Tayebjee who have begun their PhDs"
news[7] = "13.03.09 - Professor Scott Kable awarded a Fullbright Fellowship";

function NewsFeed()
{
new1 = news.length - 1;
new2 = new1 - 1;
new3 = new1 - 2;

document.getElementById ('date1').innerHTML = "<strong>"+news[new1].substring(0,9)+"</strong>";
document.getElementById ('news1').innerHTML = news[new1].substring(10);
document.getElementById ('date2').innerHTML = "<strong>"+news[new2].substring(0,9)+"</strong>";
document.getElementById ('news2').innerHTML = news[new2].substring(10);
document.getElementById ('date3').innerHTML = "<strong>"+news[new3].substring(0,9)+"</strong>";
document.getElementById ('news3').innerHTML = news[new3].substring(10);
}

function OldNews()
{

//for (i=0;i<=10;i++)
//{
//document.write("The number is " + i);
//document.write(news[i]);
//}
//document.write(news.length);
//var whole=new String(string);
//var blat=new String(string);
var blat= "";
for (i=news.length-1;i>=0;i--)
{
whole="<strong>"+news[i].substring(0,9)+"</strong>"+news[i].substring(9)+"<br>";
blat = blat+ whole;
}
document.getElementById ('blah').innerHTML =blat;
}
