/**************************************************
This JavaScript code uses techniques found at
The Dynamic Duo - http://www.dansteinman.com/dynduo/
**************************************************/
var ie4 = (document.all)? true:false;
var linie;
var kugel_0;
var kugel_1;
var kugel_2;
var kugel_3;
var sport;
var web;
var med;
var inhalt_0;
var inhalt_1;
var inhalt_2;
var inhalt_3;
var herzlich_0;
var linie_1;
var online_0;
var time = 0; 

function init() { 
      if(ie4) {
		linie = kurzelinie.style;
		kugel_0 = kugel0.style;
		kugel_1 = kugel1.style;
		kugel_2 = kugel2.style;
		kugel_3 = kugel3.style;
		sport = proSPORT.style;
          	web = proWEB.style;
      	med = proMED.style;
		inhalt_0 = inhalt0.style;
		inhalt_1 = inhalt1.style;
		inhalt_2 = inhalt2.style;
		inhalt_3 = inhalt3.style;
		herzlich_0 = herzlich.style;
		online_0 = online.style;
		linie_1 = langelinie.style;
     	}
	else if(document.layers){
		linie = document.kurzelinie;
		kugel_0 = document.kugel0;
		kugel_1 = document.kugel1;
		kugel_2 = document.kugel2;
		kugel_3 = document.kugel3;
		sport = document.proSPORT;
		web = document.proWEB;
		med = document.proMED;
		inhalt_0 = document.inhalt0;
		inhalt_1 = document.inhalt1;
		inhalt_2 = document.inhalt2;
		inhalt_3 = document.inhalt3;
		herzlich_0 = document.herzlich;
		online_0 = document.online;
		linie_1 = document.langelinie;
	}
	sport.xpos = parseInt(sport.left);
	web.xpos = parseInt(web.left);
      med.xpos = parseInt(med.left);
	animation();//die funktion animation wird gerufen
}
  
function ZeitAnzeigen() 
  { 
   var Wochentagname =   new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
   var Jetzt = new Date();
   var Tag = Jetzt.getDate();
   var Monat = Jetzt.getMonth() + 1;
   var Jahr = Jetzt.getFullYear();
   var Stunden = Jetzt.getHours();
   var Minuten = Jetzt.getMinutes();
   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 Datum = Vortag + Tag + Vormon + Monat  + "." + Jahr;
   var Uhrzeit = Vorstd + Stunden + Vormin + Minuten ;
   var Gesamt = "<span class='proDATUM'>| "+ Wochentagname[WoTag] + " | "+ Datum +  " | " + Uhrzeit + " |</span>";

 if(document.all)
     document.all.Uhr.innerHTML = Gesamt;
   else if(document.layers)
    {
     document.Uhr.document.open();
     Gesamt = '<span class="proDATUM")>' + Gesamt + '</span>';
     document.Uhr.document.write(Gesamt);
     document.Uhr.document.close();
    }

	setTimeout("ZeitAnzeigen()",60000);
}
function clipValues(obj,which) {
	if(document.layers) {
		if (which=="t") return obj.clip.top
		if (which=="r") return obj.clip.right
		if (which=="b") return obj.clip.bottom
		if (which=="l") return obj.clip.left
	}
	else if (ie4) {
		var clipv = obj.clip.split("rect(")[1].split(")")[0].split("px")
		if (which=="t") return Number(clipv[0])
		if (which=="r") return Number(clipv[1])
		if (which=="b") return Number(clipv[2])
		if (which=="l") return Number(clipv[3])
	}
}

function clipTo(obj,t,r,b,l) {
                if(document.layers) {
                        obj.clip.top = t
                        obj.clip.right = r
                        obj.clip.bottom = b
                        obj.clip.left = l
                }
                else if (ie4) obj.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)"
        }
function clipBy(obj,t,r,b,l) {
	if(document.layers) {
		obj.clip.top = clipValues(obj,'t') + t
		obj.clip.right = clipValues(obj,'r') + r
		obj.clip.bottom = clipValues(obj,'b') + b
		obj.clip.left = clipValues(obj,'l') + l
	}
	else if (ie4) obj.clip = "rect("+(this.clipValues(obj,'t')+t)+"px "+(this.clipValues(obj,'r')+r)+"px "+Number(this.clipValues(obj,'b')+b)+"px "+Number(this.clipValues(obj,'l')+l)+"px)"
}

function wipe1() {
	if (clipValues(inhalt_0,'b')<200) {
		clipBy(inhalt_0,0,0,2,0)
		setTimeout("wipe1()",70)
	}
}

function slide() {
        if(sport.xpos < 90) {
                sport.xpos += 7
		    web.xpos +=7
  		    med.xpos +=7
                sport.left = sport.xpos
		    web.left = web.xpos
		    med.left = med.xpos
		    time += 2; 		    
                setTimeout("slide()",time)
        }
}
function showObject(obj) {
	if(document.layers) obj.visibility = "show"
	else if (ie4) obj.visibility = "visible"
}

function hideObject(obj) {
	if(document.layers) obj.visibility = "hide"
	else if (ie4) obj.visibility = "hidden"
}
function animation(){
		ZeitAnzeigen(); //gib die aktuelle Zeit aus
		showObject(herzlich_0); //Herzlich willkommen...
		setTimeout("showObject(linie_1)",2000); //zeige die gelbe linie
		setTimeout("showObject(online_0)",2500); //zeige online
		setTimeout("wipe1()",3000); //zeige langsam den willkommenstext
		setTimeout("slide()",10000); //schiebe die items herein
}
function Go(x)
{
 if(x != "nix"){
   location.href = x;
 }
}
function OpeWin() {
 fenster = open("gast.asp","","height=400,width=360,left=200,top=200,screenX=200,screenY=200,scrollbars=yes");
}
function NeuLin() {
 fenster1 = open("neuerlink.htm","","height=360,width=310,left=200,top=200,screenX=200,screenY=200,scrollbars=yes");
}