function over(img)
{
	document[img].src = "/core/button-" + img + "-over.gif";
}

function out(img)
{
	document[img].src = "/core/button-" + img + ".gif";
}

function reloc(list)
{
	var value = list.options[list.selectedIndex].value;

	if(value)
	{
		if(value.lastIndexOf(":") == -1)
			window.location.href = value;
		else
			window.parent.location.href = value;
	}
	else
	{
		alert("Your choice is invalid.  Please try again.");
	}
}

function over2(img)
{
	img.src = "/core/dot-over.gif";
}

function out2(img)
{
	img.src = "/core/dot-out.gif";
}

function printcaldate(year, m1, m2)
{
	var today = new Date(), start = new Date(year, m1 - 1, 1), end = new Date(year + 1, m2, 1);
	m = today.getMonth();
	d = today.getDate();
	wd = today.getDay();
	y = today.getFullYear();
	link = (m + 1) + ".htm#" + d;
	
	if(today.getTime() <= start.getTime() && today.getTime() > end.getTime())
	document.write("<P ALIGN=\"CENTER\">Today's date is: <A HREF=\"" + link + "\"> ", m + 1, "/", d, "/", y, "</A></P>");
}

function search()
{
/*	window.location.href = searchselect.options[searchselect.selectedIndex].value + ;

	var searchquery = document.searchform.query.value;
	var searchstuff = "";
	var i;

	for(i = 1; i <= searchquery.length; i++) 
	{
		if(searchquery.substring(i - 1, i) == " ") 
	 		searchstuff += "+";
		else
			searchstuff += searchquery.substring(i - 1, i);
	}
			
	var index = document.searchform.searchselect.selectedIndex;
	parent.location.href = document.searchform.searchselect.options[index].value + searchstuff;

	alert("Test.");

	parent.location.href = */
}

function countdown()
{
	ccDayNow = new Date(); 
	ccDayThen = new Date("June 17, 1999");
	msPerDay = 24 * 60 * 60 * 1000;
	timeLeft = (ccDayThen.getTime() - ccDayNow.getTime());
	cc_daysLeft = timeLeft / msPerDay;
	daysLeft = Math.floor(cc_daysLeft);
	cc_hrsLeft = (cc_daysLeft - daysLeft) * 24;
	hrsLeft = Math.floor(cc_hrsLeft);
	minsLeft = Math.floor((cc_hrsLeft - hrsLeft) * 60);
	document.write("There are " + daysLeft + " days, " + hrsLeft + " hours and " + minsLeft + " minutes left until school is over!");
}

