
function dataColor(date)
{
	var now = $.datepicker.formatDate("dd.mm.yy", date); 
	
	if($.inArray(now, Rev) != -1) return [false];
	
	return [true];
}

function book(msg)
{
	if($('input[name="edit[name]"]').val() == '' || $('input[name="edit[token]"]').val() == '' || $('input[name="edit[text]"]').val() == '')
		alert(msg);
	
	else $('#book').submit();
}


function rotateBanner(no)
{
	no++;
	
	if(no == ROT.length) no = 0;
		
	var div = (no % 2 == 0) ? 2 : 1;
	var img = 'url("img/rotator/'+ROT[no]+'") 50% 50% no-repeat';
		
	if(div == 1)
	{
		$('#Header1').css({'background': img});
		$('#Header1').animate({'opacity':1}, 2000);
		$('#Header2').animate({'opacity':0}, 2000, function() { setTimeout('rotateBanner('+no+')', 5000); });
	}
	
	else
	{
		$('#Header2').css({'background': img});
		$('#Header2').animate({'opacity':1}, 2000);
		$('#Header1').animate({'opacity':0}, 2000, function() { setTimeout('rotateBanner('+no+')', 5000); });
	}
}

