function AnyText(item_id, text) 
{
	var obj = document.getElementById(item_id);
	if (obj.value == text) { obj.value = ''; return; }
	if (obj.value == '') { obj.value = text; return; }
}
function getActive()
{
	var uri = document.location.toString();
	var ar = uri.split('/');
	var a = $('leftbar').getElementsByClassName('tabus');
	for (i = 0, j = a.length; i < j; i++) {
		var find = ar[3] && a[i].href.indexOf(ar[3]);
		a[i].className = (find != -1) ? 'tabus selected' : 'tabus';
	}
}
function showSlave(rootId)
{
	var id = parseInt(rootId.substr(6));
	var slaveObj = $('slave' + id);
	var cook = new Cookie();
	if (slaveObj.style.display != 'block') {
		slaveObj.style.display = 'block';
		cook.set('slave', 'slave' + id, new Date("May 10, 2100"), '/');
	} else {
		slaveObj.style.display = 'none';
		cook.del('slave', '/');
	}
	delete(cook);
	parseSlave('menu');
}
function parseSlave(container)
{
	var cook = new Cookie();
	var slaves = $(container).getElementsByClassName('drop');
	for (i = 0, j = slaves.length; i < j; i++) {
		slaves[i].style.display = (cook.isSet('slave') && slaves[i].id == cook.get('slave')) ? 'block' : 'none';
	}
	delete(cook);
}
