	function ID(id){
		return document.getElementById(id);
	}

	function openWindow(url, w, h){
		window.open(url, '_blank', 'height=' + h + ', width=' + w + ', location=no, menubar=no, resizable=yes, scrollbars=yes, status=yes, toolbar=no');
	}

	function leftSubMenu(e){
		var menu = e.getElementsByTagName('UL')[0];
		if (menu){
			menu.style.display = (e.className.indexOf('active') >= 0) ? 'none' : 'block';
		}
		if (e.className.indexOf('active') >= 0) {
			e.className = e.className.replace('active', '');
		} else {
			e.className += ' active';
		}
	}

	function action(e, lang){
		window.location.href = '/' + lang + '/action/' + e.value;
	}

	function add_comment(e){
		e.style.display = 'none';
		ID('comment_frm').style.display = 'block';
	}

	function allow(entity, id){
		document.location.href = '/x/' + entity + '/allow/' + id;
	}

	function disallow(entity, id){
		if(confirm('Удалить?')){
			document.location.href = '/x/' + entity + '/disallow/' + id;
		}
	}

