var upTextColor = "black";
var overTextColor = "white";
var upBGColor = "white";
var overBGColor = "3484A4";
function setup(buttonName,maxButtons,buttonTop,buttonLeft,buttonSpacing,isHoriz) {
	setupBody();
	setupButtons(buttonName,maxButtons,buttonTop,buttonLeft,buttonSpacing,isHoriz);
}
function setupBody() {
	var bodySpan = document.getElementById("Body");
	bodySpan.width = screen.width;
}
function setupButtons(buttonName,maxButtons,buttonTop,buttonLeft,buttonSpacing,isHoriz) {
	var thisObj;
	for (var i=0; i<maxButtons; i++) {
		thisObj = document.getElementById(buttonName + "_" + (i+1));
		if (!isHoriz) {
			thisObj.style.left = buttonLeft;
			thisObj.style.top = buttonTop;
			buttonTop += buttonSpacing;
		} else {
			thisObj.style.top = buttonTop;
			thisObj.style.left = buttonLeft;
			buttonLeft += buttonSpacing;
		}
		thisObj.onmouseover = overButton;
		thisObj.onmouseout = outButton;
		thisObj.onmousedown = downButton;
		thisObj.style.visibility = "visible";
	}
}

function overButton(evt) {
	var thisButton = document.getElementById(getTargetId(evt));
	thisButton.style.color = overTextColor;
	thisButton.style.backgroundColor = overBGColor;
}

function outButton(evt) {
	var thisButton = document.getElementById(getTargetId(evt));
	with (thisButton.style)	{
		color = upTextColor;
		backgroundColor = upBGColor;
		border = "3px outset silver";
		paddingLeft = 2;
		paddingTop = 2;
	}
}

function downButton(evt) {
	var thisButton = document.getElementById(getTargetId(evt));
	with (thisButton.style) 	{
		color = upTextColor;
		backgroundColor = upBGColor;
		border = "3px inset silver";
		paddingLeft = 4;
		paddingTop = 3;
	}
}

function getTargetId(thisEvent) {
	var objectID; 
	if (browser.isIE) {
		objectID = event.srcElement.id;
	}
	if (browser.isNetscape) {
		objectID = thisEvent.target.id;
	}
	return objectID;
}
