var headermessage="Strona tylko dla dorosłych";
var message="Strona zawiera materiały o charakterze erotycznym przeznaczone wyłącznie dla osób dorosłych. Jeżeli jesteś niepełnoletni/a lub nie chcesz oglądać tego typu materiałów niezwłocznie opuść tę stronę";

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=12;
    expire.setTime(today.getTime() + 3600000*nHours);
    document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString();
}

function DisplayWarningBox() {

document.write("<div id=\"scontentmain\" style=\"position: fixed;top: 0px; left: 0px;width: 100%; height: 100%; background: #f4f4f4; z-index:1000\"><div style=\"width: 600px;margin: 15% auto 0; background: #eee; padding: 10px 10px 20px 10px;border:1px solid #d91571; z-index:1001;font-family: Trebuchet MS;text-align: center;\"><span style=\"font-weight: bold;color: #fff;font-size: 60px;text-shadow: #777 2px 2px;\">Anonsik.pl</span><p style=\"color: #d91571;font-size: 20px;font-weight: bold;margin-top: 5px;\">"+headermessage+"</p><p>"+message+"</p><input class=\"ostrzezenie\" title=\"Kliknij jeśli chcesz wejść\"type=\"button\" value=\"WCHODZĘ\"  name=\"in\" id=\"in\" onclick=\"Agree()\"><a href=\"http://testy-i-wrozby.comoj.com \" title=\"Opuszczam tę stronę\" class=\"ostrzezenie-wy\">WYCHODZĘ</a></div></div>");
	
}
function DisplayFakeBox() {
    document.write("<div id=\"scontentmain\" style=\"display:none;\"></div>");
}
function Agree() {
    SetCookie('scontentmain','scontentmain',2);
    document.getElementById('scontentmain').style.display = 'none';
}

function WarningScroll() {
    document.getElementById('scontentmain').style.top = window.document.body.scrollTop;
}

if(ReadCookie('scontentmain')=='') {
    DisplayWarningBox();
    window.document.body.onscroll = WarningScroll;
} 







var dragapproved=false
var zcor,xcor,ycor

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function movescontentmain(){
if (event.button==1&&dragapproved){
zcor.style.pixelLeft=tempvar1+event.clientX-xcor
zcor.style.pixelTop=tempvar2+event.clientY-ycor
leftpos=document.all.scontentmain.style.pixelLeft-ietruebody().scrollLeft
toppos=document.all.scontentmain.style.pixelTop-ietruebody().scrollTop
return false
}
}



var w=0//ietruebody().clientWidth
var h=0


////Do not edit pass this line///////////
w+=ietruebody().scrollLeft
h+=ietruebody().scrollTop

var leftpos=w
var toppos=h
scontentmain.style.left=w
scontentmain.style.top=h



function staticize(){
w2=ietruebody().scrollLeft+leftpos
h2=ietruebody().scrollTop+toppos
scontentmain.style.left=w2
scontentmain.style.top=h2
}
window.onscroll=staticize
