// videoprehravac
function resizePlayer(width,ratio){  
  var height = width * ratio; 
  document.getElementById("as4u_flvPlayer").style.width = width+"px";
  document.getElementById("as4u_flvPlayer").style.height = height+"px";
  return true;  
}

// nova galerie

var galSizeH = 0;
var galSizeW = 0;
var galScroll = 0;
var galMiniH = 0;
var galTopDivH = 0;
var galId = 0;

var aktualFoto = 0;
var predesleFoto = 0;
var dalsiFoto = 0;
var oldFoto = 0;

var casovacBloku;
var casovacPrehravani;
var gallang = 'cs';

var jMousePosX = 0;
var jMousePosY = 0;

var jMousePosXold = 0;
var jMousePosYold = 0;

if(typeof jQuery == 'function'){
jQuery(document).ready(function(){
   $(document).mousemove(function(e){
      jMousePosX = e.pageX;
      jMousePosY = e.pageY;
   }); 
})
}

function showOvlGal(){
  if(document.getElementById('galery_view_transparent').style.display == ""){
    if((jMousePosXold == jMousePosX) && (jMousePosYold == jMousePosY) && (oldFoto == aktualFoto)){
      
      $("#gal_popis_transparent").hide(500);
      $("#gal_popis").hide(10);
      $("#gal_a_predchozi").hide(10);
      $("#gal_a_dalsi").hide(10);
      $("#gal_a_close").hide(10);
      
      setTimeout("showOvlGal()", 100);
      
    } else {
      
      oldFoto = aktualFoto;
      
      $("#gal_popis_transparent").show(200);
      $("#gal_popis").show(10);
      $("#gal_a_predchozi").show(10);
      $("#gal_a_dalsi").show(10);
      $("#gal_a_close").show(10);
      
      setTimeout("showOvlGal()", 3000);
      
    }
    
    jMousePosXold = jMousePosX;
    jMousePosYold = jMousePosY;
  }
  
}


function imageStarSelected(iStar){

  for (var i=1;i<=5;i++){
    if(i <= iStar){
      $("#imageStar" + i).attr("src","/images/gallery/hvezdicka_zluta.png");
    } else {
      $("#imageStar" + i).attr("src","/images/gallery/hvezdicka_cerna.png");
    }

  }
}

