function time_out_of_range(date, year, month, day, hours, minutes)
{
	var date_as_obj = new Date();
	var now = new Date();

	date_as_obj.setTime(Number(date.print('%s'))*1000);

	if(undefined != minutes && 0 != minutes && 30 != minutes)
	{
        return(true);
	}
	if(undefined != hours && 7 > hours)
	{
        return(true);
	}
	if(undefined != hours && 19 < hours)
	{
        return(true);
	}
	if(19 == hours && 30 == minutes)
	{
        return(true);
	}
	if(date_as_obj.getTime() < now.getTime())
	{
		return(true);
	}

    return(false);
}

function J_Zapatec_Setup(params)
{
    if( undefined   ==  params.dateStatusFunc   )   {   params.dateStatusFunc   =   time_out_of_range   ;   }
    if( undefined   ==  params.disableFunc      )   {   params.disableFunc      =   time_out_of_range   ;   }
    if( undefined   ==  params.step             )   {   params.step             =   1                   ;   }
    if( undefined   ==  params.singleClick      )   {   params.singleClick      =   false               ;   }
    if( undefined   ==  params.showsTime        )   {   params.showsTime        =   true                ;   }
    if( undefined   ==  params.ifFormat         )   {   params.ifFormat         =   '%Y-%m-%d %H:%M'    ;   }
    if( undefined   ==  params.timeFormat       )   {   params.timeFormat       =   12                  ;   }

    var cal = new Zapatec.Calendar.setup(params);
}
