/**
* @desc shopping cart class
* @version 1.0
* @author R. Ennik
* @copyright Mediaxplosion 2009
*/
function clsShoppingCart(p_sForm) {
	this.m_oForm = document.forms[p_sForm]
	this.init();
}

/**
* @desc init function
*/
clsShoppingCart.prototype.init = function () {
	var self = this;
	// Set handlers
	var aObjects = this.m_oForm.getElementsByTagName('select');
	if (aObjects.length) {
		for(var i =0; i < aObjects.length; i++) {
			aObjects[i].onchange = function() {
				self.update();
			}
		}
	}
}

/**
* update function
*/
clsShoppingCart.prototype.update = function () {
	var oRpc = new clsHTMLRPC("webshop_orders");
	oRpc.addPostParam('Update', 'update');
	oRpc.postForm(this.m_oForm.name, 'update', null, 'moduleContent');
}