function imgReviewsSet(imgSet, score){
  
  var params = "&imgSet=" + imgSet +
               "&score=" + score +
               "&subakce=set_score";

  $('#image_hodnoceni_div_star').load('/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params, function(){});

/*
  $.get('/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params' + params, 
    function(xml) {
      $(xml).find('response').each(function(){
        alert($(this).find('status').text());
     });
		}, "xml");
 */ 
}


function galWinDim(){
  
	if (window.innerHeight){
    galSizeH = window.innerHeight;
    galSizeW = window.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight){
		galSizeH = document.documentElement.clientHeight;
		galSizeW = document.documentElement.clientWidth;
	} else if (document.body && document.body.clientHeight){
		galSizeH = document.body.clientHeight;
		galSizeW = document.body.clientWidth;
  }
  
  if($.browser.msie == false){
    galSizeW = galSizeW - 18;
  }
  
  if(galSizeH == 0){
    alert('Error');
  } else {
    document.getElementById('galery_view_transparent').style.height = (galSizeH) + 'px';
    document.getElementById('galery_view').style.height = (galSizeH) + 'px';
    document.getElementById('galery_view_transparent').style.width = (galSizeW) + 'px';
    document.getElementById('galery_view').style.width = (galSizeW) + 'px';
    casovacBloku = setTimeout('galWinDim()',100);
  }

  if (document.documentElement && document.documentElement.scrollTop) {
    galScroll = document.documentElement.scrollTop;
  } else if (document.body) {
    galScroll = document.body.scrollTop;
  } else {
    galScroll = 0;
  }
  document.getElementById('galery_view_transparent').style.top = (galScroll) + 'px';
  document.getElementById('galery_view').style.top = (galScroll) + 'px';
  
  if(document.getElementById('gal_minidiv')){
    galTopDivH = galSizeH - galMiniH ;
    document.getElementById('gal_topdiv').style.height = (galTopDivH) + 'px';
    document.getElementById('gal_topdiv').style.width = (galSizeW) + 'px';
    document.getElementById('gal_minidiv').style.width = (galSizeW) + 'px';
  }
  if(document.getElementById('gal_miniobal')){
    document.getElementById('gal_miniobal').style.width = (galSizeW) + 'px';
  }  
}

function showgalery(obr, gal, minisize, lang){
  var galeryDiv;
  minisize = 120;
  galMiniH = minisize;
  galId = gal;
  gallang = lang;
  document.getElementById('galery_view').style.display = '';
  document.getElementById('galery_view_transparent').style.display = '';
  //document.getElementById('galery_view').focus();
  galeryDiv = '<div style="width: 0px; height: ' + (minisize) + 'px; padding: 0px;	margin: 0px;" id="gal_minidiv"></div>';
  galeryDiv += '<div style="width: 0px; padding: 0px; margin: 0px; height: 0px;" id="gal_topdiv"></div>';
  
  document.getElementById('galery_view').innerHTML = galeryDiv;

  galWinDim();  
  showObrGal(obr);
  setTimeout('loadMiniWait()',100);
  
  showOvlGal();
  
}

function loadMiniWait(){
  if(document.getElementById('gal_topdiv').innerHTML != ''){
    loadMini();
  } else {
    setTimeout('loadMiniWait()',100);
  }
}



function showObrGal(obr){
  if(aktualFoto != obr){
    if(document.getElementById('igal4u' + aktualFoto)){
      document.getElementById('igal4u' + aktualFoto).style.border = '2px solid black';
    }
    if(document.getElementById('igal4u' + obr)){
      document.getElementById('igal4u' + obr).style.border = '2px solid white';
    }
    
    aktualFoto = obr;
    //myDiv = document.getElementById('gal_topdiv');
    var params = "&subakce=obrshow" +
                 "&obr=" + obr + 
                 "&galTopDivH=" + galTopDivH + 
                 "&galSizeW=" + galSizeW;

    $("#gal_topdiv").load('/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params, '', 
      function(){
        afterLoadMini();
      }
    );
    /*    
    if (xmlHttp)
    {
      try
      {
        xmlHttp.open('GET', '/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params, true);
        xmlHttp.onreadystatechange = handleRequestStateChange;
        xmlHttp.send(null);
      }
      catch (e)
      {
        alert("Can't connect to server 2:\n" + e.toString());
      }
    }
    afterLoadMini();
    */
  }
}

function loadMini(){

  //myDiv = document.getElementById('gal_minidiv');
  var params = "&subakce=mini" +
               "&gal=" + galId + 
               "&galSizeW=" + galSizeW +
               "&minih=" + galMiniH;

  $("#gal_minidiv").load('/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params, '', 
    function(){
      afterLoadMini();
    }
  );
  /*        
  if (xmlHttp)
  {
    try
    {
      xmlHttp.open('GET', '/galerie/ajax.php?akce=gal_mini&lanG=' + gallang + params, true);
      xmlHttp.onreadystatechange = handleRequestStateChange;
      xmlHttp.send(null);
    }
    catch (e)
    {
      alert("Can't connect to server 2:\n" + e.toString());
    }
  }
  
  setTimeout('loadAfterMiniWait()',100);
  */
  
}
/*
function loadAfterMiniWait(){
  if(document.getElementById('seznam_fotek')){
    afterLoadMini();
  } else {
    setTimeout('loadAfterMiniWait()',100);
  }
}
*/

function afterLoadMini(){
  if(document.getElementById('seznam_fotek')){
    var minuleVpoli = 0;
    var nastavDalsi = 0;
    
    document.getElementById('agal4u' + aktualFoto).focus();
    
    document.getElementById('igal4u' + aktualFoto).style.border = '2px solid white'; // style=\"border: 2px solid black;\"
  
    var sznFoto = document.getElementById('seznam_fotek').innerHTML;
    var sznFotoArr = sznFoto.split(',');
    
    predesleFoto = 0;
    dalsiFoto = 0;
    
    for (i=0;i<sznFotoArr.length;i++){
      
      if(aktualFoto == sznFotoArr[i]){
        predesleFoto = minuleVpoli;
        nastavDalsi = 1;
      } else if (nastavDalsi == 1){
        dalsiFoto = sznFotoArr[i];
        break;
      }
      minuleVpoli = sznFotoArr[i];
    }
    setTimeout('waitLoadPopis()',100);
  }
}

function waitLoadPopis(){
  if(document.getElementById('galIdPopisObr')){
    if(document.getElementById('galIdPopisObr').innerHTML == aktualFoto){

      var widthPop = document.getElementById('gal_popis').offsetWidth;
      var heightPop = document.getElementById('gal_popis').offsetHeight;

      document.getElementById('gal_popis_transparent').style.width = widthPop + 'px';
      document.getElementById('gal_popis_transparent').style.height = heightPop + 'px';
    
    } else {
      setTimeout('waitLoadPopis()',100);
    }
  } else {
    setTimeout('waitLoadPopis()',100);
  }
}

function galPopisClose(){
  document.getElementById('gal_popis').style.display = 'none';
  document.getElementById('gal_popis_transparent').style.display = 'none';
}


function prevFoto(){
  if(predesleFoto > 0){
    showObrGal(predesleFoto);
  }
}

function nextFoto(){
  if(dalsiFoto > 0){
    showObrGal(dalsiFoto);
  }
}

function galPlay(){
  if(dalsiFoto > 0){
    nextFoto();
    casovacPrehravani = setTimeout('galPlay()', 5000);
  } else {
    clearTimeout(casovacPrehravani);
  }
}

function galPlayStop(){
  clearTimeout(casovacPrehravani);
}

function closeGalery(){
  clearTimeout(casovacPrehravani);
  document.getElementById('galery_view').style.display = 'none';
  document.getElementById('galery_view').style.height = '0px';
  document.getElementById('galery_view').style.width = '0px';

  document.getElementById('galery_view_transparent').style.display = 'none';
  document.getElementById('galery_view_transparent').style.height = '0px';
  document.getElementById('galery_view_transparent').style.width = '0px';


  document.getElementById('galery_view').style.innerHTML = '';

  aktualFoto = 0;
  predesleFoto = 0;
  dalsiFoto = 0;
}

function checkKey(evt){

  var charCode = (evt.which) ? evt.which : event.keyCode

  if(charCode == 37){
    prevFoto();
  } else if(charCode == 39){
    nextFoto();
  } else if(charCode == 80){
    galPlay();
  } else if(charCode == 83){
    galPlayStop();
  } else if(charCode == 27){
    closeGalery();
  } 

}






// konec nove galsrie

var neww = false;
function openw(co,okno,jak,nazev){
  var verze = parseInt(navigator.appVersion);
  var wi = 'width=';
  var hi = 'height=';
  var res = 'resizable=';
  var scr = 'scrollbars=';

  if (verze >= 4){

    sirkao = screen.width;
    vyskao = screen.height;

    var sirkaz = co.indexOf('x=') + 2;
    var sirkat = co.substr(sirkaz);
    var sirkak = sirkat.indexOf('&');
    if(sirkak > 0){
      var sirka = sirkat.substr(0, sirkak);
    }
    else{
      var sirka = sirkat;
    }

    var vyskaz = co.indexOf('y=') + 2;
    var vyskat = co.substr(vyskaz);
    var vyskak = vyskat.indexOf('&');

    if(vyskak > 0){
      var vyska = vyskat.substr(0, vyskak);
    }
    else{
      var vyska = vyskat;
    }

    sirka = sirka * 1;
    vyska = vyska * 1;

    if((isNaN(sirka) == true) && (isNaN(vyska) == true)){
      var res2cd1 = co.split('_');
      sirka = res2cd1[1];
      var res2cd2 = res2cd1[2].split('.');
      vyska = res2cd2[0];
    }

//    vyska = (vyska * 1) + 30;

  	if(sirka > sirkao){
  	  wih = sirkao;
      resh = 1;
      scrh = 1;
    }
    else{
      wih = sirka;
      resh = 0;
      scrh = 0;
    }

  	if(vyska > (vyskao - 30)){
  	  hih = vyskao;
      resh = 1;
      scrh = 1;
    }
    else{
      hih = vyska;
      if(scrh == 0){
        resh = 0;
        scrh = 0;
      }
    }

    wih = wih * 1;
    hih = hih * 1;

    if(scrh == 1){
      if((wih + 19) < sirkao){
        wih = wih + 19;
      }
      if((hih + 19) < vyskao){
        hih = hih + 19;
      }
    }

    var odshora = (vyskao - hih) / 2;
    if(odshora < 0){
      odshora = 0;
    }

    odboku = (sirkao - wih) / 2;
    if(odboku < 0){
      odboku = 0;
    }

    jak = wi + wih + ', ' + hi + hih + ', ' + res + resh + ', ' + scr + scrh + ', top=' + odshora + ', left=' + odboku;
  }

  if(neww != false){
	  if (typeof(neww.document) == "object"){
		  neww.window.close();
		}
	}

	neww=window.open('',okno,jak);
	neww.document.write("<html>\n<head>\n");
	neww.document.write("<title>"+nazev+"</title>\n</head>\n");
	neww.document.write("<body style=\"margin: 0;\">\n");
	neww.document.write("<div style=\"width: 100%; position: absolute; top: 40%; left: 0px; text-align: center; z-index: 1;\">Please wait ...</div>\n");
	neww.document.write("<a href=\"javascript:window.close()\" style=\"position: absolute; top: 0px; left: 0px; z-index: 2;\"><img src=\""+co+"\" border=\"0\" alt=\""+nazev+"\"></a>\n");
	neww.document.write("</body>\n");
	neww.document.write("</html>");
}

function prihlaseni(url) {
	var w=370;
	var h=280;
	var windowfeatures='toolbar=no, scrollbars=yes, resizable=yes, menubar=no';
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl;
	win = window.open(url, "prihlaseni", winprops+windowfeatures)
	if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}
}

