function month2short(dm) {

	switch (dm) {
		case 0: return "Jan";
        case 1: return "Feb";
        case 2: return "Mar";
        case 3: return "Apr";
        case 4: return "May";
        case 5: return "Jun";
        case 6: return "Jul";
        case 7: return "Aug";
        case 8: return "Sep";
        case 9: return "Oct";
        case 10: return "Nov";
        case 11: return "Dec";
	}
}

// set up a Date object
var cdate = new Date();

// get the current month
var cmonth = cdate.getMonth();

// get the actual month
var acmonth = cmonth + 1;

// get the current 2-digit month
var c2dmonth = (acmonth < 10) ? "0" + acmonth : acmonth;

// get the current 4-digit year
var cfullyear = cdate.getFullYear();

// get the current 2-digit year
var cshortyear = cdate.getFullYear() % 100;
cshortyear = (cshortyear < 10) ? "0" + cshortyear : cshortyear;

// get the default select value
var cm_value = c2dmonth + "-" + cfullyear;

// get the default select label
var cm_label = month2short(cmonth) + " " + cfullyear;

// open the select wrapper
document.write("<select name=\"start_monthyear\" id=\"start_monthyear\">\n");

// display the first menu entry
document.write("<option value=\"" + cm_value + "\" selected=\"selected\">" + cm_label + "</option>\n");

// display the next 12 entries
var the_month = cmonth;
var the_year = cdate.getFullYear() % 100;
var the_fullyear = cdate.getFullYear();

for (i=1; i<=12; i++) {

	the_month++;

	if (the_month > 11) {
		the_month = 0;
		the_year++;
		the_fullyear++;
	}

	var the_ac_month = the_month + 1;
	var the_2d_month = (the_ac_month < 10) ? "0" + the_ac_month : the_ac_month;

	// construct the menu value
	var the_my_value = the_2d_month + "-" + the_fullyear;
	var the_2d_year = the_fullyear % 100;
	the_2d_year = (the_fullyear < 10) ? "0" + the_fullyear : the_fullyear;

	// construct the menu label
	var the_my_label = month2short(the_month) + " " + the_2d_year;

	// write the menu entry
	document.write("<option value=\"" + the_my_value + "\">" + the_my_label + "</option>\n");

}

// close the select wrapper
document.write("</select>\n");

