
// ----------------------------------------------------------------------------------------------------
//  Eyes
// ----------------------------------------------------------------------------------------------------

var brOK=false;
var mie=false;
var ex=0;
var ey=0;
var ae;
var le;
var re;
var x0;
var y0;
var tid;
var realx;
var realy;
var loaded=false;
if(parseInt(navigator.appVersion.charAt(0))>=4)
  {brOK=true;}
if(navigator.appName.indexOf("Microsoft")!=-1)
  {mie=true; }
function myhandler(e)
{ex=e.pageX; 
 ey=e.pageY;
 moveeye()
 return routeEvent(e);
}

function moveeye()
{dy=ey-y0-20;
 dx1=ex-x0-20;
 dx2=ex-x0-60;

 r=Math.sqrt(dx1*dx1+dy*dy);
 if(r<20) r=20
 dx1=dx1*10/r+x0+10;
 dy1=dy*10/r+y0+10;

 r=Math.sqrt(dx2*dx2+dy*dy);
 if(r<20) r=20
 dx2=dx2*10/r+x0+50;

 ae.left=x0;  
 ae.top=y0;  
 le.left=dx1;  
 le.top=dy1;  
 re.left=dx2;  
 re.top=dy1;  
}


function setHandlers()
{if(!mie)   {y0=document.eyeballs.top;
             x0=document.eyeballs.left;
             ae=document.eyeballs;
             le=document.lefteye;   
             re=document.righteye;   
             window.captureEvents(Event.MOUSEMOVE);
             window.onMouseMove=myhandler;
            }
 else       {y0=document.all.eyeballs.style.pixelTop;
             x0=document.all.eyeballs.style.pixelLeft;
             ae=document.all.eyeballs.style;
             le=document.all.lefteye.style;
             re=document.all.righteye.style;
            }
 realx=x0+0.1;
 realy=y0+0.1;
 
 moveall();
 loaded=true;
}

function moveall()
{rx=realx+40
 ry=realy+40;
 rx+=(ex-rx)*0.1;
 ry+=(ey-ry)*0.1;
 realx=rx-40;
 realy=ry-40;
 x0=Math.round(realx);
 y0=Math.round(realy);
 moveeye();
 tid=setTimeout('moveall()',100);
}

function placeeyes(x,y)
{if(brOK)
 {ex=x+40;
  ey=y+40;
  s ='<DIV ID="dummy"    STYLE="position:absolute; top:'+y+'; left:'+x+'; width:10; height:10;">&nbsp;</DIV>';
  s+='<DIV ID="eyeballs" STYLE="position:absolute; top:'+y+'; left:'+x+'; width:80; height:40;"  ><IMG SRC="images/eyeballs.gif"  border=0></DIV>';
  s+='<DIV ID="lefteye"  STYLE="position:absolute; top:'+(y+10)+'; left:'+(x+10)+'; width:20; height:20;"  ><IMG SRC="images/eye.gif" border=0></DIV>';
  s+='<DIV ID="righteye" STYLE="position:absolute; top:'+(y+10)+'; left:'+(x+50)+'; width:20; height:20;"  ><IMG SRC="images/eye.gif" border=0></DIV>';
  document.writeln(s);
 }
}


// ----------------------------------------------------------------------------------------------------
//  Datum auf home
// ----------------------------------------------------------------------------------------------------

Monatsname =
 new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
