calEvents = new Array(
	[
		[
			[
				"7:00pm",
				"",
				"Harvey Nichols, Leeds",
				"event",
				"http://www.northernballettheatre.co.uk/email/valentine.html",
				"Valentine Speed Dating Event",
				"No need to bury your head beneath a pillow as Valentine's Day approaches. Northern Ballet Theatre and Harvey Nichols' speed dating event is a one-off evening of true romance, in Harvey Nichols&#39;"+
				"Fourth Floor Restaurant, Leeds on Monday 15 February at 7pm.<br>For all those dreading Valentine&#39;s Day, this unique speed-dating event will give single men and women in Leeds, between 28 and 48,"+
				"a fun chance to forge new connections, with tickets to NBT&#39;s production of Romeo &amp; Juliet at Leeds Grand Theatre to be won.<br>Ticket price &pound;20. Places are limited.<br>To find out more"+
				"about this special event contact Ruth Burke-Kennedy on 0113&nbsp;274&nbsp;5355."
			]
		],
		"02", "15", "2010"
	],
	[
		[
			[
				"7:30pm",
				"",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/mixed_programme_unid6919_page.aspx",
				"As Time Goes By",
				"As Time Goes By is an opportunity to see the company perform a rich variety of work by an array of talented choreographers.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"02", "23", "2010"
	],
	[
		[
			[
				"7:30pm",
				"",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/mixed_programme_unid6919_page.aspx",
				"As Time Goes By",
				"As Time Goes By is an opportunity to see the company perform a rich variety of work by an array of talented choreographers.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"02", "24", "2010"
	],
	[
		[
			[
				"2:30pm",
				"",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/mixed_programme_unid6919_page.aspx",
				"As Time Goes By",
				"As Time Goes By is an opportunity to see the company perform a rich variety of work by an array of talented choreographers.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			],
			[
				"7:30pm",
				"",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/mixed_programme_unid6919_page.aspx",
				"As Time Goes By",
				"As Time Goes By is an opportunity to see the company perform a rich variety of work by an array of talented choreographers.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"02", "25", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			],
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"02", "27", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "01", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "02", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "03", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			],
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "04", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "05", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			],
			[
				"7:30pm",
				"2hr 24min",
				"Leeds Grand Theatre",
				"performance",
				"http://www.leedsgrandtheatre.com/romeo_and_juliet_unid23b3_page.aspx",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 0884&nbsp;848&nbsp;2701"
			]
		],
		"03", "06", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			]
		],
		"05", "19", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			],
			[
				"7:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			]
		],
		"05", "20", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			]
		],
		"05", "21", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			],
			[
				"7:30pm",
				"2hr 24min",
				"Hull New Theatre",
				"performance",
				"http://www.hullcc.gov.uk/portal/page?_pageid=221,155175&_dad=portal&_schema=PORTAL&p_id=7572&p_display_mode=listing&p_option=DisplayEvent",
				"Romeo and Juliet",
				"Montagues; Capulets; a Ball; the balcony; fights; death; unrestrained passion; an all-consuming love; the ultimate tragedy.<br/>Box office: 01482&nbsp;226&nbsp;655"
			]
		],
		"05", "22", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hrs",
				"Edinburgh Festival Theatre",
				"performance",
				"http://www.eft.co.uk/festival_theatre/event.aspx?evtid=270",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0131&nbsp;529&nbsp;6000"
			]
		],
		"03", "11", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hrs",
				"Edinburgh Festival Theatre",
				"performance",
				"http://www.eft.co.uk/festival_theatre/event.aspx?evtid=270",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0131&nbsp;529&nbsp;6000"
			]
		],
		"03", "12", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hrs",
				"Edinburgh Festival Theatre",
				"performance",
				"http://www.eft.co.uk/festival_theatre/event.aspx?evtid=270",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0131&nbsp;529&nbsp;6000"
			],
			[
				"7:30pm",
				"2hrs",
				"Edinburgh Festival Theatre",
				"performance",
				"http://www.eft.co.uk/festival_theatre/event.aspx?evtid=270",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0131&nbsp;529&nbsp;6000"
			]
		],
		"03", "13", "2010"
	],
	[
		[
			[
				"7:45pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			]
		],
		"03", "16", "2010"
	],
	[
		[
			[
				"7:45pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			]
		],
		"03", "17", "2010"
	],
	[
		[
			[
				"2:00pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			],
			[
				"7:45pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			]
		],
		"03", "18", "2010"
	],
	[
		[
			[
				"7:45pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			]
		],
		"03", "19", "2010"
	],
	[
		[
			[
				"2:00pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			],
			[
				"7:45pm",
				"2hrs",
				"Sheffield Lyceum Theatre",
				"performance",
				"http://www.sheffieldtheatres.co.uk/index.cfm?fuseaction=whatson.production&ProductionID=876",
				"Wuthering Heights",
				"Passionate and obsessive, Cathy and Heathcliff's love is as unruly and dangerous as the Yorkshire moors that surround them.<br/>Box office: 0114&nbsp;249&nbsp;6000"
			]
		],
		"03", "20", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			]
		],
		"03", "23", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			]
		],
		"03", "24", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			]
		],
		"03", "25", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			]
		],
		"03", "26", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Woking New Victoria Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/689/New-Victoria-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0844&nbsp;871&nbsp;7645"
			]
		],
		"03", "27", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			]
		],
		"04", "13", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			]
		],
		"04", "14", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			]
		],
		"04", "15", "2010"
	],
	[
		[
			[
				"6:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			]
		],
		"04", "16", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan (AD)",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Nottingham",
				"performance",
				"http://www.royalcentre-nottingham.co.uk/default.asp?id=747",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0115&nbsp;989&nbsp;5555"
			]
		],
		"04", "17", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			]
		],
		"04", "20", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			]
		],
		"04", "21", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			]
		],
		"04", "22", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			]
		],
		"04", "23", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Milton Keynes Theatre",
				"performance",
				"http://www.ambassadortickets.com/1496/657/Milton-Keynes/Milton-Keynes-Theatre/NBT-Peter-Pan",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 0871&nbsp;297&nbsp;5454"
			]
		],
		"04", "24", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			]
		],
		"04", "27", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			]
		],
		"04", "28", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			]
		],
		"04", "29", "2010"
	],
	[
		[
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			]
		],
		"04", "30", "2010"
	],
	[
		[
			[
				"2:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			],
			[
				"7:30pm",
				"2hr 2Min",
				"Theatre Royal Norwich",
				"performance",
				"http://www.theatreroyalnorwich.co.uk/whatson/shows/peterpan2010.aspx",
				"Peter Pan",
				"Escape to Neverland with Northern Ballet Theatre and the boy who never grew up&hellip;<br/>Box office: 01603&nbsp;630000"
			]
		],
		"05", "01", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.venuecymru.co.uk/details.php?id=825",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 01492&nbsp;872000"
			]
		],
		"05", "06", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.venuecymru.co.uk/details.php?id=825",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 01492&nbsp;872000"
			]
		],
		"05", "07", "2010"
	],
	[
		[
			[
				"2:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.venuecymru.co.uk/details.php?id=825",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 01492&nbsp;872000"
			],
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.venuecymru.co.uk/details.php?id=825",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 01492&nbsp;872000"
			]
		],
		"05", "08", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			]
		],
		"06", "02", "2010"
	],
	[
		[
			[
				"2:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			],
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			]
		],
		"06", "03", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			]
		],
		"06", "04", "2010"
	],
	[
		[
			[
				"2:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			],
			[
				"7:30pm",
				"1hr 55min",
				"Venue Cymru, Llandudno",
				"performance",
				"http://www.ambassadortickets.com/1509/654/Glasgow/Theatre-Royal-/NBT-Dangerous-Liaisons",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 0844&nbsp;871&nbsp;7647"
			]
		],
		"06", "05", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			]
		],
		"06", "09", "2010"
	],
	[
		[
			[
				"2:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			],
			[
				"7:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			]
		],
		"06", "10", "2010"
	],
	[
		[
			[
				"7:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			]
		],
		"06", "11", "2010"
	],
	[
		[
			[
				"2:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			],
			[
				"7:30pm",
				"1hr 55min",
				"New Theatre Cardiff",
				"performance",
				"http://www.newtheatrecardiff.co.uk/english/event.asp?id=342",
				"Dangerous Liaisons",
				"Seduction, conquest and revenge played out to Vivaldi&#39;s sizzling Four Seasons as two ex-lovers go head to head in a deadly dance.<br/>Box office: 029&nbsp;2087&nbsp;8889"
			]
		],
		"06", "12", "2010"
	]
);





var thisDate = 1;							// Tracks current date being written in calendar
var wordMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var today = new Date();							// Date object to store the current date
var todaysDay = today.getDay() + 1;					// Stores the current day number 1-7
var todaysDate = today.getDate();					// Stores the current numeric date within the month
var todaysMonth = today.getUTCMonth() + 1;				// Stores the current month 1-12
var todaysYear = today.getFullYear();					// Stores the current year
var monthNum = todaysMonth;						// Tracks the current month being displayed
var yearNum = todaysYear;						// Tracks the current year being displayed
var firstDate = new Date(String(monthNum)+"/1/"+String(yearNum));	// Object Storing the first day of the current month
var firstDay = firstDate.getUTCDay();					// Tracks the day number 1-7 of the first day of the current month
var lastDate = new Date(String(monthNum+1)+"/0/"+String(yearNum));	// Tracks the last date of the current month
var numbDays = 0;
var calendarString = "";
var eastermonth = 0;
var easterday = 0;


function changedate(buttonpressed) {
	if (buttonpressed == "prevyr") yearNum--;
	else if (buttonpressed == "nextyr") yearNum++;
	else if (buttonpressed == "prevmo") monthNum--;
	else if (buttonpressed == "nextmo") monthNum++;
	else  if (buttonpressed == "return") {
		monthNum = todaysMonth;
		yearNum = todaysYear;
	}

	if (monthNum == 0) {
		monthNum = 12;
		yearNum--;
	}
	else if (monthNum == 13) {
		monthNum = 1;
		yearNum++
	}

	lastDate = new Date();
	lastDate.setFullYear(yearNum,monthNum,0);
	numbDays = lastDate.getDate();
	firstDate = new Date(String(monthNum)+"/1/"+String(yearNum));
	//firstDate.setFullYear(yearNum,monthNum,1);
	firstDay = firstDate.getDay() + 1;
	createCalendar();
	return;
}


function easter(year) {
	// feed in the year it returns the month and day of Easter using two GLOBAL variables: eastermonth and easterday
	var a = year % 19;
	var b = Math.floor(year/100);
	var c = year % 100;
	var d = Math.floor(b/4);
	var e = b % 4;
	var f = Math.floor((b+8) / 25);
	var g = Math.floor((b-f+1) / 3);
	var h = (19*a + b - d - g + 15) % 30;
	var i = Math.floor(c/4);
	var j = c % 4;
	var k = (32 + 2*e + 2*i - h - j) % 7;
	var m = Math.floor((a + 11*h + 22*k) / 451);
	var month = Math.floor((h + k - 7*m + 114) / 31);
	var day = ((h + k - 7*m +114) % 31) + 1;
	eastermonth = month;
	easterday = day;
}


function createCalendar() {
	/*--
		Calculate min and max dates
	--*/
	var pgDate = new Date(); // Today
	var pgYear = pgDate.getFullYear(); // This Year
	var pgMonth = pgDate.getMonth(); // This Month
	
	// Max Date = now + 6 months
	var pgMaxMonth = pgMonth + 6;
	var pgMaxYear = pgYear;
	if(pgMaxMonth > 12) {
		pgMaxMonth = pgMaxMonth - 12;
		pgMaxYear++;
	}
	/*--
		End calculation on min & max dates
	--*/
	var daycounter = 0;
	var newTableMain = document.createElement('table');
	var newTable = document.createElement('tbody');
	
	newTable.setAttribute('border', 1);
	newTable.setAttribute('cellpadding', 0);
	newTable.setAttribute('cellspacing', 1);
	var newTr = document.createElement('tr');
	newTable.appendChild(newTr);
	
	var newTd = document.createElement('td');
	newTd.colSpan = '2';
	newTd.setAttribute('align', 'center');
	newTd.className = 'calNav';
	var newAnchor = document.createElement('a');
	newAnchor.href = '#';
	newAnchor["onclick"] = new Function("changedate('prevmo'); return false;");
	var newTN = document.createTextNode("Prev Month");
	newAnchor.appendChild(newTN);
	if(monthNum <= (pgMonth + 1) && yearNum == pgYear) {
		newTd.appendChild(newTN);
	} else {
		newTd.appendChild(newAnchor);
	}
	newTr.appendChild(newTd);
	
	var newTd = document.createElement('td');
	newTd.setAttribute('align', 'center');
	newTd.colSpan = '3';
	var newStrong = document.createElement('strong');
	var newText = wordMonth[monthNum-1] + ' &ndash; ' + yearNum;
	var newTN = document.createTextNode(wordMonth[monthNum-1] + ' &ndash; ' + yearNum);
	//newStrong.appendChild(newTN);
	newStrong.innerHTML = newText;
	newTd.appendChild(newStrong);
	newTr.appendChild(newTd);	
	
	var newTd = document.createElement('td');
	newTd.setAttribute('align', 'center');
	newTd.colSpan = '2';
	newTd.className = 'calNav';
	var newAnchor = document.createElement('a');
	newAnchor.href = '#';
	newAnchor['onclick'] = new Function("changedate('nextmo'); return false;");
	var newTN = document.createTextNode("Next Month");
	newAnchor.appendChild(newTN);
	if(monthNum >= pgMaxMonth && yearNum == pgMaxYear) {
		newTd.appendChild(newTN);
	} else {
		newTd.appendChild(newAnchor);
	}
	newTd.appendChild(newAnchor);
	newTr.appendChild(newTd);
	
	newTable.appendChild(newTr);
	
	
	var newTr = document.createElement('tr');
	newTr.className = "daysOfWeek";
	
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Sun');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Mon');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Tue');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Wed');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Thu');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Fri');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	var newTd = document.createElement('td');
	var newTN = document.createTextNode('Sat');
	newTd.appendChild(newTN);
	newTr.appendChild(newTd);
	
	newTable.appendChild(newTr);

	thisDate == 1;

	for (var i = 1; i <= 6; i++) {
		var newTr = document.createElement('tr');
		for (var x = 1; x <= 7; x++) {
			var newTd = document.createElement('td');
			daycounter = (thisDate - firstDay)+1;
			thisDate++;
			if ((daycounter > numbDays) || (daycounter < 1)) {
				var newTN = document.createTextNode(' ');
				newTd.className = 'noDate'
				newTd.appendChild(newTN);
			} else {
				var newTN = document.createTextNode(daycounter);
				if (checkevents(daycounter,monthNum,yearNum,i,x) || ((todaysDay == x) && (todaysDate == daycounter) && (todaysMonth == monthNum))){
					var newAnchor = document.createElement('a');
					newAnchor.href = '#';
					newAnchor['onclick'] = new Function('return false;');
					newAnchor.appendChild(newTN);
					newTd.appendChild(newAnchor);
					
					var uList = showevents(daycounter,monthNum,yearNum,i,x);
					if(uList != undefined) {
						var newDiv = document.createElement('div');
						newDiv.className = 'calEvent';
						newDiv.appendChild(uList);
						newTd.appendChild(newDiv);
						
						var closeBox = document.createElement('div');
						var closeX = document.createTextNode('X');
						closeBox.appendChild(closeX);
						closeBox.className = 'closeEvent';
						newDiv.appendChild(closeBox);
						
						// Setting Numberal to target URL embedded in List
						// var anchor = uList.getElementsByTagName('a')[0];
						// var aURL = anchor.href;
						// newAnchor.href = aURL;
					}
					if ((todaysDay == x) && (todaysDate == daycounter) && (todaysMonth == monthNum)) {
						newTd.className = 'today';
					}
 					else {
						newTd.className = 'hasEvent';
					}
				} else {
					newTd.className = 'noEvent';
					newTd.appendChild(newTN);
				}
			}
			newTr.appendChild(newTd);
		}
		newTable.appendChild(newTr);
	}

	var newTr = document.createElement('tr');
	var newTd = document.createElement('td');
	newTd.colSpan = '7';
	var newAnchor = document.createElement('a');
	newAnchor.href = '#';
	newAnchor['onclick'] = new Function("changedate('return'); return false;");
	var newTN = document.createTextNode('Show Current Date');
	newAnchor.appendChild(newTN);
	var newTN = document.createTextNode('Dates of events are subject to change. This is not presented as a complete list of events.');
	var newEm = document.createElement('em');
	newEm.className = 'smallPrint';
	newEm.appendChild(newTN);
	var newBr = document.createElement('br');
	newTd.appendChild(newAnchor);
	newTd.appendChild(newBr);
	newTd.appendChild(newEm);
	newTr.appendChild(newTd);
	newTable.appendChild(newTr);
	
	newTableMain.appendChild(newTable);
	
	var object=document.getElementById('calendar');
	//object.innerHTML= calendarString;
	if(document.getElementById('calendarTable')) {
		var calTable = document.getElementById('calendarTable');
		calTable.parentNode.removeChild(calTable);
	}
	newTableMain.id = 'calendarTable';
	object.appendChild(newTableMain);
	
	object.style.width = '1';
	object.style.height = '1';
	startCalendar();
	thisDate = 1;
}

