//************************************************************************************************************
function f_setfocus( aForm ){

	if( aForm.elements[0]!=null) {

		var i;
		var max = aForm.length;
		for( i = 0; i < max; i++ ) {

			if( aForm.elements[ i ].type != "hidden" &&
				!aForm.elements[ i ].disabled &&
				!aForm.elements[ i ].readOnly ) {

				aForm.elements[ i ].focus();
				break;

			}

		}

	}

}

//************************************************************************************************************
function PopUp(URL, w, h) {

	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id +
		"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + w +",height=" +
		h + ",left = 347.5,top = 392');");

}

//************************************************************************************************************
function FindEvent(strURL, strMonth, strYear, strENOrgID, strTitle) {

	window.open(strURL,'','width=535,height=400,directories=no,location=no,menubar=no,scrollbars=yes,' +
		'resizable=no');
	window.location = "/community/department/default.asp?OrgID=" + strENOrgID + "&DeptTitle=" + strTitle +
		"&App=9&SC=Y&month=" + strMonth + "&year=" + strYear;

}

//************************************************************************************************************
function Leaving(){

	window.alert("WARNING!!!\nYou are now leaving the\nNorth East Texas Area Website.\nNETA is " +
		"not affiliated with, nor is NETA\nresponsible for the content of this site!\nHave a great 24!");

}

//************************************************************************************************************
function deleterecord(strName, intRecord, strPassword){

	if(window.confirm("WARNING!!!\nYou are about to delete\nthe " + strName + "record.\nAre you sure?")){

		window.location = "calendar_update.php?cmdDelete=Delete&hdnEventID=" + intRecord;

	}

}