buttons = new Array()
{
	//**** On = filler.gif; Off = empty.gif
	buttons[0]=new Image
	buttons[0].src="images/empty.gif"
	buttons[1]=new Image
	buttons[1].src="images/filler.gif"
}

//**** For admin: On = filler.gif (0); Off = empty.gif (1)
function admin_off(loc_left, loc_right)
	{
		loc_left.src=buttons[0].src
		loc_right.src=buttons[0].src
	}
function admin_on(loc_left, loc_right)
	{
		loc_left.src=buttons[1].src
		loc_right.src=buttons[1].src
	}

//*** Creates a pop-up window with the passed file
function create_pop_up(file, width, height)
{
	pop_up = open(file, "popup", "RESIZABLE=yes,SCROLLBARS=yes,WIDTH=" + width + ",HEIGHT=" + height)
}

//*** Toggle indicated checkboxes
function toggle_categories(category, form)
{
	//*** Toggle all categories' checkboxes
	if (category == "all")
	{
		for (i = 0; i < form.elements.length; i++)
		{
			//*** Check if the current form element is a category
			if (form.elements[i].name == "a" || form.elements[i].name == "y" || form.elements[i].name == "m")
			{
				//*** Toggle the current checkbox
				form.elements[i].checked = !form.elements[i].checked
			}
		}
	}
	else if (category == "weekdays")
	{
		for (i = 0; i < 5; i++)
		{
			//*** Toggle the workdays (M - F)
			form.weekday[i].checked = !form.weekday[i].checked
		}
	}
	//*** Toggle only a specific category group's checkboxes
	else
	{
		//*** Toggle only the selected category's checkboxes
		for (i = 0; i < eval("form." + category + ".length"); i++)
		{
			eval("form." + category + "[" + i + "].checked = !form." + category + "[" + i + "].checked")
		}
	}
}
