function $(id) {
	return document.getElementById(id);
}

var tabs = new Array('mainpage', 'mne-nado', 'talk', 'we-trust', 'authors', 'subscribe');
function openSection(o, current_tab) {
	var tr = o.parentNode.parentNode;
	var tds = tr.getElementsByTagName('td');
	for (i = 0; i < tds.length; i++) {
		tds[i].getElementsByTagName('a')[0].className = '';
	}
	o.className = 'curr';
	
	for (tab in tabs) {
		$(tabs[tab]).style.display = 'none';
	}
	$(current_tab).style.display = 'block';
	
	return false;
}

function showKB() {
	var width = 700, height = 350;
	var left = parseInt((screen.availWidth/2)-(width/2));
    var top = parseInt((screen.availHeight/2)-(height/2));
    var windowProperties = "width="+width+",height="+height+",left="+left+",top="+top;
	win = window.open('http://www.mail.ru/kb', 'kb', windowProperties+",resizable=no,toolbar=0,location=0,status=yes,menubar=0,directories=0,scrollbars=yes");
	win.focus();
	return false;
}