document.onscroll = fixedEl('help');
document.onscroll = fixedEl('help-male');

function fixedEl(id){
    if(document.all){
        document.all[id].style.pixelTop = document.body.scrollTop + 90;
        // pixelTop je něco jako top v CSS
        // document.body.scrollTop říká, jak moc je to odrolované dolů
        // ta devadesátka je ta samá devadesátka jako ve stylu
    }
}
  
  var detect = navigator.userAgent.toLowerCase();
  var OS,browser,version,thestring;
  
  function checkBrowser() 
  {
    if (checkIt('konqueror')) 
    {
      browser = "Konqueror";
      OS = "Linux";
    }
    else if (checkIt('safari')) browser = "Safari"
    else if (checkIt('omniweb')) browser = "OmniWeb"
    else if (checkIt('opera')) browser = "Opera"
    else if (checkIt('webtv')) browser = "WebTV";
    else if (checkIt('icab')) browser = "iCab"
    else if (checkIt('msie')) browser = "IE" //Internet Explorer
    else if (!checkIt('compatible')) 
    {
      browser = "NN"  //Netscape Navigator
      version = detect.charAt(8);
    }
    else browser = "unknown";  //An unknown browser
    return browser;
  }
  
  function checkBrowserVersion() 
  {
    if (!version) version = detect.charAt(place + thestring.length);
    return version;
  }
  
  function checkOS() 
  {
    if (!OS) 
    {
      if (checkIt('linux')) OS = "Linux";
      else if (checkIt('x11')) OS = "Unix";
      else if (checkIt('mac')) OS = "Mac"
      else if (checkIt('win')) OS = "Windows"
      else OS = "an unknown operating system";
    }
    return OS;
  }

  function checkIt(string) 
  {
    place = detect.indexOf(string) + 1;
    thestring = string;
    return place;
  }
    
  /* zjisti typ prohlizece */
  js_check_prohlizec = checkBrowser();
  
  
  

  function OtevritKalendar(params, form, field, type) {
    window.open("/admin/kalendar.php?" + params, "calendar", "width=180,height=220,status=no");
    dateField = eval("document." + form + "." + field);
    dateType = type;
  }
     
  function VratitDatum(d) {
    txt = d;
      if (window.opener.dateType != 'date') {
        // need to get time
        h = parseInt(document.getElementById('hour').value,10);
        m = parseInt(document.getElementById('minute').value,10);
        s = parseInt(document.getElementById('second').value,10);
          if (window.opener.dateType == 'datetime') {
            txt += ' ' + formatNum2(h, 'hour') + ':' + formatNum2(m, 'minute') + ':' + formatNum2(s, 'second');
          }else{
            // timestamp
             txt += formatNum2(h, 'hour') + formatNum2(m, 'minute') + formatNum2(s, 'second');
          }
      }
  
      window.opener.dateField.value = txt;
      window.close();
  }

  function update_obrazek(image,cesta){
    document.obrazek.src = "/_images/"+ cesta +"/" + image;
  }

  function odesilase()
  {
    var odeslat = document.getElementById('id_odeslat');
  //  var odesilase = document.getElementById('id_odesilase');
    
    odeslat.value="Odesílám...";
    odeslat.disabled=true;
    // odeslat.style.background="#bbbbbb"; // z windows xp tlacitka se stane windows 98 tlacitko a to nechceme
  /*  
    if (odesilase.value != 1)
    {
      odesilase.value=1;
      return true;
    }
    else
    {
      return false;
    }*/
  } 
  
/*

  function antispam_mail(){
    isIE = (document.all) ? true:false;
    if(isIE){
      oldBodyText = document.body.innerHTML;
      newBodyText = oldBodyText.replace(/ \[zavinac\] /gi,'@');
      newBodyText = newBodyText.replace(/ \[tecka\] /gi,'.');
      newBodyText = newBodyText.replace(/ \[pomlcka\] /gi,'-');
      document.body.innerHTML = newBodyText;
    } else {
      a = document.getElementsByTagName('a');
      for(i=0; i < a.length; i++){
        a[i].innerHTML = a[i].innerHTML.replace(/ \[zavinac\] /gi,'@');
        a[i].innerHTML = a[i].innerHTML.replace(/ \[tecka\] /gi,'.');
        a[i].innerHTML = a[i].innerHTML.replace(/ \[pomlcka\] /gi,'-');
        a[i].href = a[i].getAttribute('href').replace(/ \[zavinac\] /gi,'@');
        a[i].href = a[i].getAttribute('href').replace(/ \[tecka\] /gi,'.');
        a[i].href = a[i].getAttribute('href').replace(/ \[pomlcka\] /gi,'-');
      }
    }
  }
  
  window.onload = function(){
    antispam_mail()
  };

*/

