
function UpdateCalendar2(year, month, acc){
	$('#calendar_wrap').load('/p/calendar2.php?y='+year+'&m='+month+'&a='+acc);
}

function UpdateCalendar3(year, month){
	$('#calendar_wrap3').load('/p/calendar3.php?y='+year+'&m='+month);
}

function centerDiv(obj){
	$(obj).css({
		marginTop: (($(obj).height()/2) * -1)+'px',
		marginLeft: (($(obj).width()/2) * -1)+'px',
		left:'50%',
		top:'50%'
	});
}

var timeout    = 500;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open()
{  jsddm_canceltimer();
   jsddm_close();
   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}

function jsddm_close()
{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

function jsddm_timer()
{  closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{  if(closetimer)
   {  window.clearTimeout(closetimer);
      closetimer = null;}}

function adminPrompt(strPrompt){
	if($('#prompt').html()!='' || $('#prompt').html()!=undefined){
		$('#prompt').remove();
	}
	$('body').append('<div id="prompt"><p><img src="/img/icons/accept.png" alt="tick" /> '+strPrompt+'</p></div>');
	$('#prompt').css({
		opacity:0,
		display:'block'
	}).animate({
		opacity:1
	},400,function(){
		setTimeout(function(){
			$('#prompt').animate({
				opacity:0
			},400);
		},2000);
	});
}
