//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
monthLabels             = new Array(    'January',
                                        'February',
                                        'March',
                                        'April',
                                        'May',
                                        'June',
                                        'July',
                                        'August',
                                        'September',
                                        'October',
                                        'November',
                                        'December' 	);

//-----------------------------------------------------------------------------
// Portsmouth Junior Classes - 2007
//-----------------------------------------------------------------------------
classesPortsJunior2007 	= new Array(        new Array(1, 4, 	'junfan', 	'junior', 'Portsmouth'),
					    new Array(1, 8, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(1, 11, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(1, 15, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(1, 18, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(1, 22, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(1, 25, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(1, 29, 	'shotokan', 	'junior', 'Portsmouth'),

					    new Array(2, 1, 	'junfan', 	'junior', 'Portsmouth'),
					    new Array(2, 5, 	'grappling',	'junior', 'Portsmouth'),
	                                    new Array(2, 8, 	'shotokan',	'junior', 'Portsmouth'),
	                                    new Array(2, 12, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(2, 15, 	'grappling',	'junior', 'Portsmouth'),
	                                    new Array(2, 19, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(2, 22, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(2, 26, 	'shotokan', 	'junior', 'Portsmouth'),

                                            new Array(3, 1, 	'junfan', 	'junior', 'Portsmouth'),
  					    new Array(3, 5, 	'grappling',	'junior', 'Portsmouth'),
					    new Array(3, 8, 	'shotokan',	'junior', 'Portsmouth'),
	                                    new Array(3, 12, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(3, 15, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(3, 19, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(3, 22, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(3, 26, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(3, 29, 	'junfan', 	'junior', 'Portsmouth'),

	                                    new Array(4, 2, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(4, 5, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(4, 12, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(4, 16, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(4, 19,	 'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(4, 23, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(4, 26, 	'shotokan', 	'junior', 'Portsmouth'),
                                            new Array(4, 30, 	'junfan', 	'junior', 'Portsmouth'),

	                                    new Array(5, 3, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(5, 10, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(5, 14, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(5, 17, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(5, 21, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(5, 24, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(5, 28, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(5, 31, 	'junfan', 	'junior', 'Portsmouth'),

	                                    new Array(6, 4, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(6, 7, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(6, 11, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(6, 14, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(6, 18, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(6, 21, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(6, 25, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(6, 28, 	'junfan', 	'junior', 'Portsmouth'),

	                                    new Array(7, 2, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(7, 5, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 9, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 12, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(7, 16, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 19, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 23, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 26, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(7, 30, 	'grappling', 	'junior', 'Portsmouth'),

                                            new Array(8, 2, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 6, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 9, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(8, 13, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 16, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 20, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 23, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(8, 30, 	'grappling', 	'junior', 'Portsmouth'),

                                            new Array(9, 3, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 6, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 10, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(9, 13, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 17, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 20, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 24, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(9, 27, 	'grappling', 	'junior', 'Portsmouth'),

                                            new Array(10, 1, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 4, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 8, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(10, 11, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 15, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 18, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 22,	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(10, 25, 	'grappling', 	'junior', 'Portsmouth'),
                                            new Array(10, 29, 	'shotokan', 	'junior', 'Portsmouth'),

	                                    new Array(11, 1, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 5, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(11, 8, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 12, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 15, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 19,	 'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 22, 	'grappling', 	'junior', 'Portsmouth'),
                                            new Array(11, 26, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(11, 29, 	'shotokan', 	'junior', 'Portsmouth'),

	                                    new Array(12, 3, 	'grappling', 	'junior', 'Portsmouth'),
	                                    new Array(12, 6, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(12, 10, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(12, 13, 	'shotokan', 	'junior', 'Portsmouth'),
	                                    new Array(12, 17, 	'junfan', 	'junior', 'Portsmouth'),
	                                    new Array(12, 20, 	'grappling', 	'junior', 'Portsmouth')


				    );


//-----------------------------------------------------------------------------
// Portsmouth Senior Classes
//-----------------------------------------------------------------------------
classesPortsSenior2007 	= new Array(

					    new Array(1, 4, 	'shotokan', 	'senior', 'Portsmouth'),
					    new Array(1, 8, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(1, 11, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(1, 15, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(1, 18, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(1, 22, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(1, 25,	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(1, 29, 	'kali', 	'senior', 'Portsmouth'),

                                            new Array(2, 1, 	'shotokan', 	'senior', 'Portsmouth'),
					    new Array(2, 5, 	'junfan' , 	'senior', 'Portsmouth'),
	                                    new Array(2, 8, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(2, 12, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(2, 15, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(2, 19, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(2, 22, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(2, 26, 	'kali', 	'senior', 'Portsmouth'),

                                            new Array(3, 1, 	'shotokan', 	'senior', 'Portsmouth'),
					    new Array(3, 5, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(3, 8, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(3, 12, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(3, 15, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(3, 19, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(3, 22, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(3, 26, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(3, 29, 	'shotokan', 	'senior', 'Portsmouth'),

                                            new Array(4, 2, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(4, 5, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(4, 12, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(4, 16, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(4, 19, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(4, 23, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(4, 26, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(4, 30, 	'shotokan', 	'senior', 'Portsmouth'),

					    new Array(5, 3, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(5, 10, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(5, 14, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(5, 17, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(5, 21, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(5, 24, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(5, 28, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(5, 31, 	'shotokan', 	'senior', 'Portsmouth'),

                                            new Array(6, 4, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(6, 7, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(6, 11, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(6, 14, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(6, 18, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(6, 21, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(6, 25, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(6, 28, 	'shotokan', 	'senior', 'Portsmouth'),

                                            new Array(7, 2, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(7, 5, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(7, 9, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(7, 12, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(7, 16, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(7, 19, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(7, 23, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(7, 26, 	'shotokan', 	'senior', 'Portsmouth'),
                                            new Array(7, 30, 	'junfan', 	'senior', 'Portsmouth'),

	                                    new Array(8, 2, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(8, 6, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(8, 9, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(8, 13, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(8, 17, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(8, 20, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(8, 23, 	'shotokan', 	'senior', 'Portsmouth'),
                                            new Array(8, 30, 	'junfan', 	'senior', 'Portsmouth'),

	                                    new Array(9, 3, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(9, 6, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(9, 10, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(9, 13, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(9, 17, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(9, 20, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(9, 24, 	'shotokan', 	'senior', 'Portsmouth'),
					    new Array(9, 27, 	'junfan', 	'senior', 'Portsmouth'),

	                                    new Array(10, 1, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(10, 4, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(10, 8, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(10, 11, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(10, 15, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(10, 18,	'kali', 	'senior', 'Portsmouth'),
                                            new Array(10, 22, 	'shotokan', 	'senior', 'Portsmouth'),
                                            new Array(10, 25, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(10, 29, 	'grappling', 	'senior', 'Portsmouth'),

	                                    new Array(11, 1, 	'shotokan', 	'senior', 'Portsmouth'),
	                                    new Array(11, 5, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(11, 8, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(11, 12, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(11, 15, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(11, 19, 	'shotokan', 	'senior', 'Portsmouth'),
                                            new Array(11, 22, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(11, 26, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(11, 29, 	'shotokan', 	'senior', 'Portsmouth'),

	                                    new Array(12, 3, 	'kali', 	'senior', 'Portsmouth'),
	                                    new Array(12, 6, 	'grappling', 	'senior', 'Portsmouth'),
	                                    new Array(12, 10, 	'junfan', 	'senior', 'Portsmouth'),
	                                    new Array(12, 13, 	'kali', 	'senior', 'Portsmouth'),
                                            new Array(12, 17, 	'shotokan', 	'senior', 'Portsmouth'),
                                            new Array(12, 20, 	'junfan', 	'senior', 'Portsmouth')

				    );


//-----------------------------------------------------------------------------
// Fareham Mixed Classes
//-----------------------------------------------------------------------------
classesFarehamMixed2007 	= new Array(

				    	    new Array(1, 2, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(1, 2, 	'kali', 	'senior', 'Fareham'),
	                                    new Array(1, 9, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(1, 9, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(1, 16, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(1, 16, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(1, 23, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(1, 23, 	'shotokan', 	'senior', 'Fareham'),
					    new Array(1, 30, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(1, 30, 	'kali', 	'senior', 'Fareham'),


                                            new Array(2, 6, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(2, 6, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(2, 13, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(2, 13, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(2, 20, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(2, 20, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(2, 27, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(2, 27, 	'kali', 	'senior', 'Fareham'),

                                            new Array(3, 6, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(3, 6, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(3, 13, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(3, 13, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(3, 20, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(3, 20, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(3, 27, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(3, 27, 	'kali', 	'senior', 'Fareham'),

                                            new Array(4, 3, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(4, 3, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(4, 10, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(4, 10, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(4, 17, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(4, 17, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(4, 24, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(4, 24, 	'kali', 	'senior', 'Fareham'),

                                            new Array(5, 1, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(5, 1, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(5, 8, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(5, 8, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(5, 15, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(5, 15, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(5, 22, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(5, 22, 	'kali', 	'senior', 'Fareham'),
                                            new Array(5, 29, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(5, 29, 	'shotokan', 	'senior', 'Fareham'),

	                                    new Array(6, 5, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(6, 5, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(6, 12, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(6, 12, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(6, 19, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(6, 19, 	'kali', 	'senior', 'Fareham'),
                                            new Array(6, 26, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(6, 26, 	'shotokan', 	'senior', 'Fareham'),

					    new Array(7, 3, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(7, 3, 	'junfan'),
	                                    new Array(7, 10, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(7, 10, 	'shotokan'),
                                            new Array(7, 17, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(7, 17, 	'kali'),
                                            new Array(7, 24, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(7, 24, 	'shotokan'),
	                                    new Array(7, 31, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(7, 31, 	'junfan', 	'senior', 'Fareham'),

	                                    new Array(8, 7, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(8, 7, 	'shotokan'),
                                            new Array(8, 14, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(8, 14, 	'kali', 	'senior', 'Fareham'),
                                            new Array(8, 21, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(8, 21, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(8, 28,	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(8, 28, 	'junfan', 	'senior', 'Fareham'),

	                                    new Array(9, 4, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(9, 4, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(9, 11, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(9, 11, 	'kali', 	'senior', 'Fareham'),
                                            new Array(9, 18, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(9, 18, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(9, 25, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(9, 25, 	'junfan', 	'senior', 'Fareham'),

	                                    new Array(10, 2, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(10, 2, 	'shotokan', 	'senior', 'Fareham'),
                                            new Array(10, 9, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(10, 9, 	'kali', 	'senior', 'Fareham'),
                                            new Array(10, 16, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(10, 16, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(10, 23, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(10, 23, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(10, 30, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(10, 30, 	'shotokan', 	'senior', 'Fareham'),


                                            new Array(11, 6, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(11, 6, 	'kali', 	'senior', 'Fareham'),
                                            new Array(11, 13, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(11, 13, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(11, 20, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(11, 20, 	'junfan', 	'senior', 'Fareham'),
	                                    new Array(11, 27, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(11, 27, 	'shotokan', 	'senior', 'Fareham'),

                                            new Array(12, 4, 	'shotokan', 	'mixed', 'Fareham'),
					    new Array(12, 4, 	'kali', 	'senior', 'Fareham'),
                                            new Array(12, 11, 	'junfan', 	'mixed', 'Fareham'),
	                                    new Array(12, 11, 	'shotokan', 	'senior', 'Fareham'),
	                                    new Array(12, 18, 	'shotokan', 	'mixed', 'Fareham'),
	                                    new Array(12, 18, 	'junfan', 	'senior', 'Fareham')

				    );


//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthFarehamMixedAll() {

        timetableHeader();

        for (iMonths = 1; iMonths <= 12; iMonths ++) {
                timetableMonthHeader(iMonths);
        	timetableMonthComplex(iMonths, classesFarehamMixed2007, 10);
        	timetableMonthFooterBlank();
        }

        timetableFooter();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthFarehamMixed(month) {

        timetableMonthHeader(month);
        timetableMonthComplex(month, classesFarehamMixed2007, 0);
        //timetableMonthFooter('./timetable2007_farehammixed.html');
        timetableMonthFooterBlank();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthPortsSeniorAll() {

        timetableHeader();

        for (iMonths = 1; iMonths <= 12; iMonths ++) {
                timetableMonthHeader(iMonths);
        	timetableMonth(iMonths, classesPortsSenior2007, 9);
                timetableMonthFooterBlank();
        }

        timetableFooter();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthPortsSenior(month) {

        timetableMonthHeader(month);
        timetableMonthComplex(month, classesPortsSenior2007, 0);
        //timetableMonthFooter('./timetable2007_portsseniors.html');
        timetableMonthFooterBlank();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthPortsJuniorAll() {

        timetableHeader();

        for (iMonths = 1; iMonths <= 12; iMonths ++) {
                timetableMonthHeader(iMonths);
        	timetableMonthComplex(iMonths, classesPortsJunior2007, 9);
                timetableMonthFooterBlank();
        }

        timetableFooter();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthPortsJunior(month) {

        timetableMonthHeader(month);
        timetableMonthComplex(month, classesPortsJunior2007, 0);
        //timetableMonthFooter('./timetable2007_portsjuniors.html');
        timetableMonthFooterBlank();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonth(month, timetable, filler) {

        var entries = 0;
        for (iIndex = 0; iIndex < timetable.length; iIndex++) {

                if (timetable[iIndex][0] == month) {

                        timetableEntry(timetable[iIndex][1], timetable[iIndex][2]);
                        entries ++;
                }
        }

        if (filler != 0) {
                var spacer = filler - entries;
                for (i = 0; i < spacer; i ++) {
                	document.write('<td width="15" class="tt_title"></td>');
                }
        }
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableEntry(entrydate, entryclass) {

        document.write('<td width="15" onmouseover="ttHoverOver(this)" onmouseout="ttHoverOut(this)" class="tt_'
			+ entryclass + '">'
			+ entrydate + '</td>');

}


//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthHeader(index) {

        label = monthLabels[index - 1];
        document.write('<tr><td width="120" class="tt_title" id="date_' + index + '">&nbsp;' + label + '</td>');
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthFooter(link) {

	document.write('<td width="15" class="tt_more">&nbsp;<a href="' + link + '">more</a></td>');
        document.write('</tr>');
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthFooterBlank() {

        document.write('</tr>');
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableHeader(index, label) {

        document.write('<table cellpadding="2" cellspacing="1" border="0" width="510" bgcolor="black">');
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableFooter(index, label) {

        document.write('</table>');
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function ttHoverOver(ttEntry) {

	switch(ttEntry.className) {

		case 'tt_shotokan':
			ttEntry.className='tt_shotokan_hi';
			if(parent.document.all.shotokan != null) {
				parent.document.all.shotokan.className='tt_shotokan_hi';
			}
			break;
		case 'tt_jkd': 		
			ttEntry.className='tt_jkd_hi';
                        if(parent.document.all.jkd != null) {
				parent.document.all.jkd.className='tt_jkd_hi';
                        }
			break;
		case 'tt_junfan':
			ttEntry.className='tt_junfan_hi';
                        if(parent.document.all.junfan != null) {
				parent.document.all.junfan.className='tt_junfan_hi';
                        }
			break;
		case 'tt_kali':
			ttEntry.className='tt_kali_hi';
                        if(parent.document.all.kali != null) {
				parent.document.all.kali.className='tt_kali_hi';
                        }
			break;
		case 'tt_grappling':
			ttEntry.className='tt_grappling_hi';
                        if(parent.document.all.shotokan != null) {
				parent.document.all.grappling.className='tt_grappling_hi';
                        }
			break;
		default:                
			break;
	}
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function ttHoverOut(ttEntry) {

	switch(ttEntry.className) {

		case 'tt_shotokan_hi': 	ttEntry.className=parent.document.all.shotokan.className='tt_shotokan'; 	break;
		case 'tt_jkd_hi': 	ttEntry.className=parent.document.all.jkd.className='tt_jkd';			break;
		case 'tt_junfan_hi': 	ttEntry.className=parent.document.all.junfan.className='tt_junfan';		break;
		case 'tt_kali_hi': 	ttEntry.className=parent.document.all.kali.className='tt_kali';			break;
		case 'tt_grappling_hi': ttEntry.className=parent.document.all.grappling.className='tt_grappling';	break;
		default:                break;
	}
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthPortsSeniorAllComplex() {

        timetableHeader();

        for (iMonths = 1; iMonths <= 12; iMonths ++) {
                timetableMonthHeader(iMonths);
        	timetableMonthComplex(iMonths, classesPortsSenior2007, 9);
                timetableMonthFooterBlank();
        }

        timetableFooter();
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableMonthComplex(month, timetable, filler) {

        var entries = 0;
        for (iIndex = 0; iIndex < timetable.length; iIndex++) {

                if (timetable[iIndex][0] == month) {

                        timetableEntryComplex(	timetable[iIndex][0],
						timetable[iIndex][1],
						timetable[iIndex][2],
						timetable[iIndex][3],
						timetable[iIndex][4] );
                        entries ++;
                }
        }

        if (filler != 0) {
                var spacer = filler - entries;
                for (i = 0; i < spacer; i ++) {
                	document.write('<td width="15" class="tt_title"></td>');
                }
        }
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function timetableEntryComplex(entrymonth, entrydate, entryclass, entrystudent, entrylocation) {


        var date = new Date();
        date.setFullYear(2007, entrymonth - 1, entrydate);


        var title = "SMA Class Details:" + "\n\n" +
       		    getClassTitle(entryclass) + "\n\n" +
	            getFormattedDate(date) + "\n(" +
		    getClassTimeTitle(date.getDay(), entrystudent)+ ")\n\n" +
		    getStudentTitle(entrystudent) + "\n\n" +
		    getLocationTitle(entrylocation);


        document.write('<td width="44" class="tt_' + entryclass + '" align="middle">' +
			'<a href="#" title="' + title + '">' +
                        '<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"><tr><td align="middle" width="35" onmouseover="ttHoverOver(this)" onmouseout="ttHoverOut(this)" class="tt_' + entryclass + '">&nbsp;&nbsp;' +
			entrydate +
                        '</td></tr></table>' +
			'</a></td>');

}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function getClassTitle(className) {

        var title = '';
	switch (className) {
                case 'shotokan':  	title = 'Shotokan Karate';  					break;
                case 'junfan': 		title = 'Jun Fan Martial Arts / Jeet Kune Do / MMA';  		break;
                case 'kali':            title = 'Filipino Martial Arts / Kali';         		break;
                case 'grappling':       title = 'Grappling / Combat Submission Wrestling (CSW)';	break;
                default:                title = '';							break;
        }
        return(title);
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function getStudentTitle(studentType) {

        var title = '';
	switch (studentType) {
                case 'junior':  	title = 'Juniors (<16 years)';  	break;
                case 'senior': 		title = 'Seniors only (16 years +)';  	break;
                case 'mixed':           title = 'Juniors and Seniors';         	break;
                default:                title = 'unknown';			break;
        }
        return(title);
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function getLocationTitle(location) {

        var title = '';
	switch (location) {
                case 'Portsmouth':  	title = 'Anchorage Lodge Dojo, Portsmouth';  	break;
                case 'Fareham': 	title = 'Cams School Gym Dojo, Fareham';  	break;
                default:                title = 'unknown';				break;
        }
        return(title);
}


//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function getClassTimeTitle(day, type) {

        var title = '';
	switch (type) {
                case 'junior':  
			title = '7:30pm - 8:30pm';
			break;
                case 'senior':
			if (day == 1) { title = '8:30pm - 9:30pm'; }
                        if (day == 4) { title = '8:30pm - 9:30pm'; }
                        if (day == 2) { title = '8:00pm - 9:00pm'; }
                        break;
                case 'mixed':           
			title = '7:00pm - 8:00pm';         	
			break;
                default:                
			title = '';				
			break;
        }
        return(title);
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function highlightMonth() {

	var now 	= new Date();
	var strdate 	= 'date_' + (now.getMonth() + 1);
	var obj 	= eval('document.all.' + strdate);
	obj.className = 'tt_titlenow';
}


//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function setTimetablePage(page) {

        setCookie("sma_timetable_page", page);
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function getTimetablePage() {

	page = getCookie("sma_timetable_page");
        if (page=="") {
                return("./timetable_insert_portsmouth_seniors.html");
        } else {
                return(page);
        }
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
