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); 
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 amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}


function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}


var delay=20;
var runflag=0;

function dostart(was)
{
    ucnt=was;
    if(runflag==0)
    {
        runflag=1;
    }
}


  function Go(x)
   {
    if(x == "nothing")
    {
      document.forms[0].reset();
      document.forms[0].elements[0].blur();
      return;
    }
    else if(x == "end") top.location.href = "home.htm";
    else
    {
      parent.frames[1].location.href = x;
      document.forms[0].reset();
      document.forms[0].elements[0].blur();
    }
  }


var timerID = null;
var timerRunning = false;

function stopclock() {  
        if(timerRunning)    
        clearTimeout(timerID);  
        timerRunning = false;
}

function startclock() {  
   	window.status=" ";   
        stopclock();  
        showtime();
}

function showtime () {
        var now = new Date();        
        var hours = now.getHours();        
        var minutes = now.getMinutes();        
        var seconds = now.getSeconds()        
        var timeValue = "" + (hours)        
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes        
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds        
        timerID = setTimeout("showtime()",1000);        
        timerRunning = true;
}


// Called by both onLoad in BODY tag, and Resume button.
function startstatusclock () 
   {
   // Make sure the clock is stopped
   stopclock();
   time();
   }

function time ()
   {
   var now = new Date();
   var yr = now.getYear();
   var mName = now.getMonth() + 1;
   var dName = now.getDay() + 1;
   var dayNr = now.getDate();
   var hours = now.getHours();
   var minutes = ((now.getMinutes() < 10) ? ":0" : ":") + now.getMinutes();
   var seconds = ((now.getSeconds() < 10) ? ":0" : ":") + now.getSeconds();

   if(dName==1) Day = "Sonntag";
   if(dName==2) Day = "Montag";
   if(dName==3) Day = "Dienstag";
   if(dName==4) Day = "Mittwoch";
   if(dName==5) Day = "Donnerstag";
   if(dName==6) Day = "Freitag";
   if(dName==7) Day = "Samstag";

   if(mName==1) Month="Januar";
   if(mName==2) Month="Februar";
   if(mName==3) Month="März";
   if(mName==4) Month="April";
   if(mName==5) Month="Mai";
   if(mName==6) Month="Juni";
   if(mName==7) Month="Juli";
   if(mName==8) Month="August";
   if(mName==9) Month="September";
   if(mName==10) Month="Oktober";
   if(mName==11) Month="November";
   if(mName==12) Month="Dezember";

   // String to display current date.
   var DayDateTime=(" "
       + Day
       + "   "
       + dayNr
       + ". "
       + Month
       + " "
       + " "
       + yr
       + "   "
       + hours
       + minutes
       + seconds
        );

   // Displays Day-Date-Time on the staus bar.
   window.status=DayDateTime;
   timerID = setTimeout("time()",1000);
   timerRunning = true;
   }

// Stops clock and clears status bar.
function clearStatus()
   {
   if(timerRunning)
      clearTimeout(timerID);
   timerRunning = false;
   window.status=" ";   
   }



//Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}


/* Deklaration aller Grafiken */
Normal1 = new Image(); 
Normal1.src = "grafik/bw_Allgemeine.jpg"; 
Highlight1 = new Image(); 
Highlight1.src = "grafik/Allgemeine.jpg"; 

Normal2 = new Image(); 
Normal2.src = "grafik/bw_galerie.jpg"; 
Highlight2 = new Image(); 
Highlight2.src = "grafik/galerie.jpg"; 

Normal3 = new Image(); 
Normal3.src = "grafik/bw_rundschau.jpg"; 
Highlight3 = new Image(); 
Highlight3.src = "grafik/rundschau.jpg"; 

Normal4 = new Image(); 
Normal4.src = "grafik/bw_ffh.jpg"; 
Highlight4 = new Image(); 
Highlight4.src = "grafik/ffh.jpg"; 

Normal5 = new Image(); 
Normal5.src = "grafik/bw_skyline.jpg"; 
Highlight5 = new Image(); 
Highlight5.src = "grafik/skyline.jpg"; 

Normal6 = new Image(); 
Normal6.src = "grafik/bw_ottoshop.jpg"; 
Highlight6 = new Image(); 
Highlight6.src = "grafik/ottoshop.jpg"; 

Normal7 = new Image(); 
Normal7.src = "grafik/bw_airport.jpg"; 
Highlight7 = new Image(); 
Highlight7.src = "grafik/airport.jpg"; 

Normal8 = new Image(); 
Normal8.src = "grafik/bw_messe.jpg"; 
Highlight8 = new Image(); 
Highlight8.src = "grafik/messe.jpg"; 

Normal9 = new Image(); 
Normal9.src = "grafik/bw_vgf.jpg"; 
Highlight9 = new Image(); 
Highlight9.src = "grafik/vgf.jpg"; 

Normal10 = new Image(); 
Normal10.src = "grafik/bw_oper.jpg"; 
Highlight10 = new Image(); 
Highlight10.src = "grafik/oper.jpg"; 

Normal11 = new Image(); 
Normal11.src = "grafik/bw_Eintracht.jpg"; 
Highlight11 = new Image(); 
Highlight11.src = "grafik/Eintracht.jpg"; 
  
function Bildwechsel(Bildnr,Bildobjekt)
  {
   window.document.images[Bildnr].src = Bildobjekt.src;
  }









