function globalOnLoad()
{
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		document.recalc();
	}
	
}

function disableButton()
{
	document.Form1.Button1.disabled = true;
}	
		
		
function calendarPicker(strField)
{
	document.Form1.Button1.disabled = false;
	window.open('calendar.aspx?field=' + strField, 'calendarPopup', 'width=270,height=290,resizable=yes');
	document.Form1.Button1.disabled = false;
}

function PublicFolders()
{
	window.open('/downloads/publicfolders.aspx', 'PublicFolders', 'width=350,height=500,resizable=yes,scrollbars=yes');
}
	
function OpenDescription()
{
	window.open('descriptions.aspx', 'Activity Descriptions', 'width=220,height=220,resizable=yes');
}


//subtracts a day from Date
function SubtractDay()
{
	//try to parse date from Date text box
	var tbDate = document.Form1.tbDate.value;
	theDate = new Date(Date.parse(tbDate));
	newDate = new Date(theDate.getTime() - 86400000)
	if (newDate.toDateString() == "NaN")
		alert("Invalid Date!");
	else
		document.Form1.tbDate.value = (newDate.getMonth() + 1) + "/" + newDate.getDate() + "/" + newDate.getFullYear();
}

		//subtracts a day from Date
function AddDay()
{
	//try to parse date from Date text box
	var tbDate = document.Form1.tbDate.value;
	theDate = new Date(Date.parse(tbDate));
	newDate = new Date(theDate.getTime() + 86400000)
	if (newDate.toDateString() == "NaN")
		alert("Invalid Date!");
	else
		document.Form1.tbDate.value = (newDate.getMonth() + 1) + "/" + newDate.getDate() + "/" + newDate.getFullYear();
}

function NewWindows()
{

	window.open("description.aspx","Activity Descriptions");
}

function ConfirmDel()
{
	return confirm('Confirm Delete');
}
