function showPanel(cid) {

	cell  = document.getElementById(cid);
	cl1   = document.getElementById('sx1');
	cl2   = document.getElementById('sx2');
	cl3   = document.getElementById('sx3');

	cf1   = document.getElementById('sf1');
	cf2   = document.getElementById('sf2');
	cf3   = document.getElementById('sf3');

	document.getElementById('f_sx1').style.display = 'none';
	document.getElementById('f_sx2').style.display = 'none';
	document.getElementById('f_sx3').style.display = 'none';

	cf1.style.fontWeight = 'normal';
	cf2.style.fontWeight = 'normal';
	cf3.style.fontWeight = 'normal';

	document.getElementById('f_'+cid).style.display = 'block';

	if (cid == 'sx1') {
		cl1.style.borderRight     = 'solid #999999 1px';
		cl1.style.borderBottom    = 'solid #FFFFFF 1px';
		cl1.style.backgroundColor = '#FFFFFF';
		cf1.style.fontWeight      = 'bold';

		cl2.style.borderRight     = 'solid #FFFFFF 1px';
		cl2.style.borderBottom    = 'solid #999999 1px';
		cl2.style.backgroundColor = '#FAFAFA';

		cl3.style.borderBottom    = 'solid #999999 1px';
		cl3.style.backgroundColor = '#FAFAFA';
	}

	if (cid == 'sx2') {
		cl1.style.borderRight     = 'solid #999999 1px';
		cl1.style.borderBottom    = 'solid #999999 1px';
		cl1.style.backgroundColor = '#FAFAFA';

		cl2.style.borderRight     = 'solid #999999 1px';
		cl2.style.borderBottom    = 'solid #FFFFFF 1px';
		cl2.style.backgroundColor = '#FFFFFF';
		cf2.style.fontWeight      = 'bold';

		cl3.style.borderBottom    = 'solid #999999 1px';
		cl3.style.backgroundColor = '#FAFAFA';
	}

	if (cid == 'sx3') {
		cl1.style.borderRight     = 'solid #FFFFFF 1px';
		cl1.style.borderBottom    = 'solid #999999 1px';
		cl1.style.backgroundColor = '#FAFAFA';

		cl2.style.borderRight     = 'solid #999999 1px';
		cl2.style.borderBottom    = 'solid #999999 1px';
		cl2.style.backgroundColor = '#FAFAFA';

		cl3.style.borderBottom    = 'solid #FFFFFF 1px';
		cl3.style.backgroundColor = '#FFFFFF';
		cf3.style.fontWeight      = 'bold';
	}

	return false;
}

function rea_prp() {
	pnl   = document.getElementById('rea');

	pnl.style.display = (pnl.style.display == 'none') ? 'block' : 'none';

	return false;
}

function qa(id) {
	pnl   = document.getElementById('qa'+id);

	pnl.style.display = (pnl.style.display == 'none') ? 'block' : 'none';

	return false;
}

function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=1';
	return window.open(mypage, myname, settings)
}

var exit = true;
function bye() {
	if (exit) ByeWindow = NewWindow("bye.php","bye",360,360,0);
}

function ukaz(id) {
	MyWinPic = NewWindow('obrazok.php?pic='+id,'pic',200,200,0);
}

function hilPanel(cid) {
	cf = document.getElementById(cid);
	cf.style.color = '#FF0000';
	
	return false;
}