/**
* Gère les informations sur un produit à louer.
*
* @param String name Nom du produit
* @access public
* @since 1.0
*/
function Product(name) {
	/**
	 * Nom du produit.
	 *
	 * @var String
	 * @access private
	 * @since 1.0
	 */
	this.name = name;
	
	/**
	 * Liste des tarifs de location.
	 *
	 * @var Array
	 * @access private
	 * @since 1.0
	 */
	this.prices = new Array();
	
	/**
	* Modifie le nom du produit.
	*
	* @param String value Nom du produit
	* @access public
	* @since 1.0
	*/
	this.setName = function(value) {
		this.name = value;
	}
	
	/**
	* Ajoute un tarif de location.
	*
	* @param String duration Durée de location
	* @param String value Montant de la location
	* @access public
	* @since 1.0
	*/
	this.addPrice = function(duration, value) {
		this.prices.push(new ProductPrice(duration, value));
	}
	
	/**
	* Renvoit la liste des tarifs de location.
	*
	* @return Array Liste des tarifs de location
	* @access public
	* @since 1.0
	*/
	this.getPrice = function() {
		return this.prices;
	}
	
	/**
	* Renvoit les informations sur l'objet.
	*
	* @return String Information sur l'objet
	* @access public
	* @since 1.0
	*/
	this.toString = function() {
		string = '';
		
		string += 'name = ' + this.name + "\n";
		for(var i = 0; i < this.prices.length; i++) {
			string += "\t" + 'prices[' + i + '] = ' + this.prices[i] + "\n";
		}
		
		return string;
	}
}
