  function	adultWarning_resizer()
  {
    var dv = document.getElementById('warning');
    dv.style.top = document.body.scrollTop;
    dv.style.width = document.body.clientWidth;
    dv.style.height = document.body.clientHeight;
  }
  function	adultWarning(lng)
  {
    window.onresize = adultWarning_resizer;
    window.onscroll = adultWarning_resizer;
    var txt = [];
      txt['pl-utf8'] = [];
      txt['pl-utf8']['for_adults'] = 'STRONA TYLKO DLA DOROSLYCH';
      txt['pl-utf8']['warning'] = 'UWAGA! TA STRONA ZAWIERA TRESCI EROTYCZNE!<br>Jesli nie ukonczyles 18-go roku zycia, nie chcesz ogladac tego typu tresci lub jest to niezgodne z prawem twojego kraju, nie wolno Ci wchodzic dalej!';
      txt['pl-utf8']['mam18'] = 'Mam ukonczone 18 lat. Nie pokazuj mi wiecej tego ostrzezenia.';
      txt['pl-utf8']['entry'] = '>> WEJDZ NA STRONE <<';
      txt['pl-utf8']['please_confirm'] = 'Potwierdz swoja pelnoletniosc! ( zaznacz kwadracik )';

      txt['pl-iso'] = [];
      txt['pl-iso']['for_adults'] = 'STRONA TYLKO DLA DOROSLYCH';
      txt['pl-iso']['warning'] = 'UWAGA! TA STRONA ZAWIERA TRESCI EROTYCZNE!<br>Jesli nie ukonczyles 18-go roku zycia, nie chcesz ogladac tego typu tresci lub jest to niezgodne z prawem twojego kraju, nie wolno Ci wchodzic dalej!';
      txt['pl-iso']['mam18'] = 'Mam ukonczone 18 lat. Nie pokazuj mi wiecej tego ostrzezenia.';
      txt['pl-iso']['please_confirm'] = 'Potwierdz swoja pelnoletniosc! ( zaznacz kwadracik )';
      txt['pl-iso']['entry'] = unescape('>> WEJDZ NA STRONE <<');

      txt['en'] = [];
      txt['en']['for_adults'] = 'SEXUAL CONTENT WARNING';
      txt['en']['warning'] = 'This Website contains explicit sexual material which may be offensive to some viewers. You must be 18 years or older to enter this Website. By going beyond this point, you acknowledge that you are 18 years or older.';
      txt['en']['mam18'] = "I'am over 18. Don't show me this page again.";
      txt['en']['please_confirm'] = 'Please confirm your majority';
      txt['en']['entry'] = 'ENTRY';

    var o = '<div id="warning" style="position:absolute;top:0px;left:0px;width:'+document.body.clientWidth+';height:'+document.body.clientHeight+';background-color:#ffffff;"><table width="100%" height="100%"><tr><td align="center" valign="middle">';
     o += '<table style="width:1100px; height:4000px; border:1px solid #cccccc; background-color:#f5f5f5;">';
      o += '<tr><td valign="top" align="center" style="padding-top:120px;">';
      o += '<span style="font-size:36px; color:#ff0000; font-family:impact,arial;">'+txt[lng]['for_adults']+'</span>';
      o += '<div align="center" style="margin-top: 32px; margin-bottom: 32px; width:370px;border:1px dotted #f1f1f1;font-family:arial; font-size:14px; font-weight:bold; font-family:arial;">'+txt[lng]['warning']+'</div>';
      o += '<input type=checkbox id="warningBox"> <a href="#" onclick="document.getElementById(\'warningBox\').checked ^= 1; return false;" style="font-family:tahoma;font-size:12px; font-weight:bold;">'+txt[lng]['mam18']+'</a>';
      o += '<div style="margin-top:32px;"><a href="#" onclick="adultWarning_letMeIn(\''+txt[lng]['please_confirm']+'\'); return false;" style="text-decoration:underline; font-size:32px; font-family:impact, arial; font-weight:bold; color:#ff0000;">'+txt[lng]['entry']+'</a></div>';
      o += '</td></tr>';
      o += '</table>';
     o += '</td></tr></table></div>';
      document.write(o);
  }
  function	adultWarning_letMeIn(not_checked)
  {
    if(document.getElementById('warningBox').checked)
    {
      adultWarning_setCookie('adultPerson', 1, 1);
      document.getElementById('warning').style.visibility = 'hidden';
      window.onresize = null;
      window.onscroll = null;
    }
    else alert(not_checked);
  }
  function	adultWarning_setCookie(cookieName,cookieValue,nDays)
  {
    var today = new Date();
    var expire = new Date();
    var d = document.location.href.split('/');
    d = d[2].split('.');
    d = d[d.length-2]+'.'+d[d.length-1];
    if (nDays==null || nDays==0) nDays=1;
    expire.setTime(today.getTime() + 3600000*24*nDays);
    document.cookie = cookieName+"="+escape(cookieValue)
                    + ";path=/;expires="+expire.toGMTString()+";domain="+d;
  }
  function	adultWarning_getCookie(name)
  {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
  }
