<!--hide this script from non-javascript-enabled browsers

// function ConfirmDelete()
// Use this function to make a pop up box come up when you call a delete
// function using a hyperlink.
//		strItem		- type of item you are deleting
//		strItemName	- the actual name of the item you are deleting
//		strURL		- the URL you want the page to go to
function ConfirmDelete(strItem, strItemName, strURL) {
	if (confirm("Are you sure you want to delete the " + strItem + ", " + strItemName + "?")) {
		location = strURL
	}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
/* Functions that swaps images. */
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

/* Functions that handle preload. */
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
/* Function redirects browser to Edit Project Diary Page */
function Message(URL)
		{
		window.location.href = URL;
		}

function validateUserFlds()
	{
	var valid = true;
    if (document.UserAdmin.FirstName.value.length == 0) {
		valid = false
		alert("Please enter First name")
		document.UserAdmin.FirstName.focus()
	    }
    else if (document.UserAdmin.LastName.value.length == 0) {
		valid = false
		alert("Please enter Last Name")
		document.UserAdmin.LastName.focus()
		}
    else if (document.UserAdmin.EMail.value.length == 0) {
		valid = false
		alert("Please enter E Mail")
		document.UserAdmin.EMail.focus()
		}
    else if (document.UserAdmin.UserID.value.length == 0) {
		valid = false
		alert("Please enter Computer User ID")
		document.UserAdmin.UserID.focus()
		}
	return valid
	}

/* Function to Validate Fields on Group Administration*/

function validateGroupFlds()
	{
	var valid = true;
    if (document.GroupAdmin.GroupName.value.length == 0) {
		valid = false
		alert("Please enter Group name")
		document.GroupAdmin.GroupName.focus()
	    }
	return valid
	}

	<!-- Begin for Date Validation
	function populate(objForm,selectIndex) {
	timeA = new Date(objForm.year.options[objForm.year.selectedIndex].text, objForm.month.options[objForm.month.selectedIndex].value,1);
	timeDifference = timeA - 86400000;
	timeB = new Date(timeDifference);
	var daysInMonth = timeB.getDate();
	for (var i = 0; i < objForm.day.length; i++) {
	objForm.day.options[0] = null;
	}
	for (var i = 0; i < daysInMonth; i++) {
	objForm.day.options[i] = new Option(i+1);
	}
	document.ProjDiary.day.options[0].selected = true;
	}
	function getYears() {

	// You can easily customize what years can be used
	var years = new Array(1997,1998,1999,2000,2001,2005)

	for (var i = 0; i < document.ProjDiary.year.length; i++) {
	document.ProjDiary.year.options[0] = null;
	}
	timeC = new Date();
	currYear = timeC.getFullYear();
	for (var i = 0; i < years.length; i++) {
	document.ProjDiary.year.options[i] = new Option(years[i]);
	}
	document.ProjDiary.year.options[2].selected=true;
	}
	window.onLoad = getYears;
	//  End -->

// stop hiding -->
