var nnavigat = /.*Mozilla\/4.*\(Mac.*/;
var msie = /.*MSIE\ 4.*Mac.*/;
var linux = /.*Mozilla\/4.*\X11.*/;
var nn60 = /.*Gecko\/2001.*/;

var farbeprojekte= new Array('#bbc3cf','#a1acbe');
var farbegalerie= new Array('#bfbfbf','#a6a6a8');
var farbearchiv= new Array('#bccacb','#9fb6b6');
var farbeinfo= new Array('#cfc9c0','#b8b2aa');
var farbeaktuell= new Array('#bdc7ac','#b1ba97');
var farbekontakt= new Array('#d2c7b0','#d1b598');

if (location.href.indexOf("index.html") != -1)
{
  if(top.frames.length > 0) 
  {
    top.location.href=self.location;
  }
}
else
{
  if (self == top)
  {
    location.href="index.html"; 
  }
}

function neuesfenster(breite,hoehe)
{
  fenster=open("","fenster","toolbar=yes,scrollbars=no,location=no,menubar=no,width=" + breite + ",height=" + hoehe + "");
  fenster.focus();
}

function initialisieren()
{
  var bereich = document.all ? document.all.div2.style : document.getElementById ? document.getElementById("div2").style : document.layers ? document.div2 : null;
  bereich.visibility = "visible";
  var bereich = document.all ? document.all.div1.style : document.getElementById ? document.getElementById("div1").style : document.layers ? document.div1 : null;
  bereich.visibility = "visible";
  document.layers ? null : document.images[1].usemap = "#map2";
}

function punkte(version)
{
  var bereich = document.all ? document.all.div2.style : document.getElementById ? document.getElementById("div2").style : document.layers ? document.div2 : null;
  bereich.visibility = version == 0 ? "visible" : "hidden";
  bereich.display = version == 0 ? "block" : "none";
  document.layers ? null : document.images[1].usemap = version == 1 ? "#map1" : "#map2";
}

function beschreibung(j,k)
{
  pfad.images[j].src = k == 1 ? spiral[j].src : spiral[8].src;
}

function gedrueckt(j)
{
  if (document.getElementById) document.getElementById("submit").src = eval("bild" + j + ".src");
  else if (document.all) document.all.submit.src = eval("bild" + j + ".src");
}

function hintergrund(kontrast,regulaer) 
{
  if(top.frames[1].frames[1].frames[0].document.styleSheets) 
  {
    with (top.frames[1].frames[1].frames[0].document.styleSheets[0]) var regeln = document.all ? rules : document.getElementById ? cssRules : null;
    regeln[7].style.background = regulaer[0];
    regeln[8].style.background = kontrast[1];
    regeln[9].style.background = kontrast[1];
    regeln[10].style.background = kontrast[1];
    regeln[23].style.scrollbarBaseColor = kontrast[1];
    regeln[23].style.scrollbarDarkShadowColor = regeln[23].style.scrollbarBaseColor;
    top.document.title=top.frames[1].frames[1].frames[0].document.title;
  }
}

function farbe(kontrast,regulaer)
{
  if(top.frames[1].frames[1].frames[0].document.styleSheets) 
  {
    with (top.frames[1].frames[1].frames[0].document.styleSheets[0]) var regeln = document.all ? rules : document.getElementById ? cssRules : null;
    regeln[8].style.background = kontrast[1];
    regeln[9].style.background = kontrast[1];
    regeln[10].style.background = kontrast[1];
    regeln[17].style.background = kontrast[1];
    regeln[18].style.background = kontrast[1];
    /*regeln[19].style.background = kontrast[1];
    regeln[20].style.background = kontrast[1];
    regeln[21].style.background = kontrast[1];
    regeln[22].style.background = kontrast[1];*/
    regeln[23].style.background = kontrast[1];
    regeln[23].style.scrollbarBaseColor = kontrast[1];
    regeln[23].style.scrollbarDarkShadowColor = regeln[23].style.scrollbarBaseColor;
    regeln[24].style.background = kontrast[1];
    regeln[24].style.scrollbarBaseColor = kontrast[1];
  }
  if(top.frames[1].frames[1].frames[0].document) 
  {
    with (top.frames[1].frames[1].frames[0])
	{
	  document.getElementById("kopf").style.backgroundColor = kontrast[1];
      document.getElementById("kontrast").style.backgroundColor = kontrast[1];
	}
  }
}
 

function nhover(link,status)
{
  if (document.layers)
  {
    document.layers[link].visibility = status == 1 ? "show" : "hide";
  }
}

function macform()
{
  if (nnavigat.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/email/ke004de.html";
  if (msie.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/email/ke005de.html";
  if (linux.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/email/ke006de.html";
}

function macshop()
{
  if (nnavigat.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/shop/ks004de.html";
  if (msie.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/shop/ks005de.html";
  if (linux.exec(navigator.userAgent)) top.frames[1].frames[1].frames[0].location.href="/kontakt/shop/ks006de.html";
}

function formular_rand() 
{
  if(top.frames[1].frames[1].frames[0].document.styleSheets) 
  {
    with (top.frames[1].frames[1].frames[0].document.styleSheets[0]) var regeln = document.all ? rules : document.getElementById ? cssRules : null;
    regeln[18].style.borderWidth = "1px";
    /*regeln[19].style.borderWidth = "1px";
    regeln[20].style.borderWidth = "1px";
    regeln[21].style.borderWidth = "1px";
    regeln[22].style.borderWidth = "1px";*/
    regeln[23].style.borderWidth = "1px";
    regeln[24].style.borderWidth = "1px";
  }
}
