function GetCookie() {
 now = new Date();
 var value = now.toGMTString();
 if(document.cookie) {
    var start = document.cookie.indexOf("=") + 1;
    var end = document.cookie.indexOf(";");
    if (end == -1)
      end = document.cookie.length;
    value = document.cookie.substring(start,end);
 }
 else {
  value = SetCookie(2);
 }
 return value;
}

function SetCookie(mins) {

 var now = new Date();
 var expires = new Date(now.getTime() + 24*60*60*1000);
 var ttime = new Date(now.getTime() + mins*60*1000);
 document.cookie = "ttime=" + ttime.toGMTString() + "; expires="+expires.toGMTString()+";";
 return ttime.toGMTString();
}

function CheckTime() {
 var now = new Date();
 var nowtime = now.getTime();
 var ttime = Date.parse(GetCookie());

 if(nowtime > ttime) {

   win=window.open("popunder.html", "Sicher_Stark_Team", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes,width=620,height=520,left=20,top=20");
   win.blur();
   window.focus();

   window.open("spendenaufruf.html", "_blank");

   SetCookie(24*60);
 }
}
