  var hostpage = getHost();

  function getHost() {
    thePage=unescape(location.href)
    if (thePage.indexOf('?')!==-1)
    thePage=thePage.substring(0,thePage.indexOf('?'))
    thePage=thePage.substr(thePage.lastIndexOf('/')+1)
    thePage=thePage.substr(0,thePage.lastIndexOf('.')) + '.html'
    return thePage;
  };

  function add_menu_item( link, name ) {
    if ( hostpage == link )
    return '<li class="active"><a href="' + link + '">' + name + '</a></li>' 
    else
    return '<li><a href="' + link + '">' + name + '</a></li>' 
  }
   
  function display_menu() {
     menu = add_menu_item( 'index.html', 'Home')
    + add_menu_item( 'club.html', 'Club')
    + add_menu_item( 'team.html', 'Team')
    + add_menu_item( 'season.html', 'Season')
    + add_menu_item( 'news.html', 'News')
    + add_menu_item( 'sponsors.html', 'Sponsors')
    + add_menu_item( 'contact.html', 'Contact Us');
    // $(".menu").append('<ul>' + menu + '</ul>');
     $(".footer_resize").append('<p class="lf">&copy; Copyright 2010 Paola Hibs Volleyball Club'
    + '<ul class="fmenu">' + menu + '</ul><p style="clear:both; text-align: right; font-style: italic; padding:0px">Affiliated to <a href="http://www.maltavolleyball.org/" target="\_blank" rel="nofollow" style="color:#5f5f5f">Malta Volleyball Association</a>'
    + ', <a href="http://www.sportmalta.org.mt/" target="\_blank" rel="nofollow" style="color:#5f5f5f">Kunsill Malti ghall-iSport</a></p>');
  }

  function add_header( data ) {
    output = '';
    jQuery.each(data,function(index,val) {
    output += '<th>' + val + '</th>'
    });

    return output;
  }

  function add_row_highlight( data ) {
    output = '<tr class="d1">'
    
    jQuery.each(data,function(index,val) {
    output += '<td>' + val + '</td>'
    });
    output += '</tr>'

    return output;
  }

  function add_row( data ) {
    output = '<tr class="d2">'
    
    jQuery.each(data,function(index,val) {
    output += '<td>' + val + '</td>'
    });
    output += '</td></tr>'

    return output;
  }


  /* Season Section */
  function display_season( name ) {
    $(".season").empty();
    
    switch( name )
    {
    case 'fixress'    : display_fixtures_seniors();    break;
    case 'fixresu18'  : display_fixtures_under18();    break;
    case 'fixresu15'  : display_fixtures_under15();    break;
    
    case 'standingss'   : display_standings_seniors();  break;
    case 'standingsu18' : display_standings_under18();  break;
    case 'standingsu15' : display_standings_under15();  break;
    }
  }