function regwindow(url){
	var w=600;
	var h=400;
	var windowfeatures='toolbar=0, scrollbars=1, resizable=1, menubar=0';
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl;
	win = window.open(url, "registrace", winprops+windowfeatures)
	if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}
}

function appwindow(url, wu, hu, wname){

	var w;
	var h;

  sirkao = screen.width;
  vyskao = screen.height;

  if(wu >= sirkao){wu = (sirkao - 40)}
  if(hu >= vyskao){hu = (vyskao - 50)}

	if(wu > 0){
    w = wu;
  }
  else{
    w = 600;
  }
	if(hu > 0){
    h = hu;
  }
  else{
    h = 400;
  }

  if(wname == ''){
    wname = 'registrace';
  }

  var windowfeatures='toolbar=0, scrollbars=1, resizable=1, menubar=0';
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl;
	win = window.open(url, "registrace", winprops+windowfeatures)
	if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}
}

function appopen(url){
  if(opener == '[object]'){
    window.open(url);
    window.close();
  }
  else{
    parent.location.href=url;
  }
}

function datetoform(datum, kam){
  window.opener.document.getElementById(kam).value = datum;
  window.close();
}


function confirmLink(theLink, theMsg){
    var is_confirmed = confirm(theMsg);
    if (is_confirmed) {
    }
    return is_confirmed;
}