function ZeitAnzeigen() 
{ 
 var Jetzt = new Date();
 var Tag = Jetzt.getDate();
 var Monat = Jetzt.getMonth() + 1;
 var Jahr = Jetzt.getYear();
 var Stunden = Jetzt.getHours();
 var Minuten = Jetzt.getMinutes();
 var Sekunden = Jetzt.getSeconds();
 var WoTag = Jetzt.getDay();
 var Vortag  = ((Tag < 10) ? "0" : "");
 var Vormon  = ((Monat < 10) ? ".0" : ".");
 var Vorstd  = ((Stunden < 10) ? "0" : "");
 var Vormin  = ((Minuten < 10) ? ":0" : ":");
 var Vorsek  = ((Sekunden < 10) ? ":0" : ":");
 var Datum = Vortag + Tag + Vormon + Monat  + "." + Jahr;
 var Uhrzeit = Vorstd + Stunden + Vormin + Minuten + Vorsek + Sekunden;
 var Gesamt = Vortag  + Tag  + "." +" "+ Monatsname[Monat-1] + " 19" + Jahr;

 if(document.all)
   document.all.MicrosoftUhr.innerHTML = Gesamt;
 else if(document.layers)
  {
   document.NetscapeUhr.document.open();
   Gesamt = '<span class="Uhr")>' + Gesamt + '</span>';
   document.NetscapeUhr.document.write(Gesamt);
   document.NetscapeUhr.document.close();
  }

 window.setTimeout("ZeitAnzeigen()",1000);
}

// ----------------------------------------------------------------------------------------------------
//  Lauftext
// ----------------------------------------------------------------------------------------------------


var Text = "Willkommen auf der Homepage von Jürgen W. Wortmann!";  
    var Geschwindigkeit = 50;   
    var Breite = 100;            
    var TextLaenge = Text.length; 
    var Position = 1 - Breite;   

    function StatusLauftext()    
    {
    Position++;
    var Textzustand="";
    if (Position == TextLaenge) 
    {
    Position = 1 - Breite;
    }
    if (Position < 0) 
    {
    for (var Zaehler=1; Zaehler <= Math.abs(Position); Zaehler++) 
    {
    Textzustand = Textzustand + " ";
    };
    Textzustand = Textzustand + Text.substring(0, Breite - Zaehler + 1);
    }
    else 
    {
    Textzustand = Textzustand + Text.substring(Position, Breite + Position);
    }
    window.status = Textzustand;
    setTimeout("StatusLauftext()",Geschwindigkeit);
    }


// ----------------------------------------------------------------------------------------------------
// Mailing an Author, manuell
// ----------------------------------------------------------------------------------------------------

var startTime = new Date();
startTime = startTime.getTime();
var submissions = 0;

function checkForDuplicate() {
 if (document.form1) {
  document.form1.REFERRER.value = document.referrer;
  document.form1.PLATFORM.value = navigator.appName
   + " " + navigator.appVersion;
  submissions++;
  if (submissions > 1)
   return false;
  else
   return true;
 } else {
  return false;
 }
} 

function doneLoading() {
 var stopTime = new Date();
 stopTime = stopTime.getTime();
 document.form1.LOADING_TIME.value = ((stopTime - startTime) / 1000)
  + " seconds";
 document.form1.PAGE.value = document.title;
 document.form1.SUBMITTER.click(); 
}

// ----------------------------------------------------------------------------------------------------
// Countdown-Zähler mit Uhr und Datum
// ----------------------------------------------------------------------------------------------------

var timerID = null
  var timerRunning = false
  function MakeArray(size) 
  {
  this.length = size;
  for(var i = 1; i <= size; i++)
  {
  this[i] = "";
  }
  return this;
  }
  function stopclock (){
  if(timerRunning)
  clearTimeout(timerID);
  timerRunning = false
  }
  function showtime () {
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var hours = now.getHours();
  var minutes = now.getMinutes();
  var seconds = now.getSeconds();
  var day = now.getDay();
  Day = new MakeArray(7);
  Day[0]="Sonntag";
  Day[1]="Montag";
  Day[2]="Dienstag";
  Day[3]="Mittwoch";
  Day[4]="Donnerstag";
  Day[5]="Freitag";
  Day[6]="Samstag";
  var timeValue = "";
  timeValue += (Day[day]) + "   ";
  timeValue += date + "-";
  timeValue += ((month < 10) ? " 0" : "") + month + "-";
  timeValue += year + "    ";
  //timeValue += ((month < 10) ? " 0" : " ") + month + "-"; us-version
  //timeValue += date + "-" + year + "    "; us-version
  timeValue += ((hours <= 12) ? hours : hours - 12);
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  timeValue += (hours < 12) ? " AM" : " PM";
  document.jsfrm.face.value = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
  }
  function startclock () {
  stopclock();
  showtime()
  }
