function redirect() { 
	clientInitialsField = document.getElementById("clientInitials");
	clientInitials = clientInitialsField.value.toUpperCase();

	if (clientInitials.length < 3) {
		alert("Please enter a minimum of 3 characters.");
		clientInitialsField.focus();
		}
	else  if (clientInitials == "~!@") {
			location = "http://www.shordandsweed.com/repository/";
		}
		else {
			targetURLbase = "http://www.shordandsweed.com/clientFTP/";
			location = targetURLbase + clientInitials;
		}
	return false;
} 

function onMouseOverColors() {
	if (this.className == "navButton") {
		this.style.backgroundColor = '#ffffff';
		this.firstChild.style.color = '#000000';
	} 
	else	{
		this.style.backgroundColor = '#000000';
		this.firstChild.style.color = '#ffffff';
	}
}
function onMouseOutColors() {
	if (this.className == "navButton") {
		this.style.backgroundColor = '#000000';
		this.firstChild.style.color = '#ffffff';
	} 
	else  {
		this.style.backgroundColor = '#ffffff';
		this.firstChild.style.color = '#000000';
	}
}
function followTheLink() {
	location.href = this.firstChild.href;
}
function displayPopUpSearchMenu() {
	var element = document.getElementById('searchMenu');
	element.style.display = 'inline';
}
function onMouseOverSearchButton() {
	this.style.backgroundColor = '#ffffff';
	this.firstChild.style.color = '#000000';
	displayPopUpSearchMenu();
}
function initializeEventHandlers() {
	var element;
	var tds = document.getElementsByTagName("TD");
	for (var i=0; i < tds.length; i++) {
		element = tds[i];
		if (element.className == "navButton" || element.className == "searchMenuChoiceWrapper") {
			element.onclick = followTheLink;
			element.onmouseout = onMouseOutColors;
			
			if (element.id == "searchButton") {
				element.onmouseover = onMouseOverSearchButton;
			}
			else {
				element.onmouseover = onMouseOverColors;
			}
		}
	}
}
function hidePopUpSearchMenu() {
	var element = document.getElementById('searchMenu');
	if (element) {
		element.style.display = 'none';
	}
}
document.onclick = hidePopUpSearchMenu;