function clickedMonth(the_year, the_month)
    {
    var d = new Date();
    var current_year = d.getFullYear();
    if (current_year == the_year)
        var month_showing = year1_month_showing;
    else
        var month_showing = year2_month_showing;

    document.getElementById("displayed_row_"+the_year+"_"+ month_showing).style.display = 'none';
    document.getElementById("tab_header_"+the_year+"_"+ month_showing).style.borderTop = '1px solid #7b7077';

    document.getElementById("tab_header_"+the_year+"_"+ month_showing).style.borderRight = '1px solid #7b7077';
    document.getElementById("tab_header_"+the_year+"_" + month_showing).style.borderLeft = '2px solid white';
    document.getElementById("tab_header_"+the_year+"_" + month_showing).style.backgroundColor = '#e3e3e3';



    document.getElementById("displayed_row_"+the_year+"_" + the_month).style.display = '';
    document.getElementById("tab_header_"+the_year+"_" + the_month).style.borderTop = '2px dotted #898989';

    document.getElementById("tab_header_"+the_year+"_" + the_month).style.borderRight = '2px dotted #898989';
    document.getElementById("tab_header_"+the_year+"_" + the_month).style.borderLeft = '2px dotted #898989';
    document.getElementById("tab_header_"+the_year+"_" + the_month).style.backgroundColor = '#f1f1f1';

    if (current_year == the_year)
        year1_month_showing = the_month;
    else
        year2_month_showing = the_month;

    var xmlhttp;
    var my_text;
    
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    
    var my_send = "my_var=calendar_month&my_value="+the_month;
    xmlhttp.open("POST","../AJAX/set_session_var.php",true);
    xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlhttp.send(my_send);

    my_send = "my_var=calendar_year&my_value="+the_year;
    xmlhttp.open("POST","../AJAX/set_session_var.php",true);
    xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlhttp.send(my_send);
    }
    

function clickedYear(the_year)
    {

    document.getElementById("three_tab_"+year_showing).style.display = 'none';
    document.getElementById("three_tab_header_"+year_showing).style.borderBottom = '1px solid #8F400F';

    document.getElementById("three_tab_"+the_year).style.display = 'table-row';
    document.getElementById("three_tab_header_"+the_year).style.borderBottom = '0px solid #8F400F';

    year_showing = the_year;
    
    var d = new Date();
    var current_year = d.getFullYear();
    if (current_year == the_year)
        var month_showing = year1_month_showing;
    else
        var month_showing = year2_month_showing;

    if (the_year != "ONGOING")
        {
        var xmlhttp;
        var my_text;
        
        if (window.XMLHttpRequest)
          {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
          }
        else
          {// code for IE6, IE5
          xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        
        var my_send = "my_var=calendar_month&my_value="+month_showing;
        xmlhttp.open("POST","../AJAX/set_session_var.php",true);
        xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        xmlhttp.send(my_send);
    
        my_send = "my_var=calendar_year&my_value="+year_showing;
        xmlhttp.open("POST","../AJAX/set_session_var.php",true);
        xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
        xmlhttp.send(my_send);
        }
    }
    

function partnerLogin()
    {
    if (document.getElementById('form_wellness_email').value.length < 1)
        alert("Please enter an email address.");
    else if (document.getElementById('form_wellness_email').value.indexOf('@') == -1)
        alert("Please enter an email address.");
    else if (document.getElementById('form_wellness_confirmation').value.length < 1)
        alert("Please enter the confirmation number you received when you signed up as a Wellness Partner.");
    else 
        document.forms['wellness_partner_signup'].submit();
    }

