// The Loveland Schools Press ONLINE
// Main JavaScript Scripts Collection
// Copyright (C) 2002 The Loveland Schools Press
// -----------------------------------------------------------------------------
// Author:			Minh Nguyen <lspohio@netscape.net>
// Last Modified:	2002.01.01
// -----------------------------------------------------------------------------

// "Add Tab to Netscape 6" - original code by Netscape Communications Corp., 1999
function addNetscapePanel() { 
  	if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) 
	{ 
		window.sidebar.addPanel ("LSP xPress", 
		"http://members.fortunecity.com/lsponline/gen-en/xpress/index.html","http://members.fortunecity.com/lsponline/gen-en/xpress/customize.html"); 
	} 
	else 
	{ 
		var rv = window.confirm ("This feature only works in Netscape 6 and Mozilla. " + "Would you like to download Netscape 6 now?"); 
		if (rv) 
		document.location.href = "http://home.netscape.com/browsers/6/index.html";
	} 
}

// "Working with Days" - original code by Tom Negrino and Dori Smith
dayName = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
monName = new Array("January","February","March","April","May","June","July","August","September","October","November","December")
now = new Date
thisDate = now.getDate()
thisMonth = now.getMonth()
function displayDate() {
	document.write (dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + "<sup>")
	if (thisDate == "1") {
		document.write ("st")
	}
	else if (now.getDate() == "2") {
		document.write ("nd")
	}
	else if (now.getDate() == "3") {
		document.write ("rd")
	}
	else if (now.getDate() == "21") {
		document.write ("st")
	}
	else if (now.getDate() == "22") {
		document.write ("nd")
	}
	else if (now.getDate() == "23") {
		document.write ("rd")
	}
	else if (now.getDate() == "31") {
		document.write ("st")
	}
	else {
		document.write ("th")
	}
	document.write ("<\/sup>, 2002")
}

// "Sliding Menus" - original code by Tom Negrino and Dori Smith
function togglePanel(currPanel) {
	if (document.getElementById) {
		thisPanel = document.getElementById(currPanel).style
		if (thisPanel.display == "block") {
			thisPanel.display = "none"
		}
		else {
			thisPanel.display = "block"
		}
		return false
	}
	else {
		return true
	}
}

// "Stylesheet Selector" - original code by Minh Nguyen, 2002
function chooseStylesheet() {
	document.write ("<link rel=\"stylesheet\" href=\"")
	if (thisMonth == 0) {
		if (thisDate < 3) {
			document.write ("newyear")
		}
	}
	else if (thisMonth == 1) {
		if (thisDate == 18) {
			document.write ("patriotic")
		}
	}
	else if (thisMonth == 2) {
		if (thisDate == 31) {
			document.write ("easter")
		}
	}
	else if (thisMonth == 3) {
		if (thisDate < 8) {
			document.write ("easter")
		}
	}
	else if (thisMonth == 4) {
		if (thisDate == 27) {
			document.write ("patriotic")
		}
	}
	else if (thisMonth == 5) {
		if (thisDate == 14) {
			document.write ("patriotic")
		}
	}
	else if (thisMonth == 6) {
		if (thisDate == 4) {
			document.write ("patriotic")
		}
	}
	else if (thisMonth == 8) {
		if (thisDate == 2) {
			document.write ("labor")
		}
	}
	else if (thisMonth == 9) {
		if (thisDate == 31) {
			document.write ("halloween")
		}
	}
	else if (thisMonth == 10) {
		if (thisDate = 11) {
			document.write ("patriotic")
		}
		else if (thisDate == 28) {
			document.write ("thanksgiving")
		}
	}
	else if (thisMonth == 11) {
		document.write ("christmas")
	}
	else {
		document.write ("standard")
	}
	document.write (".css\" type=\"text\/css\" media=\"screen\" title=\"Default Stylesheet\" \/>")
}