
function calendarDetail(evnt, comp){
	
	hideCalendarDetail();
	
	which = evnt+"_"+comp;
	
	var theonel = $('calendar_event_detail_'+which);
	var posl = ToolMan.coordinates().topLeftOffset(theonel).toString();
	var topl = getY(posl);
	var leftl = getX(posl);
	
	var theone = $('calendar_event_'+which);
	var pos = ToolMan.coordinates().topLeftOffset(theone).toString();
	var top = getY(pos);
	var left = getX(pos);
	
	$('calendar_detail').innerHTML = '<div class="loading"><div class="img">Loading...<div></div>';
	$('calendar_detail').style.top = topl+"px";
	$('calendar_detail').style.left = leftl+"px";
	$('calendar_detail').style.width = theonel.offsetWidth+"px";
	$('calendar_detail').style.display = "block";
	
	
	new Ajax.Updater('calendar_detail', '/profile/components/calendar_detail.php?which='+evnt, {
		parameters: { 'event_id': which },
		onComplete: function(transport) {
			$('calendar_detail').style.display = "none";
			if(navigator.appName == "Microsoft Internet Explorer"/* && navigator.appVersion < 7*/){
				top = parseInt(top) + 1;
				left = parseInt(left) + 1;
			}
			$('calendar_detail').style.width = theone.offsetWidth+"px";
			$('event_detail_detail').style.width = theonel.offsetWidth+"px";
			$('calendar_detail').style.top = top+"px";
			$('calendar_detail').style.left = left+"px";
			$('calendar_detail').style.display = "block";
			
		}
	});
}

function hideCalendarDetail(){
	$('calendar_detail').style.display = "none";
}