  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'] = 'Serwis zawiera tresci erotyczne. Aby przejsc dalej trzeba miec ukonczone 18 lat. <br>Jesli nie masz ukonczonych 18 lat jak najszybciej opusc nasza strone!';
      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 DLA DOROSLYCH';
      txt['pl-iso']['warning'] = 'Serwis zawiera tresci erotyczne. Aby przejsc dalej trzeba miec ukonczone 18 lat. Jesli nie masz ukonczonych 18 lat jak najszybciej opusc nasza strone!'; 
      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:100%;height:150%; background-color: black; filter: alpha(opacity=80); -moz-opacity: 0.8; opacity: 0.8;"><table width="100%" height="100%"><tr><td align="center" valign="middle">';
     o += '<table style=" background-color: black; width:100%; height:100%; ">';
      o += '<tr><td valign="top" align="center" style="padding-top:120px;">';
      o += '<span style="font-size:35px; color:#AF2052; 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:#AF2052;">'+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();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
  }
  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));
  }


