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 openNewsBlock(iContentId, sOpener, sClose) {
  var newsBlock = $('hDescription_'+iContentId);
  var descBlock = $('sDescription_'+iContentId);
  var currentStatus = newsBlock.getStyle('display');

  if (currentStatus == 'none') {
  	$('openerBtn_'+iContentId).innerHTML = '&raquo;'+sClose;
  	newsBlock.show();
  	descBlock.hide();
  } else {
    $('openerBtn_'+iContentId).innerHTML = '&raquo;'+sOpener;
    newsBlock.hide();
  	descBlock.show();
  }
}

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

function movingContent() {
    var contentHeight   = $('mainContainer').getHeight();
    var windowSize      = document.viewport.getHeight();

    var mainHeight      = $('mainFrame').getHeight();
    var topHeight       = $('topFrame').getHeight();
    var footerHeight    = $('footer').getHeight();

    if (contentHeight < windowSize) {
      var iDifference = windowSize-contentHeight;
      var bIE         = document.all != null ? 1 : 0;
      if(bIE) {
        $('mainFrame').setStyle({height: (iDifference+mainHeight-25)+"px"});
      //$('mainFrame').setStyle({height: (iDifference+mainHeight-25-footerHeight)+"px"});
      } else {
        $('mainFrame').setStyle({height: (iDifference+mainHeight-25)+"px"});
      }

    }
}
function init() {
var aMenus     = $$('#navFrame > 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 = $('')
}
