
function showhide(id,textmore,textless) {
	var what = document.getElementById(id);
	var link = document.getElementById('linktext');
	if(what.style.display == 'none') {
		what.style.display = '';
		link.innerHTML = textless;
	}
	else {
		what.style.display = 'none';
		link.innerHTML = textmore;
	}
}


var d=new Date()
var thismonth =(d.getMonth()+1);
var thisyear = (d.getFullYear());
var cssid;
var month_of_year2 = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
var last_month;
document.write('<table width="100%" cellspacing="0" cellpadding="0" align="center">');

firstthisyear=thisyear;

for (n = 0; n < 6; n++) {
	if (n > 2) {
		cssid =  " id=\"tr" + n + "\" style=\"display: none;\"";
	} else {
		cssid = " id=\"tr" + n + "\"";
		last_month=thismonth;
	}
	if (thismonth > 12) {
		thisyear = thisyear+1;
		thismonth = 1;
	}
	

	document.write('<tr' + cssid + '><td valign="top" align="center">');

	calendar(thismonth,thisyear,"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31");
	document.write('</td><td valign="top" align="center">');

	thismonth++;
	if (thismonth > 12) {
		thisyear = thisyear+1;
		thismonth = 1;
	}

	calendar(thismonth,thisyear,"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31");
	document.write('</td></tr>');
	thismonth++;
}

document.write('</table>');
textmore = 'To reserve beyond ' + month_of_year2[last_month] + ', ' + firstthisyear + ',click here';
textless = 'To reserve before ' + month_of_year2[last_month+1] + ', ' + firstthisyear + ',click here';
document.write('<div align="center"><a id="linktext" href="javascript:%20void(0);" onclick="showhide(\'tr0\',\'' + textmore + '\',\'' + textless + '\');showhide(\'tr1\',\'' + textmore + '\',\'' + textless + '\');showhide(\'tr2\',\'' + textmore + '\',\'' + textless + '\');showhide(\'tr3\',\'' + textmore + '\',\'' + textless + '\');showhide(\'tr4\',\'' + textmore + '\',\'' + textless + '\');showhide(\'tr5\',\'' + textmore + '\',\'' + textless + '\');">' + textmore + '</a></div>');
