var breite,hoehe;
function bildhoehe(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 180;
    document.getElementById("main").style.height = divheight+"px";
}

function bildhoehe1(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-kontakt").style.height = divheight+"px";
}

function bildhoehe2(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-agb").style.height = divheight+"px";
}

function bildhoehe3(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-inh").style.height = divheight+"px";
}

function bildhoehe4(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-veranst").style.height = divheight+"px";
}

function bildhoehe5(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-home").style.height = divheight+"px";
}

function bildhoehe6(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-admin").style.height = divheight-25+"px";
}

function bildhoehe7(){
    if (self.innerHeight) // all except Explorer
    {
    hoehe = self.innerHeight;
    }
    else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
      {
      hoehe = document.documentElement.clientHeight;
      }
      else if (document.body) // other Explorers
	{
	hoehe = document.body.clientHeight;
	}
    if (hoehe <= 635) {hoehe = 635}
    divheight = hoehe - 185;
    document.getElementById("main-ueberuns").style.height = divheight+"px";
}

function bildbreite1(){
    if (self.innerWidth) // all except Explorer
    {
    breite = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode
      {
      breite = document.documentElement.clientWidth - 30;
      }
      else if (document.body) // other Explorers
	{
	breite = document.body.clientWidth;
	}
    if (breite <= 760) {breite =760}
    mar = breite-Math.ceil(breite / 5);
    mar3 = Math.ceil((Math.floor(mar/100)/3)*2)*100;
    document.getElementById("head").style.width = mar+"px";
    document.getElementById("head-left").style.width = mar3+"px";
    document.getElementById("navigation").style.width = mar+"px";
}

function bildbreite11(){
    if (self.innerWidth) // all except Explorer
    {
    breite = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode
      {
      breite = document.documentElement.clientWidth - 30;
      }
      else if (document.body) // other Explorers
	{
	breite = document.body.clientWidth;
	}
    if (breite <= 760) {breite =760}
    mar = breite-Math.ceil(breite / 5);
    mar2 = Math.floor(Math.floor(mar/100)/3)*100;
    document.getElementById("head-right").style.width = mar2+"px";
}

function bildbreite12(){
    if (self.innerWidth) // all except Explorer
    {
    breite = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode
      {
      breite = document.documentElement.clientWidth - 30;
      }
      else if (document.body) // other Explorers
	{
	breite = document.body.clientWidth;
	}
    if (breite <= 760) {breite =760}
    mar = breite-Math.ceil(breite / 5);
    mar2 = Math.floor(Math.floor(mar/100)/3)*100;
    document.getElementById("head-menu a").style.width = mar2+"px";
}

function bildbreite2(){
    if (self.innerWidth) // all except Explorer
    {
    breite = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode
      {
      breite = document.documentElement.clientWidth - 30;
      }
      else if (document.body) // other Explorers
	{
	breite = document.body.clientWidth;
	}
    if (breite <= 760) {breite =760}
    mar = breite-Math.ceil(breite / 5);
    mar2 = Math.floor(Math.floor(mar/100)/3)*100;
    mar3 = Math.ceil((Math.floor(mar/100)/3)*2)*100;
    document.getElementById("main").style.width = mar-2+"px";
}

function bildbreite3(){
    if (self.innerWidth) // all except Explorer
    {
    breite = self.innerWidth;
    }
    else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode
      {
      breite = document.documentElement.clientWidth - 30;
      }
      else if (document.body) // other Explorers
	{
	breite = document.body.clientWidth;
	}
    if (breite <= 760) {breite =760}
    mar = breite-Math.ceil(breite / 5);
    mar2 = Math.floor(Math.floor(mar/100)/3)*100;
    mar3 = Math.ceil((Math.floor(mar/100)/3)*2)*100;
    document.getElementById("foot").style.width = mar+"px";
}


var rotate_delay = 5000;
   current = 0;

function next() {
if (document.screenform.slide[current+1]) {
document.images.bild.src = document.screenform.slide[current+1].value;
document.screenform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.bild.src = document.screenform.slide[current-1].value;
document.screenform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.bild.src = document.screenform.slide[0].value;
document.screenform.slide.selectedIndex = 0;
}
function last() {
current = document.screenform.slide.length-1;
document.images.bild.src = document.screenform.slide[current].value;
document.screenform.slide.selectedIndex = current;
}
function ap(text) {
document.screenform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.screenform.slide.selectedIndex;
document.images.bild.src = document.screenform.slide[current].value;
}
function rotate() {
if (document.screenform.slidebutton.value == "Stop") {
current = (current == document.screenform.slide.length-1) ? 0 : current+1;
document.images.bild.src = document.screenform.slide[current].value;
document.screenform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}
