﻿// JavaScript Adult Warning
function adultWarning(lng)
{
document.write('<div id="pre_warning" style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#000000;position: fixed;_position: absolute;_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);filter:alpha(opacity=85);opacity: 0.85;-moz-opacity:0.85; z-index:1;"></div><div id="warning" style="position:absolute;top:0px;left:0px;width:100%;height:100%;position: fixed;_position: absolute;_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);filter:alpha(opacity=100);opacity: 1.0;-moz-opacity:1.0; z-index:2"><table width="100%" height="100%"><tr><td align="center" valign="middle"><table style="width:640px; height:360px; border:2px solid #FF0000; background-color:#000000"><tr><td align="center"><b><font style="font-size: 24pt; color: #FF9900"><img border="1" src="http://amorki.org/od_18_lat.jpg" width="240" height="320" align="left"></font><br><font style="font-size: 24pt; " color="#FF0000"><br>Tylko dla dorosłych!</font></b><br /><br />	<font color="#FFFFFF">Kochanie jeśli chcesz wejść na forum amorków<br>musisz mieć skończone 18 lat. Strona zawiera<br>materiały i treści o tematyce erotycznej.</font><p><br /><input type=checkbox id="warningBox"> <a class="zobacz_film" href="#" onclick="document.getElementById(\'warningBox\').checked ^= 1; return false;">Potwierdzam mam ukończone 18 lat.</a><a href="#" onclick="adultWarning_letMeIn(\'Potwierdź swoją pełnoletniość! Na pewno masz 18 lat ?\'); return false;"><br /><br /><font style="font-size: 18pt;"><b>Wchodzę</b></font></a><br><br><a href="http://www.google.pl">wychodzę, bo nie mam skoczonych 18 lat</a></td></tr></table></td></tr></table></div>');
}
function adultWarning_letMeIn(not_checked)
{
if(document.getElementById('warningBox').checked)
{
adultWarning_setCookie('adultPerson', 1, 1);
document.getElementById('warning').style.visibility = 'hidden';
document.getElementById('pre_warning').style.visibility = 'hidden';
}
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));
}
