/** 
	Maintains button state, changes icons, and hides and shows forms
	on the Vehicle Details page.
	@extends	SectionDisplayer
*/
function DetailsFormDisplayer(){
	this.offIcon, this.onIcon;
}
DetailsFormDisplayer.prototype = new SectionDisplayer();

/**
	Sets the paths to the images which will be used for the
	'on' and 'off' state icons.
	@param	icon		(Object) Object which defines paths to images for 'on' and 'off' states
*/
DetailsFormDisplayer.prototype.setIcons = function(iconObj){
	this.offIcon = iconObj.off;
	this.onIcon = iconObj.on;
}
/**
	Hides the old active area and shows the updated one
	and updates the related icons.
	@param	id		(String) An id of an element on the page
*/
DetailsFormDisplayer.prototype.itemOn = function(id){
	if (id != this.activeId){
		if (this.activeId != null) {
			this.setState(this.idPrefix+this.activeId+this.idSuffix, "off");
			document.getElementById(this.bodyIdPrefix+this.activeId+this.bodyIdSuffix).style.display = "none";
			document.getElementById(this.activeId+"Icon").src = this.offIcon;
		}
		this.setState(this.idPrefix + id + this.idSuffix, "on");
		document.getElementById(this.bodyIdPrefix+id+this.bodyIdSuffix).style.display = "block";
		document.getElementById(id+"Icon").src = this.onIcon;
		this.activeId = id;
	}
}
