	function showHideTree(command, target, command2, target2) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
					changeCategory(command2, target2);
				}
			}
		}
	
		/*if (document.getElementById(id).style.display == 'block') {
			document.getElementById('ico'+id).src = "_flexishell/_images/buttons/ico_tree_close.png";
			client.makeRequest("/_flexishell/_calls/alterTree.php?thisID="+id+"&state=hide", null);
		} else {
			document.getElementById('ico'+id).src = "_flexishell/_images/buttons/ico_tree_open.png";
			client.makeRequest("/_flexishell/_calls/alterTree.php?thisID="+id+"&state=show", null);
		}*/
		
		client.makeRequest("/_flexishell/_html/sections/shopping/category/category-list.php?arg="+command, null);
	}


	function changeCategory(command, target) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/category/category-view.php?arg="+command, null);
	}	
	
	function alterInventoryIndex(command, target) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/category/category-view.php?arg="+command, null);
	}	

	function alterArticleInventoryIndex(command, target) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/articleInventory/articleInventory-view.php?arg="+command, null);
	}	
	
	function alterSpecialsIndex(command, target) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/special/special-view.php?arg="+command, null);
	}	


	function addToBasket(command, target) {
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/basket/basket-list.php?arg="+command, null);
	}	

	function changeQuantity(command, target, page) {  
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/basket/"+page+".php?arg="+command, null);
	}	

	function changeMethod(command, target, page, meth) {  
		var client = new HttpClient();
		client.isAsync = true;
		
		client.callback = function(result) {
			
			if (target != 'none') {
				var tg = target.split('|');
				
				for (var i = 0; i < tg.length; i++) {
					var comp = ('component' + tg[i]) + "";
					document.getElementById(comp).innerHTML = result;
				}
			}
		}
		client.makeRequest("/_flexishell/_html/sections/shopping/basket/"+page+".php?arg="+command+"&meth="+meth, null);
	}	


	//used with the inventory form:
	function itemTypeChange(me) {
		if (me.value == 0 || me.value == 6) {
			slidedown('dimentions');
		} else {
			slideup('dimentions');
		}
	}
	
	function showHideLevels(me) {
		if (document.getElementById('stockDetail'+me).style.display == 'none') {
			slidedown('stockDetail'+me);
			document.getElementById('ico'+me).src = "/_flexishell/_images/buttons/ico_down_d.png";
		} else {
			slideup('stockDetail'+me);
			document.getElementById('ico'+me).src = "/_flexishell/_images/buttons/ico_down.png";
		}
	}
