
function doload(value,value1,block,value2) {

//if (document.getElementById('linkshow_view'+value2)) document.getElementById('linkshow_view'+value2).style.display='none';
//document.getElementById('debug').innerHTML = showthisitem;
//||(table=='modules')
/*
if ((table=='news')||(table=='faq')||(table=='gb')||(table=='publications')) var filename = 'show_news';
else if ((table=='catalog_groups')) var filename = 'catalog';
else if ((table=='catalog')) var filename = 'catalog';
else if ((table=='modules')) var filename = 'modules_main';
else if ((table=='menu')) var filename = 'modules';
//else if ((table=='about')) {var filename = 'show_pages';}
else 
*/
if (value == 'photo') var filename = 'show_imgs';
else if (value == 'catalog_groups') var filename = 'show_imgs_groups';
//alert(value);
    JsHttpRequest.query(
        '/modules/'+filename+'.php', 
        { value: value, value1: value1, block: block, value2: value2},        
        function(responseJS, responseText) {
            // This function is called on data ready (readyState=4).
            // Write result to page element ($_RESULT become responseJS). 
            //block_name='block'+value;



// Create confirm_block
/*
            if (responseJS.confirm) 
            {
            var responseJS_confirm=responseJS.confirm;
            //drawConfirmBlock(responseJS_confirm);
            }
            */
// Create confirm_block END

            if (block) document.getElementById(block).innerHTML =responseJS.data;
            //setEvents('hilighttable');
        },        
        true // do not disable caching
    );
    if ((value2!='nohide')) {showblock(block,block);}//alert(showthisitem);
}








function showblock(hiddenlayer,numlink){
//var hiddenlayer
var div = document.getElementById(hiddenlayer).style;
//var linkwhichshow = document.getElementById(''+numlink);
//var linkwhichhide = document.getElementById(''+numlink);

//if (linkwhichshow) linkwhichshow = linkwhichshow.style;
//if (linkwhichhide) linkwhichhide = linkwhichhide.style;
//var divwhichshow = document.getElementById(hiddenlayer).style;
//if (linkwhichhide) linkwhichhide.display='inline';
//if (linkwhichshow) linkwhichshow.display='none';

if (div.visibility=='hidden') {
//if (linkwhichhide) linkwhichhide.visibility='visible';
//if (linkwhichshow) linkwhichshow.visibility='hidden';
if (div) div.visibility = 'visible';
}

else {
//if (linkwhichhide) linkwhichhide.visibility='hidden';
//if (linkwhichshow) linkwhichshow.visibility='visible';

if (div) div.visibility = 'hidden';
}
}




var _w=window,_d=document;
function hideallblock(hiddenlayer,current_layer) {
var hiddenlayer;
var current_layer;
//var current_layer_block = document.getElementById(current_layer);
a=_d.all?_d.all:_d.getElementsByTagName("*");

    aLength=a.length;
    for(var i=0;i<aLength;i++)
    {    
    var b=a[i].getAttribute("id");
      if (b&&(b.indexOf(hiddenlayer)!=-1)) {
      var elem = document.getElementById(b);
      //if (elem.style.display=='none') elem.style.display='inline';
      //if (elem.style.display=='inline') 
      if (b != current_layer) elem.style.visibility='hidden';
      }
    }
} 

