<script language="JavaScript">
<!-- Hide the script from old browsers --
/* This code is compliments of Kurt's JavaScript Archive.
It can be found at
http://www.andersonhouse.com/jsarchive/.
For more info e-mail jsarchive\@andersonhouse.com.
---------
This JavaScript may be used and modified freely, so long
as this message and the comments above remain intact.
And of course, a return link wouldn't hurt either!
*/
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
// This cookie is history
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var expDays = 30;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function name(n){
if(n != null) {
var name = name
}
else if(GetCookie('name') != null) {
var name = GetCookie('name')
}
else {
var name = prompt("Wie ist Dein Name?",'');
if(name == null || name == "") {
name = "web surfer"
}
else {
SetCookie('name',name,exp);
}
}
return name;
}
function time() {
var days = new Array(7)
days[1] = "Sonntag";
days[2] = "Montag";
days[3] = "Dienstag";
days[4] = "Mittwoch";
days[5] = "Donnerstag ,";
days[6] = "Freitag";
days[7] = "Samstag";
var months = new Array(12)
months[1] = "Januar";
months[2] = "Februar";
months[3] = "März";
months[4] = "April";
months[5] = "Mai";
months[6] = "Juni";
months[7] = "Juli";
months[8] = "August";
months[9] = "September";
months[10] = "Oktober";
months[11] = "November";
months[12] = "Dezember";
var today = new Date()
var day = days[today.getDay() + 1]
var month = months[today.getMonth() + 1]
var date = today.getDate()
var year = today.getYear()
var full = day + ", dem " + date + ". " + month + " " + year
if(GetCookie('date') != null) {
var savedate = GetCookie('date')
DeleteCookie('date')
SetCookie('date',full,exp)
return savedate
}
else {
SetCookie('date',full,exp)
return null
}
}
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 0
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function print(what) {
if(what == "name") {
return name()
}
else if(what == "date") {
if(time() == null) {
return "[Du warst noch nie hier!!]"
}
else {
return time()
}
}
else if(what == "times") {
return amt()
}
}
function process(how) {
if(how == 'newname') {
SetCookie('name',prompt('Wie ist Dein Name?',''))
location.reload()
}
else if(how == 'newprofile') {
DeleteCookie('name')
DeleteCookie('count')
DeleteCookie('date')
location.reload()
}
}
// --End Hiding Here -->
</script>