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 = $('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 hideProdContainer() {
	$('resourceDetailFrame').hide();
}

function contentResize() {
    var contentHeight   = $('contentFrame').getHeight();
    var topHeight       = $('topFrame').getHeight();
    var naviHeight      = $('mainNavigation').getHeight();
    var totalHeight     = contentHeight+topHeight+naviHeight;
    var windowSize      = document.viewport.getHeight();

    if(totalHeight < windowSize) {
    	$('contentFrame').setStyle({ height: windowSize-topHeight-naviHeight-45+'px'});
    	contentHeight = $('contentFrame').getHeight();
    	if(contentHeight < 530) {
    	  $('contentFrame').setStyle({ height: '530px'});
    	}
    }
}
function init() {
var aMenus     = $$('#contentRight > 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 = $('')
}

