	function priceTable() {

		this.table = null;

		this.add = function( amount, side1, side2, price ) {
			if ( ! ( this.table instanceof Object ) ) this.table = new Object();
			if ( ! ( this.table[ amount ] instanceof Object ) ) this.table[ amount ] = new Object();
			if ( ! ( this.table[ amount ][ side1 ] instanceof Object ) ) this.table[ amount ][ side1 ] = new Object();
			this.table[ amount ][ side1 ][ side2 ] = price;
		}

		this.getPrice = function( amount, side1, side2 ) {
			var result = this.getValue( amount, side1, side2 );
			if ( typeof( result ) != 'number' ) result = this.getValue( amount, side2, side1 );
			return result;
		}

		this.getValue = function( amount, side1, side2 ) {
			if ( this.table instanceof Object ) {
				if ( this.table[ amount ] instanceof Object ) {
					if ( this.table[ amount ][ side1 ] instanceof Object ) {
						if ( typeof( this.table[ amount ][ side1 ][ side2 ] ) == 'number' ) {
							return this.table[ amount ][ side1 ][ side2 ]
						}
					}
				}
			}
			return null;
		}

	}
