    function category_select(CatId) {
		try {
   	 	document.getElementById('main_body').style.display = "none";
	    	document.getElementById('cat_body').style.display = "block";
		} catch(err) {
		}
      document.getElementById('mess_cell').innerHTML = "&nbsp;";
      var CatDescr_httpRequester = getHTTPRequestObject();
      getData('cat_descr', 'category_select.php', 'type=1&&category_id='+CatId, CatDescr_httpRequester);
      var CatPositions_httpRequester = getHTTPRequestObject();
      getData('cat_positions', 'category_select.php', 'type=2&&category_id='+CatId, CatPositions_httpRequester);
    }

function GetPosition(APosition) {
	//var element = document.getElementById('a_'+APosition);

	var httpRequester = getHTTPRequestObject();
	/*var Block = document.getElementById('mess_cell_table');
	Block.style.display = 'block';
	var InclBlock = document.getElementById('mess_cell');
	InclBlock.style.display = 'block';

	var bounds = getBounds(element);  

	Block.style.left = bounds.left;
	Block.style.top = bounds.top;*/

	getData('mess_cell', 'inc/add_to_basket.inc.php', 'position=' + APosition, httpRequester);
}

    function getBounds(element)
    {
      var left = element.offsetLeft;
      var top = element.offsetTop;
      for (var parent = element.offsetParent; parent; parent = parent.offsetParent)
      {
        left += parent.offsetLeft;
        top += parent.offsetTop;
      }
      return {left: left, top: top, width: element.offsetWidth, height: element.offsetHeight};
    }

    function CmpPosition(APosition) {
  		// window.open("compare.php", 'popupWindow');

  		alert(popupWindow);

      var httpRequester = getHTTPRequestObject();
      getData('mess_cell', 'inc/add_to_compare.inc.php', 'position=' + APosition, httpRequester);
    }

    function GetBigPicture(iPosition) {
    	var httpRequester = getHTTPRequestObject();
    	getData("big_img", "inc/getBigImg.inc.php", "img_id=" + iPosition, httpRequester)
    }

	 function open_nav() {
		 navig = window.open("","compare","height=768,width=1024,left=0,top=0,fullscreen=no,scrollbars=yes,toolbar=yes,status=yes,resizable=yes,location=yes");
	    navig.focus();
	    return true;
	 }