function checkevents(day,month,year,week,dayofweek) {
var numevents = 0;
var floater = 0;

	for (var i = 0; i < calEvents.length; i++) {
		if (calEvents[i][0] == "W") {
			if ((calEvents[i][2] == dayofweek)) numevents++;
		}
		else if (calEvents[i][0] == "Y") {
			if ((calEvents[i][2] == day) && (calEvents[i][1] == month)) numevents++;
		}
		else if (calEvents[i][0] == "F") {
			if ((calEvents[i][1] == 3) && (calEvents[i][2] == 0) && (calEvents[i][3] == 0) ) {
				easter(year);
				if (easterday == day && eastermonth == month) numevents++;
			} else {
				floater = floatingholiday(year,calEvents[i][1],calEvents[i][2],calEvents[i][3]);
				if ((month == 5) && (calEvents[i][1] == 5) && (calEvents[i][2] == 4) && (calEvents[i][3] == 2)) {
					if ((floater + 7 <= 31) && (day == floater + 7)) {
						numevents++;
					} else if ((floater + 7 > 31) && (day == floater)) numevents++;
				} else if ((calEvents[i][1] == month) && (floater == day)) numevents++;
			}
		}
		else if ((calEvents[i][2] == day) && (calEvents[i][1] == month) && (calEvents[i][3] == year)) {
			numevents++;
		}
	}

	if (numevents == 0) {
		return false;
	} else {
		return true;
	}
}


