var line = new Array;
var rule = "<br>&nbsp<hr width=90%>";
var ii = 0;
// line[ii]=doDate("1st January") + title("TITLE GOES HERE") + 'DESCRIPTION MUST GO BETWEEN THESE QUOTES' + rule;ii++;
// line[ii]=doDate("13th January") + title("Branch Meeting") + '8pm Stratton House, Biggleswade<br>(incl final shortlist for GBG nominations).' + rule;ii++;
// line[ii]=doDate("21st-23rd January") + title("<a href='http://www.cambridgebeerfestival.com/winter/'>14th Cambridge Winter Ale Festival</a>") + 'University Social Club, Mill Lane, Cambridge.<br><a href="http://www.cambridgebeerfestival.com/winter/"><img src="http://www.cambridgebeerfestival.com/winter/waf_14_logo.png" width=200 border=0/></a>' + rule;ii++;
// line[ii]=doDate("3rd February") + title("Branch Meeting") + '8pm Rising Sun, Potton.<br>Good Beer Guide final selection.' + rule;ii++;
// line[ii]=doDate("18th-20th February") + title("<a href='http://www.sbedscamra.org.uk/festivals.lbf.asp'>27th CAMRA Luton Beer & Cider Festival</a>") + 'Hightown Sports and Arts Centre, Concorde Street, Luton, LU2 0JD.<br><img src="http://www.sbedscamra.org.uk/27th%20Luton%20BCF%20Logo%20on%20black%20C.jpg" /><br>See <a href="http://www.sbedscamra.org.uk/festivals.lbf.asp">South Beds branch website</a> for more details' + rule;ii++;
// line[ii]=doDate("12th-13th March") + title("<a href='http://www.camranorthherts.org.uk/beer-festivals/hitchin-2010-beer-cider-festival/'>Hitchin Beer & Cider Festival</a>") + 'Hitchin Town Hall.<br><img src="http://www.camranorthherts.org.uk/wp-content/uploads/2010/02/Logo-for-tickets-etc.gif" /><br>See <a href="http://www.camranorthherts.org.uk/beer-festivals/hitchin-2010-beer-cider-festival/">North Herts branch website</a> for more details' + rule;ii++;
// line[ii]=doDate("31st March") + title("Branch Meeting") + '8pm Golden Pheasant, Biggleswade.' + rule;ii++;
// line[ii]=doDate("22nd-25th April") + title("2nd William Peel Beer festival") + '<img src="images/Peel%20Beer%20Fest.jpg"  width=280 /><br>Sir William Peel, 39 High Street, Sandy' + rule;ii++;
// line[ii]=doDate("29th-3rd May") + title("4th Rising Sun Beer festival") + '<img src="images/rising sun BF.jpg"  width=280 /><br>Rising Sun, Potton' + rule;ii++;
// line[ii]=doDate("6th-9th May") + title("Stotfold Mill - Steam Fair and Country Show") + 'Beer festival - We will be running a minibus to and from the event on the evening of Thurs May 6th.* If you are interested and haven`t yet booked a place on the minibus - there are now only two left.<br>Contact ' + emailadd(soc,"<u>Tony Morris</u>") + ' to book your place.' + rule;ii++;
// line[ii]=doDate("11th May") + title("Branch AGM") + '7.30pm of 8pm start Engineers Arms, Henlow.<br>Election of branch committee for 2010-2011. Free buffet available. Nominations for the committee ASAP to ' + emailadd(sec,"<u>John Walsh</u>") + rule;ii++;
// line[ii]=doDate("24th-29th May") + title("<a href='http://www.cambridgebeerfestival.com/viewnode.php?id=23&format=html'>37th Cambridge Beer Festival</a>") + 'Jesus Green, Victoria Avenue, Cambridge.' + rule;ii++;
// line[ii]=doDate("23rd May") + title("Locale Trip") + 'Minibus trip around branch “Locale” pubs.<br>Meet-up Golden Pheasant, Biggleswade from 12 noon. Minibus pickup from Stratton House, Biggleswade 13:30 and on the Sandy, Potton, Henlow, Stotfold and Arlesey. Please book your places with ' + emailadd(soc,"<u>Tony Morris</u>") + ' ASAP; likely cost £5 per head. Further travel details to be confirmed.' + rule;ii++;
// line[ii]=doDate("15th June") + title("Branch Meeting") + '8pm Thornton Arms, Everton' + rule;ii++;
 line[ii]=doDate("24th July") + title("Thames Pub Crawl") + 'Starting at The Grapes near Limehouse Basin at lunchtime. Directions to the "start" pub are: From Kings Cross / St Pancras take Northern Line to Bank, change to DLR (Docklands Light Railway).  DLR to Westferry (total journey time about 45 minutes).  From the station go down to road level then under tube line and walk down Limehouse Causeway then Narrow Street - a walk of about five minutes.  Other pubs to be visited are The Prospect of Whitby, The Mayflower and the Town of Ramsgate all of which are close to the Thames. For further information contact <a href="mailto:malclloyd22@tiscali.co.uk">Malcolm Lloyd</a>' + rule;ii++;
 line[ii]=doDate("27th July") + title("Branch Meeting") + '8pm John O`Gaunt, Sutton.' + rule;ii++;