function display_fixtures_seniors() {
jQuery(".season").append('<h2>Fixtures & Results 2011/2012</h2><h3>Senior Women 1st Division League</h3><table id="results_table">'
+ add_header(['DATE', 'TIME', 'VENUE', 'CATEGORY', 'HOME TEAM', 'AWAY TEAM', 'RESULT'])
+ add_row(['Tuesday 13-Sep','2000','Cottonera','John Bugeja Cup Women','PAOLA HIBS CANDY', 'BKARA PLAYVOLLEY','3 - 0'])
+ add_row(['Thursday 15-Sep','2000','Cottonera','John Bugeja Cup Women','PAOLA HIBS CANDY', 'FLEUR-DE-LYS','3 - 1'])
+ add_row(['Sunday 18-Sep','1400','Cottonera','John Bugeja Cup Women','MELLIEHA', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Tuesday 20-Sep','2000','Cottonera','John Bugeja Cup Women','PAOLA JUNIORS', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Tuesday 27-Sep','2000','Cottonera','John Bugeja Cup Women','PAOLA HIBS CANDY', 'TOYOTA PLAYVOLLEY','3 - 0'])
+ add_row(['Thursday 29-Sep','2000','Cottonera','John Bugeja Cup Women','DEPIRO FLYERS', 'PAOLA HIBS CANDY','1 - 3'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Friday 23-Sep','1830','Corradino','Friendly Tournament','PAOLA HIBS CANDY', 'VOLLEY GODEGO','0 - 3'])
+ add_row(['Saturday 24-Sep','1730','Corradino','Friendly Tournament','PAOLA HIBS CANDY', 'TEAMS VOLLEY CATANIA','2 - 3'])
+ add_row(['Sunday 25-Sep','1400','Corradino','Friendly Tournament','TEAMS VOLLEY CATANIA','PAOLA HIBS CANDY', '2 - 0'])
+ add_row(['Sunday 25-Sep','0900','Corradino','Friendly Tournament','VOLLEY GODEGO', 'PAOLA HIBS CANDY','2 - 0'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Sunday 02-Oct','1430','Cottonera','Super Cup Women','FLYERS DEPIRO (FLY)', 'PAOLA HIBS CANDY (PLA)','1 - 3'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Sunday 23-Oct','1330','Cottonera','Senior Women 1st Div','FLYERS 2', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Sunday 13-Nov','1430','Cottonera','Senior Women 1st Div','FLYERS DEPIRO', 'PAOLA HIBS CANDY','1 - 3'])
+ add_row(['Sunday 27-Nov','1430','Cottonera','Senior Women 1st Div','PAOLA HIBS CANDY', 'FLEUR-DE-LYS','3 - 0'])
+ add_row(['Sunday 18-Dec','1630','Cottonera','Senior Women 1st Div','PAOLA HIBS CANDY', 'TOYOTA PLAYVOLLEY','3 - 0'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Sunday 22-Jan','1730','Cottonera','Women National Cup','FLEUR-DE-LYS', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Saturday 28-Jan','1700','Cottonera','Women National Cup','TOYOTA PLAYVOLLEY', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Sunday 29-Jan','1530','Cottonera','Women National Cup','PAOLA HIBS CANDY', 'TOYOTA PLAYVOLLEY','3 - 0'])
+ add_row(['Sunday 05-Feb','1630','Cottonera','Women National Cup','TOYOTA PLAYVOLLEY', 'PAOLA HIBS CANDY','0 - 3'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Sunday 19-Feb','1330','Cottonera','Senior Women 1st Div','PAOLA HIBS CANDY', 'FLYERS 2','3 - 0'])
+ add_row_highlight(['Sunday 26-Feb','1530','Cottonera','Senior Women 1st Div','PAOLA HIBS CANDY', 'FLYERS DEPIRO','0 - 0'])
+ add_row(['Sunday 04-Mar','1430','Cottonera','Senior Women 1st Div','TOYOTA PLAYVOLLEY', 'PAOLA HIBS CANDY','0 - 0'])
+ add_row(['Sunday 25-Mar','1330','Cottonera','Senior Women 1st Div','FLEUR-DE-LYS', 'PAOLA HIBS CANDY','0 - 0'])
+ '</table>');
}

function display_fixtures_under18() {
jQuery(".season").append('<h2>Fixtures & Results 2011/2012</h2><h3>Senior Women 2nd Division League</h3><table id="results_table">'
+ add_header(['DATE', 'TIME', 'VENUE', 'CATEGORY', 'HOME TEAM', 'AWAY TEAM', 'RESULT'])
+ add_row(['Sunday 11-Sep','1400','Cottonera','John Bugeja Cup Women','PAOLA JUNIORS', 'BKARA PLAYVOLLEY','3 - 2'])
+ add_row(['Saturday 17-Sep','1600','Cottonera','John Bugeja Cup Women','MELLIEHA', 'PAOLA JUNIORS','3 - 0'])
+ add_row(['Tuesday 20-Sep','2000','Cottonera','John Bugeja Cup Women','PAOLA JUNIORS', 'PAOLA HIBS CANDY','0 - 3'])
+ add_row(['Thursday 22-Sep','2000','Cottonera','John Bugeja Cup Women','FLEUR-DE-LYS', 'PAOLA JUNIORS','3 - 0'])
+ '<tr class="d0"><td colspan="7"></td></tr>'
+ add_row(['Saturday 08-Oct','1400','Cottonera','Senior Women 2nd Div','MELLIEHA', 'PAOLA U18','3 - 0'])
+ add_row(['Saturday 15-Oct','1400','Cottonera','Senior Women 2nd Div','PAOLA U18', 'BKARA PLAYVOLLEY','2 - 3'])
+ add_row(['Saturday 05-Nov','1400','Cottonera','Senior Women 2nd Div','PAOLA U18', 'TGIF','3 - 0'])
+ add_row(['Saturday 12-Nov','1600','Cottonera','Senior Women 2nd Div','PAOLA U18', 'QORMI','3 - 1'])
+ add_row(['Saturday 26-Nov','1600','Cottonera','Senior Women 2nd Div','PAOLA U18', 'FLYERS U18','3 - 0'])
+ add_row(['Saturday 03-Dec','1600','Cottonera','Senior Women 2nd Div','PLAYVOLLEY SCHOOL', 'PAOLA U18','0 - 3'])
+ add_row(['Saturday 10-Dec','1600','Cottonera','Senior Women 2nd Div','TATARA RABAT', 'PAOLA U18','3 - 0'])
+ add_row(['Saturday 04-Feb','1500','Cottonera','Senior Women 2nd Div','BKARA PLAYVOLLEY', 'PAOLA U18','2 - 3'])
+ add_row_highlight(['Saturday 25-Feb','1500','Cottonera','Senior Women 2nd Div','TGIF', 'PAOLA U18','0 - 0'])
+ add_row(['Saturday 03-Mar','1700','Cottonera','Senior Women 2nd Div','QORMI', 'PAOLA U18','0 - 0'])
+ add_row(['Saturday 10-Mar','1700','Cottonera','Senior Women 2nd Div','FLYERS U18', 'PAOLA U18','0 - 0'])
+ add_row(['Sunday 18-Mar','1730','Cottonera','Senior Women 2nd Div','PAOLA U18', 'MELLIEHA','0 - 0'])
+ add_row(['Saturday 24-Mar','1700','Cottonera','Senior Women 2nd Div','PAOLA U18', 'PLAYVOLLEY SCHOOL','0 - 0'])
+ add_row(['Saturday 31-Mar','1300','Cottonera','Senior Women 2nd Div','PAOLA U18', 'TATARA RABAT','0 - 0'])
+ '</table>');
}

function display_fixtures_under15() {
jQuery(".season").append('<h2>Fixtures & Results 2011/2012</h2><h3>Mini Volley Girls</h3><table id="results_table">'
+ add_header(['DATE', 'TIME', 'VENUE', 'CATEGORY', 'HOME TEAM', 'AWAY TEAM', 'RESULT'])
+ add_row(['Sunday 23-Oct','1115','Cottonera','Mini Volley Girls','FLYERS', 'PAOLA','2 - 0'])
+ add_row(['Sunday 06-Nov','1115','Cottonera','Mini Volley Girls','FLEUR-DE-LYS', 'PAOLA','0 - 2'])
+ add_row(['Sunday 20-Nov','1030','Cottonera','Mini Volley Girls','FLYERS 2', 'PAOLA','1 - 2'])
+ add_row(['Sunday 27-Nov','1030','Cottonera','Mini Volley Girls','PAOLA', 'PHOENIX-PAVI-SOUTHEND','2 - 0'])
+ add_row(['Sunday 04-Dec','1030','Cottonera','Mini Volley Girls','PAOLA', 'TGIF','2 - 0'])
+ add_row(['Sunday 18-Dec','1115','Cottonera','Mini Volley Girls','PAOLA', 'FLYERS 3','2 - 0'])
+ add_row(['Sunday 22-Jan','1115','Cottonera','Mini Volley Girls','PAOLA', 'PLAYVOLLEY','2 - 0'])
+ add_row(['Sunday 29-Jan','1115','Cottonera','Mini Volley Girls','PAOLA', 'FLYERS','2 - 0'])
+ add_row_highlight(['Sunday 19-Feb','1115','Cottonera','Mini Volley Girls','PAOLA', 'FLEUR-DE-LYS','0 - 0'])
+ add_row(['Sunday 26-Feb','1030','Cottonera','Mini Volley Girls','PAOLA', 'FLYERS 2','0 - 0'])
+ add_row(['Sunday 11-Mar','1030','Cottonera','Mini Volley Girls','PHOENIX-PAVI-SOUTHEND', 'PAOLA','0 - 0'])
+ add_row(['Sunday 25-Mar','1030','Cottonera','Mini Volley Girls','TGIF', 'PAOLA','0 - 0'])
+ add_row(['Sunday 15-Apr','1115','Cottonera','Mini Volley Girls','FLYERS 3', 'PAOLA','0 - 0'])
+ add_row(['Sunday 22-Apr','1115','Cottonera','Mini Volley Girls','PLAYVOLLEY', 'PAOLA','0 - 0'])
+ '</table>');
}

  function display_standings_seniors( ) {
    jQuery(".season").append('<h2>Standings 2011/2012</h2>'
    + '<h3>Senior Women 1st Division League</h3><table id="results_table">'
    + '<th colspan="2">RANKING</th><th colspan="4">MATCHES</th><th>POINTS</th><th colspan="3">SETS</th><th colspan="3">POINTS</th>'
+ add_row(['1','FLEUR-DE-LYS (FDL)','6','5','1','-','16','15','6','2.50','477','417','1.14'])
+ add_row_highlight(['2','PAOLA HIBS CANDY (PLA)','5','5','0','-','15','15','1','15.00','401','273','1.47'])
+ add_row(['3','FLYERS DEPIRO (FLY)','5','3','2','-','11','12','6','2.00','407','329','1.24'])
+ add_row(['4','TOYOTA PLAYVOLLEY (PVT)','5','1','4','-','7','4','12','0.33','333','381','0.87'])
+ add_row(['5','FLYERS 2 (FL2)','7','0','7','-','7','0','21','0.00','307','525','0.58'])
    + '</table><br><br>'

  + '<h3>John Bugeja Cup Women</h3><table id="results_table">'
    + '<th colspan="2">RANKING</th><th colspan="4">MATCHES</th><th>POINTS</th><th colspan="3">SETS</th><th colspan="3">POINTS</th>'
    + add_row(['#','Team', 'Total', 'Won', 'Lost', 'W/O', '.','Won', 'Lost', 'Ratio','Won','Lost','Ratio'])
  + add_row_highlight(['1','PAOLA HIBS CANDY','4','4','0','-','12','12','1','12.00','321','161','1.99'])
  + add_row(['2','FLEUR-DE-LYS','3','2','1','-','7','7','3','2.33','215','154','1.40'])
  + add_row(['3','PAOLA JUNIORS','4','1','3','-','6','3','11','0.27','210','324','0.65'])
  + add_row(['4','MELLIEHA','2','1','1','-','4','3','3','1.00','114','124','0.92'])
  + add_row(['5','BKARA PLAYVOLLEY','3','0','3','-','3','2','9','0.22','160','257','0.62'])
    + '</table>');
  }

  function display_standings_under18( ) {
    jQuery(".season").append('<h2>Standings 2011/2012</h2>'
    + '<h3>Senior Women 2nd Division League</h3><table id="results_table">'
    + '<th colspan="2">RANKING</th><th colspan="4">MATCHES</th><th>POINTS</th><th colspan="3">SETS</th><th colspan="3">POINTS</th>'
    + add_row(['#','Team', 'Total', 'Won', 'Lost', 'W/O', '.','Won', 'Lost', 'Ratio','Won','Lost','Ratio'])
+ add_row(['1','TATARA RABAT (RBT)','9','8','1','-','25','25','7','3.57','743','581','1.28'])
+ add_row(['2','MELLIEHA (MLH)','8','8','0','-','24','24','3','8.00','240','163','1.47'])
+ add_row(['3','BKARA PLAYVOLLEY (PVB)','8','5','3','-','18','21','12','1.75','696','593','1.17'])
+ add_row_highlight(['4','PAOLA U18 (PLJ)','8','5','3','-','18','17','12','1.42','620','595','1.04'])
+ add_row(['5','FLYERS U18 (FLU)','8','4','4','-','16','13','14','0.93','557','565','0.99'])
+ add_row(['6','QORMI (QRM)','9','3','6','-','15','12','19','0.63','636','656','0.97'])
+ add_row(['7','TGIF (TGF)','9','1','8','-','11','6','24','0.25','565','713','0.79'])
+ add_row(['8','PLAYVOLLEY SCHOOL (PVJ)','9','0','9','-','9','0','27','0.00','341','675','0.51'])
    + '</table><br><br>'                            
              
  + '<h3>John Bugeja Cup Women</h3><table id="results_table">'
  + '<th colspan="2">RANKING</th><th colspan="4">MATCHES</th><th>POINTS</th><th colspan="3">SETS</th><th colspan="3">POINTS</th>'
    + add_row(['#','Team', 'Total', 'Won', 'Lost', 'W/O', '.','Won', 'Lost', 'Ratio','Won','Lost','Ratio'])
  + add_row(['1','PAOLA HIBS CANDY','4','4','0','-','12','12','1','12.00','321','161','1.99'])
  + add_row(['2','FLEUR-DE-LYS','3','2','1','-','7','7','3','2.33','215','154','1.40'])
  + add_row_highlight(['3','PAOLA JUNIORS','4','1','3','-','6','3','11','0.27','210','324','0.65'])
  + add_row(['4','MELLIEHA','2','1','1','-','4','3','3','1.00','114','124','0.92'])
  + add_row(['5','BKARA PLAYVOLLEY','3','0','3','-','3','2','9','0.22','160','257','0.62'])
    + '</table>');
  }

  function display_standings_under15( ) {
    jQuery(".season").append('<h2>Standings 2011/2012</h2><h3>Mini Volley Girls League</h3><table id="results_table">'
    + '<th colspan="2">RANKING</th><th colspan="4">MATCHES</th><th>POINTS</th><th colspan="3">SETS</th><th colspan="3">POINTS</th>'
    + add_row(['#','Team', 'Total', 'Won', 'Lost', 'W/O', '.','Won', 'Lost', 'Ratio','Won','Lost','Ratio'])
+ add_row_highlight(['1','PAOLA (PLA)','9','8','1','-','25','16','3','5.33','423','302','1.40'])
+ add_row(['2','FLYERS 2 (FLY2)','9','8','1','-','25','17','4','4.25','466','313','1.49'])
+ add_row(['3','FLYERS (FLY)','9','7','2','-','23','15','4','3.75','174','266','0.65'])
+ add_row(['4','FLYERS 3 (FL3)','9','5','4','-','19','10','9','1.11','411','357','1.15'])
+ add_row(['5','FLEUR-DE-LYS (FDL)','9','3','6','-','15','6','12','0.50','322','391','0.82'])
+ add_row(['6','PLAYVOLLEY (PVY)','8','3','5','-','14','8','10','0.80','362','351','1.03'])
+ add_row(['7','PHOENIX-PAVI-SOUTHEND (PHS)','8','0','7','1','7','0','16','0.00','128','400','0.32'])
+ add_row(['8','TGIF (TGF)','7','0','6','1','6','0','12','0.00','174','350','0.50'])
    + '</table>');
  }


    + add_row(['#','Team', 'Total', 'Won', 'Lost', 'W/O', '.','Won', 'Lost', 'Ratio','Won','Lost','Ratio'])
  /* Club Section */
  function display_club( name ) {
    $(".club").empty();

    switch( name )
    {
    case 'aboutus'     : display_aboutus();        break;
    case 'management'  : display_management();      break;
    
    case 'honourst'    : display_honours_team();       break;
    case 'honoursi'    : display_honours_individual();  break;
    }
  }

  function display_honours_team() {

    $(".club").append('<h2>Team Honours</h2><h3>Seniors</h3><table id="results_table">'
    + add_header(['SEASON','LEAGUE WINNERS','KNOCK OUT WINNERS','SUPER CUP WINNERS'])
    + add_row(['2003 / 2004','&#10004','&#10004',''])
    + add_row(['2004 / 2005','&#10004','&#10004','&#10004'])
    + add_row(['2005 / 2006','&#10004','&#10004','&#10004'])
    + add_row(['2006 / 2007','&#10004','&#10004','&#10004'])
    + add_row(['2007 / 2008','&#10004','&#10004','&#10004'])
    + add_row(['2008 / 2009','&#10004','&#10004','&#10004'])
    + add_row(['2009 / 2010','&#10004','&#10004','&#10004'])
    + add_row(['2010 / 2011','&#10004','&#10004','&#10004'])
    + add_row(['2011 / 2012','','&#10004','&#10004'])
    + add_row(['TOTAL','8','9','8'])
    + '</table>');

    
    $(".club").append('<br><h3>Under 18</h3><table id="results_table">'
    + add_header(['SEASON','LEAGUE WINNERS','RUNNERS UP','KNOCK OUT WINNERS'])
    + add_row(['2006 / 2007','','&#10004',''])
    + add_row(['2008 / 2009','&#10004','','&#10004'])
    + add_row(['TOTAL','1','1','1'])
    + '</table>');
    

    $(".club").append('<br><h3>Under 15</h3><table id="results_table">'
    + add_header(['SEASON','LEAGUE WINNERS','RUNNERS UP'])
    + add_row(['2007 / 2008','&#10004',''])
    + add_row(['2008 / 2009','','&#10004'])
    + add_row(['2009 / 2010','','&#10004'])
    + add_row(['TOTAL','1','2'])
    + '</table>');
  }

  function display_honours_individual() {
    jQuery(".club").append('<h2>Individual Awards</h2><table id="results_table">'
    + add_header(['Season','Best Player Seniors','Best Player Under 18','Best Player Under 15'])
    + add_row(['2003 / 2004','Carmen Gauci','',''])
    + add_row(['2006 / 2007','Alison Borg','Sherika Seychell','Roxette Caruana'])
    + add_row(['2007 / 2008','Carmen Gauci','Martha Curmi','Daniela Ellul'])
    + add_row(['2008 / 2009','Alison Borg','Roxette Caruana',''])
    + '</table><br><br><br><br>'
    
    + '<table id="results_table">'
    + add_header(['Season','Team of the Year','Coach of the Year', 'Official of the Year'])
    + add_row(['2006 / 2007','Senior Team','David Bonnici',''])
    + add_row(['2007 / 2008','Senior Team','David Bonnici','Carmen Gauci'])
    + add_row(['2008 / 2009','Under 18 Team','','Carmen Gauci'])
    + '</table>');
  }

  function display_aboutus() {
    $(".club").append("<h2>About Us</h2>\
      <p> Paola Hibs Candy was re-founded in 2002 by Carmen Gauci and Tiziana Bonnici after their experiences with other various \
        clubs. They wished to start a club with strong social values in order to promote the sport of volleyball amongst kids \
        of all ages. They believe that through volleyball, they could reach out to children, attract them to sports and keep \
        them off any bad habits. The club gives more than just volleyball training sessions. Through the years, the club evolved \
        and now comprises teams in the ladies senior, under 18, under 15 and this year, training also started for kids aged \
        between 8 and 12 years. We are still passionate and enthusiastic about our club and our sport as we first were when the \
        club was re-founded. Carmen and Tiziana are still today very much active in the day to day running of the club and this \
        ensures its success through dedicated efforts by committee members, parents and players.</p>\
      <p> A number of events are organised each year. These events range from one day volleyball tournaments to social events for \
        club members and their friends. These events are usually organised at the club premises in Corradino. Volleyball is fun; we \
        wish parents and players to share this passion.</p>" );
  }

  function display_management() {
    $(".club").append("<h2>Management</h2>\
    <div class='management'>\
    <ul>\
      <li>President: <span>Carmen Gauci</span></li>\
      <li>Secretary: <span>Tiziana Bonnici</span></li>\
      <li>Vice-President: <span>Ronnie Calleja</span></li>\
      <li>Marketing Manager: <span>Alesio Muscat</span></li>\
      <li>Treasurer: <span>Denise Borg Aquilina</span></li>\
    </ul></div>");
  }


  /* Team Section */
  function display_team( name ) {
    $(".team").empty();

    switch( name )
    {
    case 'seniors'      : display_seniors_team();      break;
    case 'u18'      : display_u18_team();        break;
    case 'u15'        : display_u15_team();       break;
    case 'u13'        : display_u13_team();        break;
    case 'nursery'      : display_nursery_team();      break;
    case 'schedule'      : display_training_schedule();  break;
    }
  }

  function display_seniors_team() {
    $(".team").append("<h2>Seniors 2010 / 2011</h2>\
      <img src='images/team/paola_hibs_1011.jpg' alt='Paola Hibs Candy' width='700px'/>\
      <p><span class='title'>Back Row: </span>&nbsp;Mark Hili, Alison Borg, Daniela Bonnici, Gertrude Zarb, Carmen Gauci, Elaine Caruana Briffa, Denise Borg Aquilina </p>\
      <p><span class='title'>Front Row: </span>&nbsp;Martha Curmi, Roxette Caruana, Tiziana Bonnici, Delicia Farrugia, Sherika Seychell, Josianne Grima, Leanne Spiteri</p>");
  }

  function display_u18_team() {
    $(".team").append("<h2>Paola Under-18 2010 / 2011</h2><img src='images/team/u18_1011.jpg' alt='Paola Under 18' width='700px'/>");
  }

  function display_u15_team() {
    $(".team").append("<h2>Paola Under-15 2010 / 2011</h2><img src='images/team/u15_1011.jpg' alt='Paola Under 15' width='700px'/>");
  }

  function display_u13_team() {
    $(".team").append("<h2>Paola Under-13 2010 / 2011</h2><div align='center'><img src='images/team/u13_1011.jpg' alt='Paola Under 13'/></div>");
  }

  function display_nursery_team() {
    $(".team").append("<h2>Paola Nursery 2010 / 2011</h2><img src='images/team/nursery_1011.jpg' alt='Paola Nursery' width='700px'/>");
  }

  function display_training_schedule() {

     jQuery(".team").append( '<h2>Training Schedule 2010 / 2011 </h2><table id="results_table">'
    + add_header( ['CATEGORY', 'DAY', 'TIME'] ) 
    + add_row( ['SENIORS', 'Monday', '18:00 - 19:30'] )
    + add_row( ['SENIORS', 'Wednesday', '18:00 - 20:00'] )
    + '<tr class="d0"><td colspan="4"></td></tr>'
    
    + add_row( ['U15 / U18', 'Monday', '16:00 - 18:00'] )
    + add_row( ['U15 / U18', 'Wednesday', '16:00 - 18:00'] )
    + '<tr class="d0"><td colspan="4"></td></tr>'

    + add_row( ['NURSERY', 'Sunday', '09:30 - 11:30'] )
    + '</table><br><br>'
    );
    
  }


  // Read a page's GET URL variables and return them as an associative array.
  function getUrlVars() {
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
      hash = hashes[i].split('=');
      vars.push(hash[0]);
      vars[hash[0]] = hash[1];
    }
    return vars;
  }

  function clicked_link() {
    jQuery('.clicked_link').removeClass("active");
    jQuery(this).toggleClass("active");
    
    i = $('.clicked_link').index(this);
    name = jQuery('.clicked_link').get(i).getAttribute('name');
    
    switch( hostpage )
    {
    case 'season.html'  :    display_season( name );  break;
    case 'club.html'  :    display_club( name );    break;
    case 'team.html'  :    display_team( name );    break;
    }
    
    return false;
  }

  function display_headlines() {
  jQuery("#slide-1").append('<h1> <a href="index.html"> Poala Hibs Volleyball Club </a> </h1>'
  +  '<p><span class="title">Paola Hibs win knock-out trophy for the 9th consecutive time. </span>'
  +   'Paola Hibs Champions 2011. In a yet another long match, Paola Hibs had the better of Depiro Flyers to win the deciding match of this season and so retain the title for the 8th consecutive time.</p>'
  +   '<p><a href="knockout2012.html">Read more.</a> February 5, 2012</p>');
  
  jQuery("#slide-2").append('<h1> <a href="index.html"> Poala Hibs Volleyball Club </a> </h1>'
  +  '<p><span class="title">Cyprus and Scotland girls qualify for final round. </span>'
  +  'Cyprus and Scotland advanced for the final round of the junior girls European Championships (Small Countries Division) after taking the top two spots in the qualifying Group B played in Malta last week.</p>'
  +  '<p><a href="news.html">Read more.</a> January 21, 2012</p>'
  +  '<a href="#"><img src="images/ds.png" alt="Logo" /></a>');
  }

  jQuery(document).ready(function(){
    jQuery('.clicked_link').bind( 'click', clicked_link );

    switch ( hostpage )
    {
    case 'club.html' :
      $('.clicked_link').find('aboutus').addClass("active");
      display_club( 'aboutus' );
      break;
      
    case 'season.html' :
      $('.clicked_link').find('fixress').addClass("active");
      display_season( 'fixress' );
      break;
    
    case 'team.html' :
      $('.clicked_link').find('seniors').addClass("active");
      display_team( 'seniors' );
      break;
    }
    
    display_menu();
    display_headlines();
  });