// obecna kontrole emailu
function as4u_kontrola_emailu(adresa){
  re = /^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,6}$/;
  return adresa.search(re) == 0;
}


// komunita
function komunita_kontrola_reg_formulare(){
  if (document.getElementById('uzivatelske_jmeno').value == ""){
    alert("Musíte si zvolit uživatelské jméno (nickname)!");
    document.getElementById('uzivatelske_jmeno').focus();
    return false;
  } else if (document.getElementById('heslo').value == ""){
    alert("Musíte si zvolit heslo!");
    document.getElementById('heslo').focus();
    return false;
  } else if (document.getElementById('heslok').value != document.getElementById('heslo').value){
    alert("Zadaná hesla jsou rozdílná!");
    document.getElementById('heslo').focus();
    return false;
  } else if (!as4u_kontrola_emailu(document.getElementById('emailreg').value)){
    alert("Zadaný email je neplatný!");
    document.getElementById('emailreg').focus();
    return false;
  } else if (document.getElementById('souhlas_podminek').checked == false){
    alert("S podmínkami musíte souhlasit!");
    document.getElementById('souhlas_podminek').focus();
    return false;
  } else {
    return true;
  }
}



function komunita_kontrola_pis_reg_formulare(){
  if (document.getElementById('uzivatelske_jmeno').value == ""){
    alert("Musíte si zvolit uživatelské jméno (nickname)!");
    document.getElementById('uzivatelske_jmeno').focus();
    return false;
  } else if (document.getElementById('heslo').value == ""){
    alert("Musíte si zvolit heslo!");
    document.getElementById('heslo').focus();
    return false;
  } else if (document.getElementById('heslok').value != document.getElementById('heslo').value){
    alert("Zadaná hesla jsou rozdílná!");
    document.getElementById('heslo').focus();
    return false;
  } else if (document.getElementById('jmeno').value == ""){  
    alert("Musíte zadat jméno!");
    document.getElementById('jmeno').focus();
    return false;
  } else if (document.getElementById('prijmeni').value == ""){
    alert("Musíte zadat příjmení!");
    document.getElementById('prijmeni').focus();
    return false;
  } else if (document.getElementById('ulice').value == ""){
    alert("Musíte zadat ulici!");
    document.getElementById('ulice').focus();
    return false;
  } else if (document.getElementById('cislo_popisne').value == ""){
    alert("Musíte zadat číslo popisné!");
    document.getElementById('cislo_popisne').focus();
    return false;
  } else if (document.getElementById('cislo_popisne').value != parseInt(document.getElementById('cislo_popisne').value)){
    alert("Číslo popisné  není platné!");
    document.getElementById('cislo_popisne').focus();
    return false;
  } else if (document.getElementById('orientacni_cislo').value == ""){
    alert("Musíte zadat orientační číslo!");
    document.getElementById('orientacni_cislo').focus();
    return false;
  } else if (document.getElementById('orientacni_cislo').value != parseInt(document.getElementById('orientacni_cislo').value)){
    alert("Orientační číslo není platné!");
    document.getElementById('orientacni_cislo').focus();
    return false;
  } else if (document.getElementById('mesto').value == ""){
    alert("Musíte zadat město/obec!");
    document.getElementById('mesto').focus();
    return false;
  } else if (document.getElementById('psc').value == ""){
    alert("Musíte zadat PSČ!");
    document.getElementById('psc').focus();
    return false;
  } else if (document.getElementById('psc').value != parseInt(document.getElementById('psc').value) || document.getElementById('psc').value.length != 5){
    alert("PSČ není platné!");
    document.getElementById('psc').focus();
    return false;
  } else if (document.getElementById('telefon').value == ""){
    alert("Musíte zadat telefon!");
    document.getElementById('telefon').focus();
    return false;
  } else if (document.getElementById('telefon').value != parseInt(document.getElementById('telefon').value)){
    alert("telefoní číslo není platné!");
    document.getElementById('telefon').focus();
    return false;
  } else if (!as4u_kontrola_emailu(document.getElementById('emailreg').value)){
    alert("Zadaný email je neplatný!");
    document.getElementById('emailreg').focus();
    return false;
  } else if (document.getElementById('souhlas_podminek').checked == false){
    alert("S podmínkami musíte souhlasit!");
    document.getElementById('souhlas_podminek').focus();
    return false;
  } else {
    return true;
  }
}


