//***********************
// Category Constructor *
//***********************
function Category(output_wrapper)
{	
	// get id's
	this.output_wrapper = document.getElementById(output_wrapper);
	
	// set strings
	this.path	= 'components/multishop/http/';
}

//******************************************
// Function get categories from department *
//******************************************
Category.prototype.getCategoriesFromDepartment = function(obj)
{
	// set object to var
	var _this = this;
	
	var myConn = new XHConn();
	
	if (!myConn) alert("XMLHTTP not available. Please try a newer/better browser.");
	
	// return result when done
	var fnWhenDone = function (oXML)
	{
		// put response in the wrapper
		_this.output_wrapper.innerHTML = oXML.responseText;
	}
	
	// make the connection
	myConn.connect(this.path + 'getCategories.php', 'POST', 'did=' + obj.value, fnWhenDone);
}
