// JavaScript Document

function ReloadCalendar(url,params,where){ 
	$.ajax({
		type: "GET",
		url: url,
		data: params,
		beforeSend:function(){
			$('#calendar').children('td').each(function(){
				if($(this).attr('class') == 'eve'){$(this).removeClass('class').addClass('day');}
				if ($(this).html() != ''){$(this).html('&nbsp;');}
			});
		},
		success: function(msg){$('#calendar').html(msg);}
	});	
}

function inviaPost(u,p,d,i){
	$.ajax({
		type: "GET",
		url: u,
		data: p,
		beforeSend:function(){
			if (i!=''){
				var v = $('<div></div>').attr({'align':'center'}).css({'width':'100%','margin-top':'20px','vertical-align':'middle','text-align':'center','height':'50px'}).appendTo(d);
				var g = $('<img />').attr({'width':'24','height':'24','src':i}).appendTo(v);
			}
		},
		success: function(msg){$('#'+d).html(msg);}
	});   
}

function inviaPostScroller(u,p,d,i,dd){
	$.ajax({
		type: "GET",
		url: u,
		data: p,
		success: function(msg){
			$('#'+dd).fadeOut('slow',function(){$('#'+d).html(msg);});
			$('#'+dd).fadeIn();
		}
	});
}

function iPg(u,p,d,i){
	$.ajax({
		type: "GET",
		url: u,
		data: p,
		beforeSend:function(){
			if (i!=''){
				var v = $('<div></div>').attr({'align':'center'}).css({'width':'100%','margin-top':'20px','vertical-align':'middle','text-align':'center','height':'50px'}).appendTo(d);
				var g = $('<img />').attr({'width':'24','height':'24','src':i}).appendTo(v);
			}
		},
		success: function(msg){$('#'+d).html(msg);}
	});   
}