
function LiveButton(name, imagename, imagedir, numImages, suffix) {
	this.name = name;

	if (suffix == '')
	    suffix = '.gif';

	this.image_n = new Image();
	this.image_n.src = imagedir + "/" + imagename + suffix;
	if (numImages > 1) {
		this.image_h = new Image();
		this.image_h.src = imagedir + "/" + imagename + '-h' + suffix;
	} else {
		this.image_h = null;
	}
	if (numImages > 2) {
		this.image_p = new Image();
		this.image_p.src = imagedir + "/" + imagename + '-p' + suffix;
	} else {
		this.image_p = null;
	}
}

function LBShowChoice(button) {
	if (button != null && button.image_h != null)
	        document[button.name].src = button.image_h.src;
}

function LBSelectChoice(button) {
	if (button != null && button.image_p != null)
	        document[button.name].src = button.image_p.src;
}

function LBResetChoice(button) {
	if (button != null && button.image_n != null)
	        document[button.name].src = button.image_n.src;
}


