
var calculator = Class.create({
	
	watchlist: null,
	searchform: null,
	mainframe: null,
	
	initialize: function(contractor) {
		
		// this is the mainframe html element
		this.mainframe = $("ticketing");
				
		if(contractor) {
			if(typeof window[contractor + "_calculator_watchlist"] == "function") {
				this.watchlist = new window[contractor + "_calculator_watchlist"](this);
			}
			
			if(typeof window[contractor + "_calculator_searchform"] == "function") {
				this.searchform = new window[contractor + "_calculator_searchform"](this);
			}
		}
		
		
		if(!this.watchlist) {
			this.watchlist = new calculator_watchlist(this);
		}
		if(!this.searchform) {
			this.searchform = new calculator_searchform(this);
		}
	}
	
	
	
});


var calculator_translate = function (key) {
	if(calculator_translations[key]) {
		return calculator_translations[key];
	}
	return key;
};