function showevents(day,month,year,week,dayofweek) {
var theevent = "";
var floater = 0;

	for (var i = 0; i < calEvents.length; i++) {
		if (calEvents[i][2] == day && calEvents[i][1] == month && calEvents[i][3] == year) {
			var eventDate = day+'/'+month+'/'+year;
			
			var newUl = document.createElement('ul');

			for(var j = 0; j<calEvents[i][0].length; j++) {
				var calStart = calEvents[i][0][j][0];
				var calLength = calEvents[i][0][j][1];
				var calLocale = calEvents[i][0][j][2];
				var calType = calEvents[i][0][j][3];
				var calURL = calEvents[i][0][j][4];
				var calTitle = calEvents[i][0][j][5];
				var calDesc = calEvents[i][0][j][6];
				
				var newSubUl = document.createElement('ul');
				newSubUl.className = calType;
				
				// Title with link
				var newSubLi = document.createElement('li');
				var newAnchor = document.createElement('a');
				newAnchor.href = calURL;
				//var newTN = document.createTextNode(calTitle);
				//newAnchor.appendChild(newTN);
				newAnchor.innerHTML = calTitle;
				newSubLi.appendChild(newAnchor);
				newSubLi.className = 'eventTitle';
				newSubUl.appendChild(newSubLi);
				
				// Location
				var newSubLi = document.createElement('li');
				newSubLi.className = 'eventLocation'
				var newTN = document.createTextNode(calLocale);
				newSubLi.appendChild(newTN);
				newSubUl.appendChild(newSubLi);
				
				// Start & length
				var newSubLi = document.createElement('li');
				newSubLi.className = 'eventTime'
				var newTN = document.createTextNode(calStart + ' (' + calLength + ')');
				newSubLi.appendChild(newTN);
				newSubUl.appendChild(newSubLi);
				
				// Description
				var newSubLi = document.createElement('li');
				newSubLi.className = 'eventDesc';
				//var newTN = document.createTextNode(calDesc);
				//newSubLi.appendChild(newTN);
				newSubLi.innerHTML = calDesc;
				newSubUl.appendChild(newSubLi);
				
				var newUlLi = document.createElement('li');
				newUlLi.appendChild(newSubUl);
				newUl.appendChild(newUlLi);
			}
			
			return newUl;
		}
	}
}
/*
charRefToUnicode = function()
{
return this.replace(
/&#(([0-9]{1,7})|(x[0-9a-f]{1,6}));?/gi,
function(match, p1, p2, p3, offset, s)
{
return String.fromCharCode(p2 || ("0" + p3));
});
}*/

