// JavaScript Document
function browseCalendar(date,pid)
{
	new Ajax.Updater('cal','scripts/php/calendar.php', {postBody:'date='+date+'&pid='+pid});
	myDay=date;
}

var currentItem='';

function showItem(id)
{
	$('subnav'+currentItem).removeClassName('current');
	$('subnav'+id).addClassName('current');
	new Effect.Fade('item'+currentItem,{duration:0.2, afterFinish:function(){new Effect.Appear('item'+id); currentItem=id;}});
}

var win = null;

function NewWindow(mypage,myname,w,h,scroll)
{
		
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	
	settings =
	'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(mypage,myname,settings)
	if(win.window.focus)
	{
		win.window.focus();
	}
}

