// JavaScript Document

function ResultColumnView(id) {
	this.dom = $(id);
	this.loading = false;
	this.first = true;
	
	this.addSaleInfo = function(si) {
		this.saleInfo = si;
	};
	
	this.set = function(key, content) {
		if(!this.loading) {
			if(content.indexOf('Loading') != -1) {
				this.loading = true;
				this.dom.innerHTML += content;
			}
		} else {
			if(content.indexOf('Loading') == -1) {
				if(this.first) {
					this.dom.innerHTML = content;
					this.first = false;
				} else {
					this.dom.innerHTML += content;
				}
			}
		}
	}
	
	this.resetContent = function() {
		this.loading = false;
		this.first = true;
		this.dom.innerHTML = '';
	}
}