function as4ucheckun(as4u_elm_un){

  var uname = document.getElementById(as4u_elm_un).value;
  if(uname != ''){

    myDiv = document.getElementById(as4u_elm_un);

    var params = '&subakce=overeni_jmena_as4u' +
                 '&uname=' + uname;

    if (xmlHttp)
    {
      try
      {
        xmlHttp.open('GET', 'http://' + document.location.host + '/registrace/ajax.php?akce=registrace&lanG=cs' + params, true);
        xmlHttp.onreadystatechange = handleRequestOvereniJmenaAs4u;
        xmlHttp.send(null);
      }
      catch (e)
      {
        alert("Can't connect to server 2:\n" + e.toString());
      }
    }
  }
}

function handleRequestOvereniJmenaAs4u(){
  if (xmlHttp.readyState == 4)
  {
    if (xmlHttp.status == 200)
    {
      try
      {
        handleServerOvereniJmenaAs4u();
      }
      catch(e)
      {
        alert("Error reading the response: " + e.toString());
      }
    }
    else
    {
      alert("There was a problem retrieving the data:\n" + xmlHttp.statusText);
    }
  }
}

function handleServerOvereniJmenaAs4u(){
  var xmlResponse = xmlHttp.responseXML;
  if (!xmlResponse || !xmlResponse.documentElement)
    throw("Invalid XML structure:\n" + xmlHttp.responseText);
  var rootNodeName = xmlResponse.documentElement.nodeName;
  if (rootNodeName == "parsererror")
    throw("Invalid XML structure:\n" + xmlHttp.responseText);
  xmlRoot = xmlResponse.documentElement;

  if (rootNodeName != "response" || !xmlRoot.firstChild)
    throw("Invalid XML structure:\n" + xmlHttp.responseText);

  if(xmlRoot.getElementsByTagName("odp").item(0).firstChild.data != 'OK'){
    alert(xmlRoot.getElementsByTagName("alert").item(0).firstChild.data);
    myDiv.value = "";
    myDiv.focus();
  }


}

