function getCookie(name){
var prefix = name + "="
var cookieStartIndex = document.cookie.indexOf(prefix)
if (cookieStartIndex == -1)
return null
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
if (cookieEndIndex == -1)
cookieEndIndex = document.cookie.length
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
function setCookie(name, value, expires, path, domain, secure){
var curCookie = name + "=" + escape(value) +
 ((expires) ? "; expires=" + expires.toGMTString() : "") +
 ((path) ? "; path=" + path : "") +
 ((domain) ? "; domain=" + domain : "") +
 ((secure) ? "; secure" : "")
 if (!caution || (name + "=" + escape(value)).length <= 4000)
 document.cookie = curCookie
 else
 if (confirm("Cookie > 4KB!"))
document.cookie = curCookie
}
function fixDate(date){
var base = new Date(0);
var skew = base.getTime();
if (skew > 0)
 date.setTime(date.getTime() - skew)
}
function Kpw(){
caution=false;Bpin=0;now=new Date();fixDate(now);now.setTime(now.getTime()+30*86400000);KndPin=getCookie("_KndPin");
if (KndPin == null) {KndPin = "";}
document.passwd.userid.value=KndPin;
}
function KndID(){
KndPin=document.passwd.userid.value;caution=false;now=new Date();fixDate(now);now.setTime(now.getTime()+30*86400000);UpAdr="upload";StatAdr="stat";
if (KndPin == null) {KndPin = ""};
if (KndPin > 0) {setCookie("_KndPin",KndPin,now);var LinkAdd = now.getTime();top.location = "http://www.alles-in-druck.de/proof/p" + KndPin + ".htm?" + LinkAdd + "_" + KndPin;}
else if (LEFT$(KndPin,1) == "b"){top.location = "http://www.alles-in-druck.de/kndneu.htm?" + KndPin;}
else if (LEFT$(KndPin,1) == "B"){top.location = "http://www.alles-in-druck.de/kndneu.htm?" + KndPin;}
else if (KndPin == ""){top.location = "http://www.alles-in-druck.com";}
else if (KndPin == UpAdr){top.location = "http://www.alles-in-druck.de/upload/srv.htm?" + KndPin + ".php";}
else if (KndPin == StatAdr){top.location = "http://fc.webmasterpro.de/stat.php?name=druckexpert";}
else {setCookie("_TmpPin",KndPin,now);var LinkAdd = now.getTime();top.location = "http://www.alles-in-druck.com?" + KndPin + LinkAdd;}
}
function LEFT$(text,num) {return text.substring(0,num);}
function LinkPin(){
caution=false;KndPin=0;pin=0;now=new Date();fixDate(now);now.setTime(now.getTime()+30*86400000);UpAdr="upload";StatAdr="stat";PromAdr="hallo";KndPin=getCookie("_KndPin");
if (KndPin == null) {KndPin = "";}
var KndPin=window.prompt("Bitte persönlichen 'Status/Zugang' eingeben:",KndPin);
if (KndPin > 0) {setCookie("_KndPin",KndPin,now);var LinkAdd = now.getTime();top.location = "http://www.alles-in-druck.de/proof/p" + KndPin + ".htm?" + LinkAdd + "_" + KndPin;}
else if (KndPin == UpAdr){top.location = "http://www.alles-in-druck.de/upload/srv.htm?" + KndPin + ".php";}
else if (KndPin == StatAdr){top.location = "http://fc.webmasterpro.de/stat.php?name=druckexpert";}
else {setCookie("_TmpPin",KndPin,now);var LinkAdd = now.getTime();top.location = "http://www.alles-in-druck.com?" + KndPin + LinkAdd;}
}
function AdvTrck(){
caution=false;now=new Date();hrs=now.getHours();mrs=now.getMinutes();fixDate(now);now.setTime(now.getTime()+3600000);
var table_of_contents = "www.alles-in-druck.de/";
content=(location.search) ? location.search.substring(1, location.search.length) : table_of_contents;
content=content + "." + window.location.host + "?" + hrs + "." + mrs; setCookie("_Trck",content,now);
}
