/* Wiking.js */

var jetzt=new Date(), at=jetzt.getTime(), am=jetzt.getMonth()+1, aj4=jetzt.getYear(), aj=''+aj4;
aj=aj.substr(aj.length-2,2); if (aj4<100) aj4+=2000; if (aj4<1000) aj4+=1900;


function lm() { var t,m,y, hn=top.location.hostname;
  if (top.frames.length!=2 || hn!="www.sv-wiking-kiel.de" && hn!="sv-wiking-kiel.de" && hn!="" && hn!="gk") 
  { if (hn=="") top.location.href="file:///D:/Wiking/Homepage/sx.htm?file:///"+window.location.pathname.substr(1);
    else        top.location.href="http://www.sv-wiking-kiel.de/sx.htm?"+window.location.pathname.substr(1) }

 d = new Date(document.lastModified);
 t=d.getDate(); m=d.getMonth()+1; y=d.getYear(); 
 if  (y<100) y+=2000; if (y<1000) y+=1900;
 document.getElementById("stand").firstChild.nodeValue="Stand: "+((t>9)?"":"0")+t+((m>9)?".":".0")+m+"."+y;
 }

var nextm, tickoff;
function start_ticker() { nextm=0; if (at<tickoff) do_ticker(0) }
function do_ticker(pos)
{  document.getElementById("ticker").firstChild.nodeValue = msg[nextm].substring(0, pos++);
   if(pos<=msg[nextm].length) setTimeout('do_ticker('+pos+')', 50);   
   else { if(++nextm>=msg.length) nextm=0; setTimeout('do_ticker(0)', 5000) }   }

