


function OpenTab(obj){ // open tabs
            if ($(obj).hide())
               $$('#ContentContainer .tabs').each(function(allTab){
                      allTab.hide(); 
               });    $(obj).show();                   
}
 
function filter_div(type){
       var loader = new Element('div', {'id': 'loader'}).setOpacity(0.3);
       if(type == 1){ document.body.appendChild(loader);
       } else 
         $('loader').remove();
}
    
function showAjaxForm(container, title){
   if ($(container)){      
             $('titleForm').innerHTML = '<b>'+title+'</b>';
             $(container).show();
      }
}
	
function hideLogin(container){
              if($(container)) 
                 $(container).hide();
}

function complete(request){
      if (request.status == 200){
       $('bodyForm').update(request.responseText);
       } else {
         failure(request);
      }
}

function failure(request){
    $('result').update(request.responseText).style.padding = '9px';
}

function view_my_ajax(that){
    $('result').update('<img src="images/ajax-loader.gif" align="absmiddle">').style.padding = '9px';
	new Ajax.Updater(
	    {success: 'bodyForm'},
	    'http://euro-torg.ru/cp/inc/ajax.php', {
	      onComplete: function(request){complete(request)},
	      onFailure: function(request){failure(request)},
	      parameters: Form.serialize(that),
          insertion: Insertion.Top,
	      evalScripts: true
  });
}

hs.align = 'center';
hs.showCredits = false;
hs.graphicsDir = 'images/';
hs.captionEval = 'this.thumb.alt'; // description - alt
hs.transitions = ['expand', 'crossfade'];
hs.dimmingOpacity = 0.25; 
