function showTab(a,i,p)
{
	if  ( p + "" == "undefined" )	p = ""
	var o				= document.getElementById ( "selectedTab" + p )

	if  ( a == o || !o )	return

	o.id	= ""
	a.id				= "selectedTab"+p
	if  ( o.parentNode.className == "tabsBlock1" )
	{
		o.style.backgroundPosition	= "0px 0px"
		a.style.backgroundPosition	= "0px -78px"
	}

	var divs			= o.getElementsByTagName ( "div" )

	if  ( divs.length )
	{
		divs[0].style.fontWeight	= "normal"
		divs[1].style.fontSize		= "11px"
	}

	divs				= a.getElementsByTagName ( "div" )
	if  ( divs.length )
	{
		divs[0].style.fontWeight	= "bold"
		divs[1].style.fontSize		= "10px"
	}

  var j = 0;
  while (o=document.getElementById("tabPage"+p+(j++)))
    if (o.style.display == "block")
    {
      o.style.display = "none";
      break;
    }
  o=document.getElementById("tabPage"+p+i);
  if (o) o.style.display = "block";
}
function fireShowTab ( i )
{
  var o = document.getElementById ( "tabsLine" )
  if  ( !o )	return

  o = o.getElementsByTagName ( "a" )
  if  ( !o[i] )	return
  showTab ( o[i], i, '' )
  if  ( i == 1)		hideLeftSide ( "block" )
}
function showTabAndScroll ( i, id )
{
	fireShowTab ( i )

	if  ( id >= 0 )	id = "descr" + id

	var myScroll = new Fx.Scroll ( window )
	myScroll.toElement ( id )

}
function jumpTop ( i )
{
	var s	= 'bodypageContainer'
	          
	if ( i == 1 )
	{
		fireShowTab ( i )
		s = 'tabsLine'
	}

	var myScroll = new Fx.Scroll ( window )
	myScroll.toElement ( s )
}
function hoveringTab ( th )
{
	if  ( th.className.split("_")[1]+"" == "undefined" )
	{
		th.className	+= "_hover"
		th.style.cursor	= "pointer"
	}
	else
	{
		th.className = th.className.split("_")[0]+""
		th.style.cursor	= "default"
	}
}
function simpleTabHover ( th )
{
	if  ( th.id == "selectedTab" )	return;
	var pos	= th.style.backgroundPosition
	if  ( !pos  ||  pos == "0px 0px" )
		th.style.backgroundPosition	= "0px -39px"
	else
		th.style.backgroundPosition	= "0px 0px"
}
