// SUPERDATE 1.0

var scal_lastcal = '';

function scal_close(cal){
	$('input_'+cal).focus();
	$(cal).style.display='none';
}

function scal_open(cal){
	if (scal_lastcal != '') $(scal_lastcal).style.display='none';
	$(cal).style.display='block';
	scal_lastcal = cal;
}

function scal_draw(cal,date){
	new Ajax.Updater(cal, 'superdate.cfm?update='+cal+'&calmonth='+date, {asynchronous:true, evalScripts:true});
}

function scal_select(cal,date){
	$('input_'+cal).value=date;
	scal_close(cal);
}