//<!--
/**
* Menu Script
*
									YYYY,MM,DD	Title						Graphic (220 pixels wide)				ALT Text
*/
var	oConcertPosters		= new Array(
									[2009,10,31,"Sing Hallelujah","20091031_SingHallelujah_220x317.gif","Come and join the Choral Society and St Mary's Church Choir in a project by the BBC and English National Opera, encouraging people across the UK to find their voice and discover the joy of singing through Handel's famous 'Hallelujah Chorus'"],
									[2009,11,07,"Handel's Messiah","20091107_HandelMessiah_220x313.gif",".To mark the 250th anniversary of his death, we perform Handel’s most enduring and popular work, accompanied by an orchestra of period instruments at Baroque pitch, recreating an authentic sound from Handel’s time"],
									[2009,12,05,"Spirit of Christmas","20091205_SpiritOfChristmas_220x198.gif","Join us for a seasonal musical celebration with choirs from local schools"],
									[2010,02,06,"A day at the Opera","20100206_SingingDay_220x257.gif","Throw caution to the wind as you join the opera chorus for a day. Last season’s energetic and entertaining workshop with Colin Baldy was much appreciated so we’re especially pleased he’s agreed to return to guide our interpretation of the many moods and colours of some favourite opera choruses"],
									[2010,03,20,"Monteverdi's Vespers 1610","20100320_MonteverdiVespers1610_220x308.gif","Four hundred years later and there’s no doubting Monteverdi’s genius and the juxtaposition of the ‘old’ renaissance with the dramatic ‘new’ Baroque styles is as striking now as it would have been for a contemporary audience. Voces 8 provides a line-up of superb young soloists for this 400th anniversary performance"],
									[2010,06,11,"Summer Prom","20100612_SummerProms_220x336.gif","We’re very happy to welcome Crispian Steele-Perkins back to share the platform for this season’s summer proms at Saffron Walden and Stansted"],
									[2010,06,19,"Summer Prom","20100619_SummerProms_220x336.gif","The Summer Proms concert is being rerun on the 20th of June at St John's Church Stansted"]
									[2010,06,19,"Brahm's Requiem","20100711_BrahmsRequiem_220x371.gif","SWCS is very pleased to be taking part in the Thaxted Festival this year. In keeping with the Festival theme of ‘The Victorians and their contemporaries’, we shall perform the Brahms Requiem"]
);
	iMaxConcerts		= oConcertPosters.length;
	oClassName			= null;
	sURL				= " "+document.location;
	dNow				= new Date();
	i1stConcert			= null;
	i2ndConcert			= null;
	i3rdConcert			= null;
	i4thConcert			= null;

function get1stConcert()
{
	var	iConcert		= 0;

	while (i1stConcert == null && iConcert < iMaxConcerts)
	{
		var	dConcert	= new Date().setFullYear(oConcertPosters[iConcert][0],oConcertPosters[iConcert][1]-1,oConcertPosters[iConcert][2]);

		if (dNow <= dConcert)
			i1stConcert = iConcert;
		else
			++iConcert;		
	}
}

function get2ndConcert()
{
	var	iConcert		= 0;

	if (i1stConcert == null)
		get1stConcert();
	
	iConcert = (i1stConcert == null ? 0:(i1stConcert + 1));

	while (i2ndConcert == null && iConcert < iMaxConcerts)
	{
		var	dConcert	= new Date().setFullYear(oConcertPosters[iConcert][0],oConcertPosters[iConcert][1]-1,oConcertPosters[iConcert][2]);

		if (dNow <= dConcert)
			i2ndConcert = iConcert;
		else
			++iConcert;		
	}
}

function get3rdConcert()
{
	var	iConcert		= 0;

	if (i2ndConcert == null)
		get2ndConcert();
	
	iConcert = (i3rdConcert == null ? 0:(i2ndConcert + 1));

	while (i3rdConcert == null && iConcert < iMaxConcerts)
	{
		var	dConcert	= new Date().setFullYear(oConcertPosters[iConcert][0],oConcertPosters[iConcert][1]-1,oConcertPosters[iConcert][2]);

		if (dNow <= dConcert)
			i3rdConcert = iConcert;
		else
			++iConcert;		
	}
}

function get4thConcert()
{
	var	iConcert		= 0;

	if (i3rdConcert == null)
		get3rdConcert();
	
	iConcert = (i4thConcert == null ? 0:(i3rdConcert + 1));

	while (i4thConcert == null && iConcert < iMaxConcerts)
	{
		var	dConcert	= new Date().setFullYear(oConcertPosters[iConcert][0],oConcertPosters[iConcert][1]-1,oConcertPosters[iConcert][2]);

		if (dNow <= dConcert)
			i4thConcert = iConcert;
		else
			++iConcert;		
	}
}


function getPosterNotice(sHeader,sFooter,sIcon,sGraphic,iWidth,iHeight,sAlt,sLink,sClassStyle)
{
	document.write("<TABLE class=\"poster"+sClassStyle+"\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("<TR onClick=\"window.location='"+sLink+"'\">");
	document.write("<TD align=\"center\"><IMG src=\""+sGraphic+"\" alt=\""+sAlt+"\" width=\""+iWidth+"\" height=\""+iHeight+"\" border=\"0\"><\/TD><\/TR><\/TABLE>");
}
	
function get1stPoster()
{
	get1stConcert();

	var	sGraphic	= oConcertPosters[i1stConcert][4];
		sGraphic	= sGraphic.substring(sGraphic.lastIndexOf("_"),sGraphic.length);
		sGraphic	= sGraphic.substring(0,sGraphic.lastIndexOf("."));
		sHeight		= sGraphic.substring(sGraphic.lastIndexOf("x")+1,sGraphic.length);
		sWidth		= sGraphic.substring(1,sGraphic.lastIndexOf("x"));
		dDate		= new Date().setFullYear(oConcertPosters[i1stConcert][0],oConcertPosters[i1stConcert][1]-1,oConcertPosters[i1stConcert][2]);

	getPosterNotice(oConcertPosters[i1stConcert][3],
					dDate.toLocaleString(),
					"graphics/tickets_48x30.gif",
					"graphics/posters/"+oConcertPosters[i1stConcert][4],
					sWidth,
					sHeight,
					oConcertPosters[i1stConcert][5],
					"concertsCurrentSeason.html",
					"Navy");
}


function get2ndPoster()
{
	get2ndConcert();

	var	sGraphic	= oConcertPosters[i2ndConcert][4];
		sGraphic	= sGraphic.substring(sGraphic.lastIndexOf("_"),sGraphic.length);
		sGraphic	= sGraphic.substring(0,sGraphic.lastIndexOf("."));
		sHeight		= sGraphic.substring(sGraphic.lastIndexOf("x")+1,sGraphic.length);
		sWidth		= sGraphic.substring(1,sGraphic.lastIndexOf("x"));
		dDate		= new Date().setFullYear(oConcertPosters[i2ndConcert][0],oConcertPosters[i2ndConcert][1]-1,oConcertPosters[i2ndConcert][2]);

	getPosterNotice(oConcertPosters[i2ndConcert][3],
					dDate.toLocaleString(),
					"graphics/tickets_48x30.gif",
					"graphics/posters/"+oConcertPosters[i2ndConcert][4],sWidth,sHeight,
					oConcertPosters[i2ndConcert][5],
					"concertsCurrentSeason.html",
					"Navy");
}
//-->
