﻿function goLastMonth(month,year,form,field)
{
    if(month == 1)
    {
        --year;
        month = 13;
    }       
    document.location.href = 'activities.php?month='+(month-1)+'&year='+year+'&form='+form+'&field='+field;
}

function goNextMonth(month,year,form,field)
{
    // If the month is December, increment the year.
    if(month == 12)
    {
        ++year;
        month = 0;
    }   
        document.location.href = 'activities.php?month='+(month+1)+'&year='+year+'&form='+form+'&field='+field;
}


function sendToForm(val,field,form)
{
    // Send back the date value to the form caller.
    eval("opener.document." + form + "." + field + ".value='" + val + "'");
    window.close();
}