// JavaScript Document
var searchBoxEnabledClass = "words";
var searchBoxDisabledClass = "nowords";
var searchBoxMessage = "Enter keywords here";

function setupPage () {
	document.form1.q.value = searchBoxMessage;
	document.form1.q.className = searchBoxDisabledClass;

	if (browser.isIE5up == true && browser.isIE55 == false && browser.isIE6up == false) {
		// IE5 displays all our styles, but can't handle PNGs
		replacePNGs();
	}
}

function toggleTopSearchBox() {
	// If this function is called and the search box is empty, add
	// the message and give it the disabled class. If 
	
	var searchBox = document.form1.q
	
	if (searchBox.className == searchBoxDisabledClass) {
		searchBox.className = searchBoxEnabledClass;
		searchBox.value = '';
	} else {
		// Don't change anything if they entered a search term
		if (searchBox.value == '') {
			searchBox.className = searchBoxDisabledClass;
			searchBox.value = searchBoxMessage;
		}
	}
}

function replacePNGs() {
	// Replace every case of a PNG with an uglier GIF
	var logo = document.getElementById("logo");
	logo.className = "ie5";
	
	var mainnavlist = document.getElementById("mainnavlist");
	mainnavlist.className = "ie5";
}