thisday = new Date();
var eventmessage = "" ;
var all = false ;
if ( document.URL.indexOf("#all") != -1 ) {all = true} 

d=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
m=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
//date=new Date();
//day=date.getDate();
//year=date.getYear();
//if (year < 2000) year=year+1900;
//TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
//document.write(TodaysDate);

function Event(ed, em, ey, event, preShow) {

if (preShow == undefined) {preShow = 350} ; // number of days prior to the event that it will be displayed
preShow = thisday.getTime() + (preShow * 86400000 ) ;

em = em - 1 ; // in the new date function the month is based on Jan = 0	
eventdate = new Date(ey,em,ed) ;	
// if (((thisday - 86400000) < eventdate) && ((eventdate.getTime() <= preShow) || all )) {
if ((((thisday - 86400000) < eventdate) && (eventdate.getTime() <= preShow)) || all ) {  // to show historic ones as well
eventday = eventdate.getDate();
eventyear = eventdate.getYear();
eventrealdate=d[eventdate.getDay()]+"</td><td align='right' valign='top'>"+eventdate.getDate()+"</td><td  valign='top'>"+m[eventdate.getMonth()] ;
eventmessage += "<tr><td valign='top'>" + eventrealdate  + "</td><td>&nbsp;</td><td>" + event + "</td></tr>"
}
} 

//Place EVENTS here	
// Format is Event(dd,mm,yyyy,"description",days);
// If a double quote is required in the description then it must be entered as  \"
// days is the number of days prior to the event that it will be displayed.  It may be omitted (leave out the comma as well) when it will default to 100 days



Event(4,12,2009,"CHRISTMAS PARTY  - Mrs C Hayward - Christmas Past & Present") ;
Event(7,1,2010,"MEMBERS' MEETING - Raffle and Bring &amp; Buy") ;
Event(4,2,2010,"Major Paul Whittle - Rock Steady - The Gibraltar Story 1704-2004") ;
Event(16,2,2010,"<TABLE BORDER CELLSPACING=\"0\" CELLPADDING=\"6\" width=\"90%\" align=\"center\"><tr><td bgcolor=\"#ffffff\"><center><b><big>WOMEN reaching WOMEN</big></b><br><small>WI, Oxfam and the Freedom Foundation working together to raise the awareness of the<br>Millennium Development Goals and the effect on women internationally.</small><p><b>A ONE-DAY CONFERENCE</b><br>Focusing on Climate Change and HIV/AIDS<br>Tuesday 16th February 2010<br>St Anne's Church Centre - 10am - 3.30pm.<p>Adam Askew - Head of Campaigns UK at Oxfam<br>Nancy Lindisfarne - Climate Change - just back from Copenhagen<br>Winnie Ssanyu Sseruma - Treatment Development - HIV i-Base<p><small>This is part of a WI/Oxfam 3-year project to highlight Women and Climate Change. It is not a fund-raising campaign but aims to promote an understanding of the role that individuals can play to support development efforts throughout the world. The main objective is to establish a network of those involved in this work and is being partially funded by the Department for International Development.</small><p>Entry is by ticket only. Cost: £5 to include coffee &amp; biscuits and buffet lunch.<br>This cost reflects partial subsidy from DFID. For tickets and more details contact<br>Gret Woodason on 01276 479419 - <a href=\"mailto//Gret@Woodason.me.uk\">Gret@Woodason.me.uk</a> - 1 College Ride, Bagshot GU19 5EW <br>or Carolyn Norman - 01276 471192</center></td></tr></table>") ;
Event(4,3,2010,"Mr D James  - TALES OF THE PARANORMAL ") ;
Event(1,4,2010,"87th BIRTHDAY PARTY - Mr Maddy - 'Magic Show'") ;
Event(6,5,2010,"PLOUGHMAN'S LUNCH at 12.45pm Prior to RESOLUTIONS, Raffle &amp; Display of old WI photographs. ") ;
Event(3,6,2010,"Sharon Cross - Curator Surrey Heath Museum - 'Open All Hours' - Slides or PowerPoint") ;
Event(1,7,2010,"Mr Ken Dalston -  'That's The Way To Do It'  - Experiences of a Punch and Judy Man") ;
Event(5,8,2010,"MEMBERS' GARDEN PARTY ") ;
Event(2,9,2010,"Mr P Durrant - History and Humour of Fleet Street. Raffle and Bring &amp;  Buy") ;
Event(7,10,2010,"Sarah Fordham -  'They're Changing the Guard at Buckingham Palace' - Tales of a Blue Badge Guide") ;
Event(4,11,2010,"ANNUAL MEETING ") ;
Event(2,12,2010,"CHRISTMAS PARTY ") ;
// end of list of events

if (eventmessage > ""){
document.write("<h3>Forthcoming Events</h3>") ;
if ( all == true) {document.write("<p><center><b>All events being displayed.</b></center>")} ;

document.write("<table border=0 id=\"main1\" align=\"center\">" + eventmessage) ;
document.write("</table><p><blockquote>All meetings commence at 2.15pm in St Anne's Parish Hall, Church Road, Bagshot unless otherwise stated.<br>Contact Gret Woodason on 01276&nbsp;479419 for further details<!--  or if tickets are required -->.</blockquote>");
}
else {
document.write("<div id=\"main1\">Please join us at St Anne's Parish Hall on the first Thursday in the month at 2.15pm and enjoy a varied, interesting and entertaining programme.<P>For further details contact the President: Gret Woodason on 01276&nbsp;479419.</div>");
}