var eventdate = new Date("january 1, 2001");
function toSt(n) {
  s=""
  if(n<10) s+="0"
  return s+n.toString();
}
function countdown() {
  cl=document.clock;
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
    {cl.days.value ="----";
     cl.hours.value="--";
     cl.mins.value="--";
     cl.secs.value="--";
     return;
   }
  cl.secs.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.mins.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.hours.value=toSt(count%24);
  count=Math.floor(count/24);
  cl.days.value=count;    
  setTimeout("countdown()",1000);
}



// ----------------------------------------------------------------------------------------------------
// Navigator mit unterschiedlichen buttons 
// ----------------------------------------------------------------------------------------------------

 if (document.images)
{
item1on = new Image();
item1on.src = "images/blue_poi.gif";
item1off = new Image();
item1off.src = "images/red_poi.gif";
item2on = new Image();
item2on.src = "images/blue_poi.gif";
item2off = new Image();
item2off.src = "images/red_poi.gif";
item3on = new Image();
item3on.src = "images/blue_poi.gif";
item3off = new Image();
item3off.src = "images/red_poi.gif";
item4on = new Image();
item4on.src = "images/blue_poi.gif";
item4off = new Image();
item4off.src = "images/red_poi.gif";
item5on = new Image();
item5on.src = "images/blue_poi.gif";
item5off = new Image();	
item5off.src = "images/red_poi.gif";
item6on = new Image();
item6on.src = "images/blue_poi.gif";
item6off = new Image();
item6off.src = "images/red_poi.gif";
item7on = new Image();
item7on.src = "images/blue_poi.gif";
item7off = new Image();
item7off.src = "images/red_poi.gif";
item8on = new Image();
item8on.src = "images/blue_poi.gif";
item8off = new Image();
item8off.src = "images/red_poi.gif";
}
function img_act(imgName)
 {
if (document.images)
 {
imgOn = eval(imgName + "on.src");
document [imgName].src = imgOn;
 }
}
function img_inact(imgName)
 {
if (document.images)
 {
imgOff = eval(imgName + "off.src");
document [imgName].src = imgOff;
 }
}

// ----------------------------------------------------------------------------------------------------
//  automatisches Öffnen eines weiteren Fensters
// ----------------------------------------------------------------------------------------------------

// window.open("2000.htm","","toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,width=400,height=200");

