function showLogin()
{
	document.getElementById('login-form').style.display = 'block';
	document.getElementsByName('AUTH_USER')[0].focus();

if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
       {event.returnValue = false;}

	return false;
}

function hideLogin()
{
	if(document.getElementById('login-form')) document.getElementById('login-form').style.display = 'none';
if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
       {event.returnValue = false;}

	return false;
}

function wopen(wurl, width, height)
{
wnd = window.open(wurl, "", "location=no,toolbar=no,scrollbars=yes,directories=no,status=no,menubar=no,resizable=no,width=" + width + ",height=" + height + ",left="+Math.floor((screen.width - width)/2)+",top="+Math.floor((screen.height - height)/2)+"");
wnd.focus();
if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
       {event.returnValue = false;}
}

function wopens(wurl, width, height)
{
wnd = window.open(wurl, "", "location=no,toolbar=no,scrollbars=yes,directories=no,status=no,menubar=no,resizable=no,width=" + width + ",height=" + height + ",left="+Math.floor((screen.width - width)/2)+",top="+Math.floor((screen.height - height)/2)+"");
wnd.focus();

if (document.body.filters && navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
        {event.returnValue = false;}
}


function DoActive(myobj, is_clicked) { 

	//tmp = search.where.value;
	temp = new String(myobj.id);
	/*switch (tmp) {
		case "obj": tmp = 'st1'; break;
		case "news": tmp = 'st3'; break;
		case "groups": tmp = 'st5'; break;
	}
	if (temp.match("st1"))
		search.where.value = 'obj';
	if (temp.match("st3")) 
		search.where.value = 'news'; 

	if (temp.match("st5"))
		search.where.value = 'groups'; */

 
	/*if (is_clicked==undefined && search.type.value=="expand") {

		search.submit();
		return 1;
	}*/

	/*if (is_clicked==undefined && DoSearch()) {

		//search.submit();
		return 1;
	}*/


		if (temp.match("st1")) { 

			st1.innerHTML = "<div class='TAB TSelected'><div class='TTop'><div class='TRight'>Заявки</div></div></div>";
			st2.innerHTML = "";
			st3.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st3); return false;'>Прайсы</a></div>";
			st4.innerHTML = "<div>|</div>";
			st5.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st5); return false;'>Участники</a></div>";
			
			ust1.innerHTML = "<div class='TABts'><img src='/images/d.gif' /></div>";
			ust2.innerHTML = "";
			ust3.innerHTML = "";

document.getElementById('elteh-form').style.display = 'block';
if(document.getElementById('price-form')) document.getElementById('price-form').style.display = 'none';
if(document.getElementById('user-form')) document.getElementById('user-form').style.display = 'none';

		}
		if (temp.match("st3")) { 

			st1.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st1); return false;'>Заявки</a></div>";
			st2.innerHTML = "";
			st3.innerHTML = "<div class='TAB TSelected'><div class='TTop'><div class='TRight'>Прайсы</div></div></div>";
			st4.innerHTML = "";
			st5.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st5); return false;'>Участники</a></div>";
			
			ust1.innerHTML = "";
			ust2.innerHTML = "<div class='TABts'><img src='/images/d.gif' /></div>";
			ust3.innerHTML = "";

document.getElementById('price-form').style.display = 'block';
if(document.getElementById('elteh-form')) document.getElementById('elteh-form').style.display = 'none';
if(document.getElementById('user-form')) document.getElementById('user-form').style.display = 'none';

		}
		if (temp.match("st5")) {
			st1.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st1); return false;'>Заявки</a></div>";
			st2.innerHTML = "<div>|</div>";
			st3.innerHTML = "<div class='TAB'><a href='#' onclick='DoActive(st3); return false;'>Прайсы</a></div>";
			st4.innerHTML = "";
			st5.innerHTML = "<div class='TAB TSelected'><div class='TTop'><div class='TRight'>Участники</div></div></div>";
			
			ust1.innerHTML = "";
			ust2.innerHTML = "";
			ust3.innerHTML = "<div class='TABts'><img src='/images/d.gif' /></div>";

document.getElementById('user-form').style.display = 'block';
if(document.getElementById('elteh-form')) document.getElementById('elteh-form').style.display = 'none';
if(document.getElementById('price-form')) document.getElementById('price-form').style.display = 'none';

		}
		
	return false;
}
