AC_FL_RunContent = 0;

function body_hide_view(open_div) {
  var text_array = new Array("text_o_nas","text_technika","text_akce","text_objednavka","text_kontakt","text_reference","text_foto","text_katalog","text_akce_detail","text_video","text_video_1","text_video_2","text_video_3","text_video_4","text_video_5","text_video_6","text_video_7","text_video_8","text_video_9");
  for(i=0;i<text_array.length;i++){
    if ($(text_array[i]).style.display != 'none' && open_div != text_array[i]) {
      new Effect.Fade(text_array[i]);
    }
  }
  if ($(open_div).style.display == 'none') {
    new Effect.Appear(open_div);
  }
  initLightbox();
}

function action_hide_view(show_year) {
  var year_link_array = document.getElementsByClassName('akc');
  for(i=0;i<year_link_array.length;i++){
      $(year_link_array[i]).style.fontWeight = 'normal';
  }
  $('link'+show_year).style.fontWeight = 'bold';


  var year_array = document.getElementsByClassName('acdiv');
  for(i=0;i<year_array.length;i++){
      if ($(year_array[i]).style.display != 'none' && show_year != year_array[i]) {
          //new Effect.Fade(year_array[i]);
          $(year_array[i]).hide();
      }
  }
  if ($(show_year).style.display == 'none') {
//        new Effect.Appear(show_year);
    $(show_year).show();
  }
}

function get_foto(page) {
  var url = 'fotogalerie.php';
  var pars = 'page='+page;
  var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, onComplete: put_foto });
}
function put_foto(originalRequest){
  $('text_foto').innerHTML = '<img src="images/text_foto.gif" alt="Fotogalerie" /><br />'+originalRequest.responseText;
  initLightbox();
}
  
function hideall(){
  $A($$('.tdetail')).each(Element.hide);
  $('totaldiv').hide();
}  
    
function dShow(id){
  $('totaldiv').setOpacity(0);
  $('totaldiv').setStyle({height: $('body').getHeight()+'px'});
  $('totaldiv').setStyle({display: ''});
  new Effect.Opacity('totaldiv', { 
      from: 0.0, 
      to: 0.75,
      duration: 0.5
    }
  );
  $(id).setOpacity(0);
  $(id).setStyle({display: ''});
  new Effect.Opacity(id, { 
      from: 0.0, 
      to: 1.0,
      duration: 0.7
    }
  );
}  

function createWindow(cUrl,cName,cFeatures) {
var xWin = window.open(cUrl,cName,cFeatures)
}
