function openResCategory(iCatId) {
  var ProductsBlock = $('catContainer_'+iCatId);
  var currentStatus = ProductsBlock.getStyle('display');
  var ProdContainer = $$('div.productContainer');
  var iProdCount    = ProdContainer.length;
  var i             = 0;
  for (i;i<iProdCount;i++) {
  	ProdContainer[i].hide();
  }
  if (currentStatus == 'none') {
  	ProductsBlock.setStyle({display: "block"});
  } else {
    ProductsBlock.setStyle({display: "none"});
  }
}

function hideProdContainer() {
	$('resourceDetailFrame').hide();
}

function openNewsBlock(iContentId, sOpener, sClose) {
  var newsBlock = $('hContent_'+iContentId);
  var descBlock = $('sDescription_'+iContentId);
  var currentStatus = newsBlock.getStyle('display');

  if (currentStatus == 'none') {
  	$('openerBtn_'+iContentId).innerHTML = '&raquo;'+sClose;
  	newsBlock.setStyle({display: "block"});
  	descBlock.setStyle({display: "none"});
  } else {
    $('openerBtn_'+iContentId).innerHTML = '&raquo;'+sOpener;
    newsBlock.setStyle({display: "none"});
  	descBlock.setStyle({display: "block"});
  }
}

function resize() {
    var rightHeight   = $('contentRight').getHeight();
    var leftHeight      = $('contentFrame').getHeight();

    //ContentResize
    var mainHeight    = $('mainContainer').getHeight();
    var topHeight     = $('topFrame').getHeight();
    var contHeight    = $('content').getHeight();
    var completeCont  = topHeight+contHeight;

    if (mainHeight > completeCont) {
      var iContHeight = mainHeight-topHeight;
      //$('content').setStyle({height: iContHeight-46+'px'});
      $('contentRight').setStyle({height: iContHeight-46+'px'});
    }

    Event.observe(window, 'click', resize);
}
function init() {
var aMenus     = $$('#leftFrame > ul ul');
var iMenuCount = aMenus.length;
var oUpperLi   = null;

//	alert(iMenuCount);

  for (i = 0; i < iMenuCount; i++) {
	var oActiveMenu = aMenus[i];
	if (((oUpperLi = oActiveMenu.up('li')).hasClassName('active')) || (oActiveMenu.down('.active'))) {
		oActiveMenu.show();

		if (oUpperLi) {
			oUpperLi.addClassName('active');
		}
	} else {
		oActiveMenu.hide();
	}

	oUpperLi = null;
  }
}
function invisibleMenu () {
 var menuField = $('')
}