function floatingholiday(targetyr,targetmo,cardinaloccurrence,targetday) {
// Floating holidays/events of the events.js file uses:
//	the Month field for the Month (here it becomes the targetmo field)
//	the Day field as the Cardinal Occurrence  (here it becomes the cardinaloccurrence field)
//		1=1st, 2=2nd, 3=3rd, 4=4th, 5=5th, 6=6th occurrence of the day listed next
//	the Year field as the Day of the week the event/holiday falls on  (here it becomes the targetday field)
//		1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
//	example: "F",	"1",	"3",	"2", = Floating holiday in January on the 3rd Monday of that month.
//
// In our code below:
// 	targetyr is the active year
// 	targetmo is the active month (1-12)
// 	cardinaloccurrence is the xth occurrence of the targetday (1-6)
// 	targetday is the day of the week the floating holiday is on
//		0=Sun; 1=Mon; 2=Tue; 3=Wed; 4=Thu; 5=Fri; 6=Sat
//		Note: subtract 1 from the targetday field if the info comes from the events.js file
//
// Note:
//	If Memorial Day falls on the 22nd, 23rd, or 24th, then we add 7 to the dayofmonth to the result.
//
// Example: targetyr = 2052; targetmo = 5; cardinaloccurrence = 4; targetday = 1
//	This is the same as saying our floating holiday in the year 2052, is during May, on the 4th Monday
//
var firstdate = new Date(String(targetmo)+"/1/"+String(targetyr));	// Object Storing the first day of the current month.
var firstday = firstdate.getUTCDay();	// The first day (0-6) of the target month.
var dayofmonth = 0;	// zero out our calendar day variable.

	targetday = targetday - 1;

	if (targetday >= firstday) {
		cardinaloccurrence--;	// Subtract 1 from cardinal day.
		dayofmonth = (cardinaloccurrence * 7) + ((targetday - firstday)+1);
	} else {
		dayofmonth = (cardinaloccurrence * 7) + ((targetday - firstday)+1);
	}
return dayofmonth;
}

/*
	Items placed in
	<div id='calendar'></div>
*/

function startCalendar() {
	$(
		function() {
			$('.calEvent').css('position', 'absolute');
			$('.calEvent').hide();
			/*$().mousemove(
				function(e){
					$('.calEvent').css('top', e.pageY + 2);
					$('.calEvent').css('left', e.pageX + 2);
				}
			);*/
			$('.hasEvent a, .today a').click(
				function() {
					$(this).parent().children('.calEvent').fadeIn('slow');
				}
			);
			
			$('.closeEvent').click(
				function() {
					$('.calEvent').hide();
				}
			);
			
			var tableTop = $('#calendarTable').position()['top'];
			var tableLeft = $('#calendarTable').position()['left'];
			var tableWidth = $('#calendarTable').width();
			var tableHeight = $('#calendarTable').height();
			$('.calEvent').css('top', tableTop);
			$('.calEvent').css('left', tableLeft);
			$('.calEvent').css('width', tableWidth);
			$('.calEvent').css('height', tableHeight);
			$('.closeEvent').css('position', 'absolute');
			$('.closeEvent').css('left', (tableWidth - 26));
			$('.closeEvent').css('top', '0');
		}
	);
}


function calendarChecker() {
	changedate('return');
}