// line[ii]=doDate("4th August") + title("Meet the Home Brewers") + 'Test sample beers from at least three of the areas leading full mash home brewers. Meeting at the Engineers Arms, Henlow at 12 noon for a swift lunchtime pint, then at 12:30, a minibus will take half of you to Marks at Clifton, with the other half starting at Malcolms at Langford. The minibus will return about an hour later and the two parties will then swap over, before a final minibus run will deliver you all back to the Engineers at approximately 4pm. Cost for minibus will be about £1.50 - £2 per person, per trip. *There is a limit of 15 places*. Fish and chips can then be arranged at the Engineers for those who want it.<br>Contact ' + emailadd(soc,"<u>Tony Morris</u>") + ' to book your place.' + rule;ii++;
 line[ii]=doDate("3rd-7th August") + title("<a href='http://gbbf.camra.org.uk/home'>Great British Beer Festival</a>") + 'Earls Court, London.<br><a href="http://gbbf.camra.org.uk/home"><img src="http://gbbf.camra.org.uk/images/GBBF-logo.jpg" border=0/></a>' + rule;ii++;
 line[ii]=doDate("14th August") + title("Sandy Ramble") + 'starting in The Bell at 12-1230 and visiting the Queens Head and the Sir William Peel.' + rule;ii++;
 line[ii]=doDate("24th-28th August") + title("<a href='http://www.beer-fest.org.uk/index.php?module=info'>Peterborough Beer Festival</a>") + 'The Embankment, Peterborough.<br><a href="http://www.beer-fest.org.uk/index.php?module=info"><img src="http://www.peterborough-camra.org.uk/modules/beerfest/files/logo.gif "width=300 border=0/></a><br>Branch bus trip to Peterborough Beer Festival on 26th or 27th. Details TBC' + rule;ii++;
 line[ii]=doDate("4th September") + title("Biggleswade Ramble") + 'commencing at the Wheatsheaf at 1200-1230 and visiting the Stratton House Hotel, the Crown and the Golden Pheasant.' + rule;ii++;
 line[ii]=doDate("14th September") + title("Branch Meeting") + '8pm Crown, Henlow.' + rule;ii++;
// line[ii]=doDate("20th-22nd September") + title("Letchworth Beer Festival") + 'Plinston Hall, Letchworth. Details to follow.' + rule;ii++;
// line[ii]=doDate("7th-10th October") + title("<a href='http://www.northbedscamra.org.uk/beerfestival.html'>Bedford Beer Festival</a>") + 'Corn Exchange, St Pauls Square, Bedford.<br><img src="http://www.northbedscamra.org.uk/beds%20beer%20fest%2008%20v2.jpg " width=300 /><br>See <a href="http://www.northbedscamra.org.uk/beerfestival.html">North Beds branch website</a> for more details' + rule;ii++;
// line[ii]=doDate("15th-19th October") + title("Engineers Arms Beer Festival") + 'Henlow.<br><img src="http://www.engineersarms.co.uk/beer_festival.gif " width=300 />' + rule;ii++;
// line[ii]=doDate("19th October") + title("Bromham Apple Day") + 'Bromham Mill, Bromham.<br>Cider & Perry Bar, plus Hot Mulled Cider' + rule;ii++;
 line[ii]=doDate("26th October") + title("Branch Meeting") + '8pm Golden Pheasant, Biggleswade.' + rule;ii++;
 line[ii]=doDate("23rd November") + title("Branch Meeting") + '8pm Coach & Horses, Stotfold.' + rule;ii++;
// line[ii]=doDate("11th December") + title("Branch Christmas Meal") + 'Branch Christmas social at the Engineers Arms, Henlow. Details TBC.' + rule;ii++;
// line[ii]=doDate("25th December") + title("Merry Christmas and Happy New Year from the committee of East Beds CAMRA") + '<img alt="Santa_Beer (33K)" src="images/Santa_Beer.jpg" height="393" width="300" />' + rule;ii++;

var i = 0;
var scrollercontent = "";
var gap='<br><br>';
while (i < line.length) {
	scrollercontent = scrollercontent + line[i] + gap;
	i++
}

function doDate(sdate){
	var mth = sdate.split(' ');
	var dts = mth[0].split('-'); 
	var edt = "";
	var slth = dts[0].length;	
	var ssf = dts[0].substring(slth-2);
	if (slth==3){sdt = dts[0].substring(0,1);}
	if (slth==4){sdt = dts[0].substring(0,2);}
	sdt = sdt + "<sup><font size=-2>" + ssf +"</font></sup>";
	if (dts[1]!==undefined){
		var elth = dts[1].length;
		var esf = dts[1].substr(elth-2);
		if (elth==3){edt = dts[1].substring(0,1);}
		if (elth==4){edt = dts[1].substring(0,2);}
		edt = "-" + edt + "</b><sup><font size=-2>" + esf +"</font></sup>";
	}	
	return sdt + edt + " " + mth[1] + "<br>";
}

function title(ttl){
	return "<b>" + ttl + "</b><br>"
}