function scroller(seed){   
     var msg ="100% KÖNIGSBLAU - CASTROP-RAUXEL....DATTELN....DORSTEN....GLADBECK....HALTERN AM SEE....HERTEN....MARL....OER-ERKENSCHWICK....RECKLINGHAUSEN....WALTROP"; 
     var out = "";
     var c   = 1;   
     if (seed > 100) {seed--; var cmd="scroller(" + seed + ")"; timerTwo=window.setTimeout(cmd,100);
     } 
else if (seed <= 100 && seed > 0) { for (c=0 ; c < seed ;  c++) {out+=" "; }            
       out+=msg; seed--; var cmd="scroller(" + seed + ")"; 
       window.status=out;  timerTwo=window.setTimeout(cmd,100); }
else if (seed <= 0) { if (-seed < msg.length) { 
        out+=msg.substring(-seed,msg.length); seed--; 
        var cmd="scroller(" + seed + ")";  window.status=out;      
        timerTwo=window.setTimeout(cmd,100); }
        else {  window.status=" "; timerTwo=window.setTimeout("scroller(100)",75); }}}

function InsertMail(mailname,mailserver,maildomaene,text)
{
  if(text=="")
    document.write('<a href="mailto:'+mailname+'@'+mailserver+'.'+maildomaene+'">'+mailname+'@'+mailserver+'.'+maildomaene+'</a>');
  else
    document.write('<a href="mailto:'+mailname+'@'+mailserver+'.'+maildomaene+'">'+text+'</a>');
}



// Geburtstagsliste

function displayBdayList(){
var date = new Date().getDate();
var bdayList = getBdaysThisWeek();
var len = bdayList.length;
var s = " GEBURTSTAGE & WICHTIGE EREIGNISSE ";
if (len>0){
s += '<ul>';
for (var i=0; i<len; i++){
//be mindful of the string-line continuation character (\) at the end of the first line
s += '<li' + ((date == bdayList[i].bday.getDate())?' class="bdayToday"':'')+ '>\
<strong>' + bdayList[i].name + '</strong> - '
+ '(' + bdayList[i].bday.getDate() + '. ' + bdayList[i].month + ')' +'</li>';
}
s += '</ul>';
}
else{
s += " Keine.";
}
document.write(s);
}


function getBdaysThisWeek(){
var arrMonth = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
var bday, idx;
var bdayList = new Array();
var today = new Date();

for (var i=0;i<arrBday.length;i++){
var bday = new Date(arrBday[i][1] + '/' + today.getFullYear());
if (isNaN(bday)) continue;

if ( isBdayInRange(bday, 7) ){
idx = bdayList.length;
bdayList[idx] = new Object();
bdayList[idx].name = arrBday[i][0];
bdayList[idx].bday = bday;
bdayList[idx].month = arrMonth[bday.getMonth()];
}
}
if (bdayList.length > 0){ //sort asc by birthdate
bdayList.sort(
function(a, b){
if (a.bday < b.bday) return -1
if (a.bday > b.bday) return 1;
return 0;
}
);
}
return bdayList;
}

function isBdayInRange(bday, interval){
//credit for this function goes to:
//-Rob (@slingfive) Eberhardt, Slingshot Solutions
//http://slingfive.com/pages/code/jsDate/jsDate.html

var today = new Date();
//have to override time so entire day will be valid
today.setHours(0,0,0,0);
//if the birthday has already occurred in the year, increment to the next year
if (bday < today)
bday.setFullYear(bday.getFullYear() + 1);

// get ms between dates (UTC) and make into "difference" date
var iDiffMS = bday.valueOf() - today.valueOf();
//divide iDiffMS by 1000, Seconds, Minutes, Hours
nDays = parseInt(iDiffMS / 1000 / 60 / 60 / 24);

if(parseInt(nDays) <= parseInt(interval))
return true;
else
return false;
}