function ReadCookie(cookieName) {
    var theCookie=""+document.cookie;
    var ind=theCookie.indexOf(cookieName);
    if (ind==-1 || cookieName=="") return "";
    var ind1=theCookie.indexOf(';',ind);
    if (ind1==-1) ind1=theCookie.length;
    return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function SetCookie(cookieName,cookieValue,nHours) {
    var today = new Date();
    var expire = new Date();
    if (nHours==null || nHours==0) nHours=2;
    expire.setTime(today.getTime() + 3600000*nHours);
    document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
}

function DisplayWarningBox() {

    var top = 100;
    var left = screen.width/2-300;

    document.write("<div id=\"70m1k\" style=\"position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background: #FFFFFF; z-index:1000\"><div style=\"position:absolute; top: " + top + "px; left: " + left + "px; width: 600px; background: #FFB6C1; padding: 20px;border:2px solid #990000; z-index:1001;\"><p align=center><font face=\"Verdana\" size=\"5\" color=\"#990000\"><b>OSTRZEZENIE</b></font><br><br><font face=\"Verdana\" color=\"#990000\"><b>SERWIS ZAWIERA TRESCI O TEMATYCE EROTYCZNEJ.<br> JESLI NIE UKONCZYLES 18 ROKU ZYCIA, NIE CHCESZ OGLADAC TEGO TYPU TRESCI LUB JEST TO NIEZGODNE Z PRAWEM TWOJEGO KRAJU, NIE WOLNO CI WCHODZIC DALEJ</b></font><br><br><br><input type=\"button\" value=\"WCHODZE\" style=\"width:200px\" name=\"in\" id=\"in\" onclick=\"Agree()\">&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\"REZYGNUJE\" style=\"width:200px\" name=\"out\" id=\"out\" onclick=\"location.href='http://www.kidprotect.pl/'\"></p></div></div>");
}
function DisplayFakeBox() {
    document.write("<div id=\"70m1k\" style=\"display:none;\"></div>");
}
function Agree() {
    SetCookie('70m1k','70m1k',2);
    document.getElementById('70m1k').style.display = 'none';
}

function WarningScroll() {
    document.getElementById('70m1k').style.top = window.document.body.scrollTop;
}

if(ReadCookie('70m1k')=='') {
    DisplayWarningBox();
    window.document.body.onscroll = WarningScroll;
} 




