	var currentActve = Array();

	function showHide (target, ca) {
		//if (document.getElementById('admin').value == 1) {
		
			ca = hideAdmin(target, ca);
			
			
			
			if (target != '') {
				hideAllDropdown();
				if (document.getElementById(target).style.display != 'block') {
					var allow = true;
					for (var i = 0; i < ca.length; i++) {
						if (ca[i] == target) {
							allow = false;
						}
					}
	
					//document.menutimer[target] = window.setTimeout("hideAdmin('"+target+"')", 0);
					document.getElementById(target).style.display = 'block';
					document.getElementById('BL_'+target).style.borderStyle = 'solid';
					document.getElementById('BL_'+target).style.borderWidth = '1px';
					document.getElementById('BL_'+target).style.borderColor = '#999999';
	
					if (allow) {
						ca.push(target);
					}
				}
			}
		//}
		return ca;
	}
	
	function renewTime (target) {
		if (target != '') {
			if (document.getElementById(target).style.display != 'block') {
				
				window.clearTimeout(document.menutimer[target]);
				document.menutimer[target] = window.setTimeout("hideAdmin('"+target+"')", 0);
			} 
		}
	}
	
	function hideAdmin(target, ca) {
		for (var i = 0; i < ca.length; i++) {
			if (ca[i] != target) {
				document.getElementById(ca[i]).style.display = 'none';
				document.getElementById('BL_'+ca[i]).style.borderStyle = 'dotted';
				document.getElementById('BL_'+ca[i]).style.borderWidth = '1px';
				document.getElementById('BL_'+ca[i]).style.borderColor = '#CCCCCC';
				ca.splice(i, 1);
			}
		}
		
		return ca;
	}
	
	var ddVisible = Array(); 
	
	
	function showDropdown(ID) {
		while (ddVisible.length > 0) {
			var element = ddVisible.pop();
			//document.getElementById('drop'+element).style.display = 'none';
			slideup('drop'+element);
		}
		ddVisible.push(ID);
		//var dropdown = document.getElementById('drop'+ID).style;
		//dropdown.display = 'block';
		slidedown('drop'+ID);
		
	}
	
	function hideAllDropdown() {
		while (ddVisible.length > 0) {
			var element = ddVisible.pop();
			//document.getElementById('drop'+element).style.display = 'none';
			slideup('drop'+element);
		}
	}
	
	function imageAdmin(ID, state) {
		if (document.getElementById(ID) != null) {
			if (state == 'show') {
				document.getElementById(ID).style.display = 'block';
			} else {
				document.getElementById(ID).style.display = 'none';
			}
		}
	}
	
	
	function getContent(column, sec) {
		
		var client = new HttpClient();
		client.isAsync = true;

		client.callback = function(result) {
			document.getElementById("mainCol"+column).innerHTML = result;
			
		}
		
		client.makeRequest("/_flexishell/_calls/renderContent.php?column="+column+"&sec="+sec, null);
		
	}
	
	function alterContent(act, sec, var1, var2) {
		var client = new HttpClient();
		client.isAsync = true;

		client.callback = function(result) {
			//document.getElementById("mainCol"+column).innerHTML = result;
			eval(result);
		}
		
		client.makeRequest("/_flexishell/_calls/alterContent.php?act="+act+"&sec="+sec+"&var1="+var1+"&var2="+var2, null);
		
	}

	function getListContent(frameID) {
		var client = new HttpClient();
		client.isAsync = true;

		client.callback = function(result) {
			document.getElementById("component"+frameID).innerHTML = result;
		}
		
		var count = document.getElementById("resultCount"+frameID).value;
		var seaStr = document.getElementById("search"+frameID).value;
		client.makeRequest("/_flexishell/_html/sections/user/address/address-list.php?thisID="+frameID+"&count="+count+"&start=0&search="+seaStr, null);
		
	}

	function changeListPage(frameID, start) {
		
		var client = new HttpClient();
		client.isAsync = true;

		client.callback = function(result) { 
			document.getElementById("component"+frameID).innerHTML = result;
		}
		
		client.makeRequest("/_flexishell/_html/sections/user/address/address-list.php?thisID="+frameID+"&start="+start+"", null);
		
	}
	
	function updateGal(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/article/gallery/galContent/galContent-view.php?arg="+command, null);
	}	
	
	///generic call

	