// ----------------------------------------------------------------------------------------------------
// Öffnen eines weiteren Fensters über Grafik
// ----------------------------------------------------------------------------------------------------
  
    function link()
    {
    window.open('links.htm','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,copyhistory=1,width=700,height=400');
    }

    function suchen()
    {
    window.open('suchen.htm', '', 'toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,copyhistory=1,width=600,height=300');
    }

    function check()
    {
    window.open('tng_ch.htm','','toolbar=0,resizable=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,toolbars=0,width=650,height=430');
    }

    function c_down()
    {
    window.open('c_down.htm','','toolbar=0,resizable=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,toolbars=0,width=500,height=300');
    }
    
    function schwalmtal()
    {
    window.open('http://www.schwalmtal.de/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function milchenbach()
    {
    window.open('http://home.t-online.de/home/Ralf-Wortmann/schutzv.htm','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function langenei()
    {
    window.open('http://www.myweb.de/lakischuetzen','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function borussia()
    {
    window.open('http://www.sport1.de/gladbach/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function mitflugzentrale()
    {
    window.open('http://www.mitflugzentrale.de','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function star_trek()
    {
    window.open('http://www.geocities.com/Area51/Rampart/5217/index2.html','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function flug()
    {
    window.open('http://www.airres.com/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function olper_netz()
    {
    window.open('http://www.oenet.de/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function Moto_laverda_italien()
    {
    window.open('http://www.keycomm.it/~laverda/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function iloc()
    {
    window.open('http://www.richtea.demon.co.uk/laverda/links.htm','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function wagner()
    {
    window.open('http://www.bbsw.de/wagner/','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function poerner()
    {
    window.open('http://www.actis.de/~wp/lav-info.html','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

    function motalia()
    {
    window.open('http://members.aol.com/kathosa/wework4u.htm','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }
    function peter()
    {
    window.open('http://www.la-ki.de/index.htm','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }
    function oct()
    {
    window.open('http://www.octeam.de','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }
    function lav_reg()
    {
    window.open('http://www.laverda-register.de','','toolbar=1,resizable=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,toolbars=1,width=600,height=300');
    }

// ----------------------------------------------------------------------------------------------------
// Countdown-Zähler mit Uhr und Datum
// ----------------------------------------------------------------------------------------------------

var timerID = null
  var timerRunning = false
  function MakeArray(size) 
  {
  this.length = size;
  for(var i = 1; i <= size; i++)
  {
  this[i] = "";
  }
  return this;
  }
  function stopclock (){
  if(timerRunning)
  clearTimeout(timerID);
  timerRunning = false
  }
  function showtime () {
  var now = new Date();
  var year = now.getYear();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var hours = now.getHours();
  var minutes = now.getMinutes();
  var seconds = now.getSeconds();
  var day = now.getDay();
  Day = new MakeArray(7);
  Day[0]="Sonntag";
  Day[1]="Montag";
  Day[2]="Dienstag";
  Day[3]="Mittwoch";
  Day[4]="Donnerstag";
  Day[5]="Freitag";
  Day[6]="Samstag";
  var timeValue = "";
  timeValue += (Day[day]) + "   ";
  timeValue += date + "-";
  timeValue += ((month < 10) ? " 0" : "") + month + "-";
  timeValue += year + "    ";
  //timeValue += ((month < 10) ? " 0" : " ") + month + "-"; us-version
  //timeValue += date + "-" + year + "    "; us-version
  timeValue += ((hours <= 12) ? hours : hours - 12);
  timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
  timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
  timeValue += (hours < 12) ? " AM" : " PM";
  document.jsfrm.face.value = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
  }
  function startclock () {
  stopclock();
  showtime()
  }
var eventdate = new Date("january 1, 2001");
function toSt(n) {
  s=""
  if(n<10) s+="0"
  return s+n.toString();
}
function countdown() {
  cl=document.clock;
  d=new Date();
  count=Math.floor((eventdate.getTime()-d.getTime())/1000);
  if(count<=0)
    {cl.days.value ="----";
     cl.hours.value="--";
     cl.mins.value="--";
     cl.secs.value="--";
     return;
   }
  cl.secs.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.mins.value=toSt(count%60);
  count=Math.floor(count/60);
  cl.hours.value=toSt(count%24);
  count=Math.floor(count/24);
  cl.days.value=count;    
  setTimeout("countdown()",1000);
}

// ----------------------------------------------------------------------------------------------------
// Blinkender Link
// ----------------------------------------------------------------------------------------------------

var blinkColTbl  = new Array();blinkColTbl[0] = "red";blinkColTbl[1] = "blue";var blinkTimeout = 500;var blinkIdx = 0;function blink () {    if ( document.all && document.all.blink ) {        blinkIdx = (blinkIdx+=1) % 2 ;        var color = blinkColTbl [ blinkIdx ];        if ( document.all.blink.length ) {            for(i=0;i<document.all.blink.length;i++)                document.all.blink[i].style.color=color;        } else            document.all.blink.style.color=color;        setTimeout( "blink();" , blinkTimeout);    }}