// ajaxove okno
function as4uAjaxAlertShow(aaWidth, aaHeight){

  document.getElementById('ajax_transparent').style.display = '';
  document.getElementById('ajax_view').style.display = '';
  as4uAjaxAlertShowSize(aaWidth, aaHeight);

}


function as4uAjaxAlertShowSize(aaWidth, aaHeight){


  if(document.getElementById('ajax_transparent').style.display != 'none'){
    
  	if (window.innerHeight){
      wSizeH = window.innerHeight;
      wSizeW = window.innerWidth;
  	} else if (document.documentElement && document.documentElement.clientHeight){
  		wSizeH = document.documentElement.clientHeight;
  		wSizeW = document.documentElement.clientWidth;
  	} else if (document.body && document.body.clientHeight){
  		wSizeH = document.body.clientHeight;
  		wSizeW = document.body.clientWidth;
    }
    if(wSizeH == 0){
    } else {
      document.getElementById('ajax_transparent').style.height = wSizeH + 'px';
      document.getElementById('ajax_transparent').style.width = wSizeW + 'px';

      ajaxSizeObH = (aaHeight * 1) + 20;
      ajaxSizeObW = (aaWidth * 1);

      document.getElementById('ajax_view').style.height = ajaxSizeObH + 'px';
      document.getElementById('ajax_view').style.width = ajaxSizeObW + 'px';
      document.getElementById('ajax_view_close').style.width = ajaxSizeObW + 'px';

      ajaxSizeH = ajaxSizeObH - 20;
      ajaxSizeW = ajaxSizeObW;

      document.getElementById('ajax_content').style.height = ajaxSizeH + 'px';
      document.getElementById('ajax_content').style.width = ajaxSizeW + 'px';

      posAjaxH = ((wSizeH - ajaxSizeH) / 2);
      posAjaxW = ((wSizeW - ajaxSizeW) / 2);

      if (document.documentElement && document.documentElement.scrollTop) {
        winScroll = document.documentElement.scrollTop;
      } else if (document.body) {
        winScroll = document.body.scrollTop;
      } else {
        winScroll = 0;
      }
      
      document.getElementById('ajax_transparent').style.top = (winScroll) + 'px';
      
      document.getElementById('ajax_view').style.top = (winScroll + posAjaxH) + 'px';
      document.getElementById('ajax_view').style.left = (posAjaxW) + 'px';
      
      setTimeout('as4uAjaxAlertShowSize(' + aaWidth + ', ' + aaHeight + ')', 100);
      
    }
  
  }
}

function closeajax(){

  document.getElementById('ajax_transparent').style.display = 'none';
  document.getElementById('ajax_view').style.display = 'none';

}




// RS
function as4u_rs(){
  if(document.getElementById('redakcni_system')){
    document.getElementById('redakcni_system').style.display = 'none';
  }
}