nice job. but you could simplify your code farther by using cal_days_in_month() to fill an array like this
function Calendar($month, $year)
{
$offSet = date("w",mktime(0, 0, 0, $month, 1, $year));
for($i = 0; $i < $offSet; $i++)
$cal[] = "";
for($i = count($cal), $x = 1; $i < cal_days_in_month(CAL_GREGORIAN, $month, $year) + $offSet; $i++, $x++)
$cal[] = $x;
}
then printing the calendar would just be a matter of creating a new table row after every 7 days
note that this method assumes Sunday to be the first day of the week