// $id:$

var Cruise = window.Cruise || {};

Cruise = {
	showSubote: function(id) {
		var date;
		var selected = false;
		var today = Dates.currentDate();
		var control = Calendar.getControl(id);

		control[0].options.length = 0;

		for (i=1; i<=Dates.getMonthLength(control[1].value, control[2].value); i++) {
			date = new Dates.date(control[2].value, control[1].value, i);
			
			if(Dates.dowDate(date)==6 && date.days>today.days && !selected) {
				control[0].options[control[0].options.length] = new Option(i,i,1);
				selected = true;
			}
			else if(Dates.dowDate(date)==6) {
				control[0].options[control[0].options.length] = new Option(i,i,0);
			}
		}
	}
}
