var numItems = 5;

var headline = new Array;
var bodytext = new Array;

headline[0] = "BrumGoth has a nice new calendar!";
bodytext[0] = "Quickly see what's going in in Brum, with the new BrumGoth calender<br>";
bodytext[0] = bodytext[0] + "<a href='http://www.brumgoth.org.uk/cgi-bin/calendar.pl'>Check the calendar</a>";

headline[1] = "Birthday Announcements Unbuggered!";
bodytext[1] = "Found the problem that was stopping birthdays being displayed, just in time for my own to appear! Hurrah!<br>";
bodytext[1] = bodytext[1]+"<br>Now buy me a present, you ungrateful lot! ;P";

headline[2] = "Announcing TeenBrumGoth - for under 18s";
bodytext[2] = "Announcing TeenBrumGoth - BrumGoth for the under-18s.<br>";
bodytext[2] = bodytext[2]+"From Bex:<br><i>";
bodytext[2] = bodytext[2]+"I've had quite a few moans that BrumGoth is 18 and over, but given the events being mainly pub/club";
bodytext[2] = bodytext[2]+" oriented I think I shall be keeping the 18plus only rule (I don't want any emails from angry";
bodytext[2] = bodytext[2]+" parents!).<br /><br />If any of you have younger mates or siblings, do spread the word.</i><br />";
bodytext[2] = bodytext[2]+"Go to <a href='http://groups.yahoo.com/group/TeenBrumGoth/'>TeenBrumGoth</a>";

headline[3] = "Guestbook added";
bodytext[3] = "We've added a guestbook to the site! Let us know what you think of the site, what you would like to see or just ";
bodytext[3] = bodytext[3]+" say Hi! A button for the top is going to be made soon, but if you're really impatient you can go to: ";
bodytext[3] = bodytext[3]+"<br /><a href='http://www.guest-book.co.uk/book/BrumGoth'>BrumGoth's Guestbook</a>";

headline[4] = "Revamped front page!";
bodytext[4] = "The frontpage has been re-done to include the intro page as well. These news items are now clicky-hidy links";
bodytext[4] = bodytext[4]+" so you can read the bits you want and ignore the bits you don't!";



// ---- NOTHING BELOW HERE NEEDS CHANGING

function printItems() {
  for ( i = 0; i< numItems; i++ ) {
    document.write("<div>");
    document.write("<p class='newsheadline' id='newsheadline" + i + "'>");
    document.write("<a class='newsheadlink' href='javascript:toggleItem("+i+")'>"+headline[i]+"</a>" );
    document.write("</p>");
    document.write("<p class='newsbodytext' id='newsbodytext" + i + "'>");
    document.write( bodytext[i] );
    document.write("</p>");
    document.write("<br /></div>");
    var obj = document.getElementById('newsbodytext' + i);
    obj.style.display = "NONE";
  };
};

function toggleItem(idx) {
  var obj = document.getElementById('newsbodytext'+idx);
  if ( (obj.style.display).toUpperCase() == "NONE" ) {
    obj.style.display = "BLOCK";
  } else {
    obj.style.display = "NONE";
  };
};
