if(top!=self) top.location=self.location;	// von frames befreien always on top

function mailAfriend() {
var mailsys="mail";
phrompt=prompt;
snarkconf=confirm;
who=phrompt("enter e-mail-address for the recipient (i.e. your friend, etc.): ","name@mailserver.com");
what=phrompt("you might wish to edit the subject line: ","WOW icaPuz has IT !");
if (snarkconf("please confirm the e-mail to "+who+" with the subject line of "+what+"?") == true) {
parent.location.href='mailto:'+who+'?subject='+what+'&body=found one of the best online jigsaw puzzles sites on the web at  http:\/\/www.ica-d.com'+'';
};
};

function hidemail(_m,_s) {
var _d = 'gmx.de';
var _u   = 'rd.ica-d';
var _l   = _u + '@' + _d;
var _m;
var _s;
document.write('<a href=\"mailto:' + _l + '?subject=' + _s + '\">' + _m + '</a>');
};

function payActive()
{
var datum = new Date;
var stunde = datum.getHours();
if  
((stunde>=0 && stunde<10) || (stunde>=10 && stunde<14) || (stunde>=14 && stunde<19) || (stunde>=19 && stunde<=24))
// ((stunde>=0 && stunde<10) || (stunde>=12 && stunde<14) || (stunde>=17 && stunde<19) || (stunde>=22 && stunde<24))
{
return false;
}
else
{
return true;
};
};

function url()
{
var pay=payActive();

if (pay == true) {
document.write('<a href=\"http:\/\/premium-link.net/$23707$0$\/');
}
else {
document.write('<a href=\"http:\/\/www.ica-d.com\/');
};
};

function firstgate()
{
var str = document.referrer;
var pos=str.indexOf('premium-link.net');
if (pos>=0) {
return true;
}
else
{
return false
};
};

var DaysToLive = 7;

function GetCookie(name) {
var cookiecontent = '0';
if(document.cookie.length > 0) {
var cookiename = name + '=';
var cookiebegin = document.cookie.indexOf(cookiename);
var cookieend = 0;
if(cookiebegin > -1) {
cookiebegin += cookiename.length;
cookieend = document.cookie.indexOf(";",cookiebegin);
if(cookieend < cookiebegin) { cookieend = document.cookie.length; };
cookiecontent = document.cookie.substring(cookiebegin,cookieend);
};
};
var value = parseInt(cookiecontent) + 1;
PutCookie(name,value);
return value;
};

function PutCookie(n,v) {
var exp = '';
if(DaysToLive > 0) {
var now = new Date();
then = now.getTime() + (DaysToLive * 24 * 60 * 60 * 1000);
now.setTime(then);
exp = '; expires=' +
now.toGMTString();
}
document.cookie = n + "=" + v + '; path=/' + exp;
}

function Popup(url,w,h,scrX,scrY) {
var attributes = 'location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no' + ',width=' + w + ',height=' + h + ',screenX=' + scrX + ',left=' + scrX + ',screenY=' + scrY + ',top=' + scrY;
window.open(url,"",attributes);
}

var clickAndBuy = firstgate();
if (clickAndBuy == false) {
var visits = GetCookie('weltchronik');
var manyVistis = parseInt((visits-15)/6);
if (visits == 1) { Popup('http://www.ica-d.com/srv/scripts/pu/puWAadstep.htm',468,135,255,325); };
// if (visits == 2) { Popup('http://www.ica-d.com/srv/scripts/pu/puXmas.htm',300,230,320,145); };
// if (visits == 3) { Popup('http://www.ica-d.com/srv/scripts/pu/puWebAdvertsDCHR01.htm',250,300,195,200); };
// if (visits == 4) { Popup('http://www.ica-d.com/srv/scripts/pu/puWA131.htm',131,280,150,170); };
};

function javaOnLoad01() {
// zZt leer
};

function javaOnUnload01() {
// zZt leer
};
