//
// JavaScript der Homepage http://www.mrc-schifferstadt.de
// Autor: Holger Strunk (http://www.strunkdesign.de)
//

// neuere jQuery-Funktionen am Ende des Skripts!

//
// Frameset überprüfen und ggf. mit richtiger Inhaltsseite nachladen
function FramesetPruefen() {
  // Prüfen, ob sich die aktuelle Seite in einem Frameset befindet 
  if (parent.frames.length == 0) {
    var inhaltsframe = top.location.href;
    top.location.href = "http://www.mrc-schifferstadt.de/phpindex.php?inhaltsframe="+inhaltsframe+""; 
  }
  else {
  // Prüfen, ob auch das richtige Frameset angezeigt wird
    if (top.frames[0].name == "rand-links") {
      // nix
    }
    else {
      top.location.href = "http://www.mrc-schifferstadt.de/phpindex.php?inhaltsframe="+inhaltsframe+""; 
    }
  }
return;
}


// ----------------
// Buttonnavigation
// ----------------

var buttonStatus1 = 0;
var buttonStatus2 = 0;
var buttonStatus3 = 0;
var buttonStatus4 = 0;
var buttonStatus5 = 0;
var buttonStatus6 = 0;
var buttonStatus7 = 0;
var buttonStatus8 = 0;
var buttonStatus9 = 0;
var buttonStatus10 = 0;

function MouseStatusRuecksetzen() {
  buttonStatus1 = 0;
  buttonStatus2 = 0;
  buttonStatus3 = 0;
  buttonStatus4 = 0;
  buttonStatus5 = 0;
  buttonStatus6 = 0;
  buttonStatus7 = 0;
  buttonStatus8 = 0;
  buttonStatus9 = 0;
  buttonStatus10 = 0;
}

function MouseOver(n) {
  document.getElementById('button'+n).style.backgroundColor = '#a40909';
}

function MouseOut(n) {
  if (buttonStatus1 == 0) document.getElementById('button1').style.backgroundColor = '#690606';
  if (buttonStatus2 == 0) document.getElementById('button2').style.backgroundColor = '#690606';
  if (buttonStatus3 == 0) document.getElementById('button3').style.backgroundColor = '#690606';
  if (buttonStatus4 == 0) document.getElementById('button4').style.backgroundColor = '#690606';
  if (buttonStatus5 == 0) document.getElementById('button5').style.backgroundColor = '#690606';
  if (buttonStatus6 == 0) document.getElementById('button6').style.backgroundColor = '#690606';
  if (buttonStatus7 == 0) document.getElementById('button7').style.backgroundColor = '#690606';
  if (buttonStatus8 == 0) document.getElementById('button8').style.backgroundColor = '#690606';
  if (buttonStatus9 == 0) document.getElementById('button9').style.backgroundColor = '#690606';
  if (buttonStatus10 == 0) document.getElementById('button10').style.backgroundColor = '#690606';
}

function MouseClick(n) {
  MouseStatusRuecksetzen();
  if (n == 1) buttonStatus1 = 1;
  if (n == 2) buttonStatus2 = 1;
  if (n == 3) buttonStatus3 = 1;
  if (n == 4) buttonStatus4 = 1;
  if (n == 5) buttonStatus5 = 1;
  if (n == 6) buttonStatus6 = 1;
  if (n == 7) buttonStatus7 = 1;
  if (n == 8) buttonStatus8 = 1;
  if (n == 9) buttonStatus9 = 1;
  if (n == 10) buttonStatus10 = 1;
  if (buttonStatus1 == 0) document.getElementById('button1').style.backgroundColor = '#690606';
  if (buttonStatus2 == 0) document.getElementById('button2').style.backgroundColor = '#690606';
  if (buttonStatus3 == 0) document.getElementById('button3').style.backgroundColor = '#690606';
  if (buttonStatus4 == 0) document.getElementById('button4').style.backgroundColor = '#690606';
  if (buttonStatus5 == 0) document.getElementById('button5').style.backgroundColor = '#690606';
  if (buttonStatus6 == 0) document.getElementById('button6').style.backgroundColor = '#690606';
  if (buttonStatus7 == 0) document.getElementById('button7').style.backgroundColor = '#690606';
  if (buttonStatus8 == 0) document.getElementById('button8').style.backgroundColor = '#690606';
  if (buttonStatus9 == 0) document.getElementById('button9').style.backgroundColor = '#690606';
  if (buttonStatus10 == 0) document.getElementById('button10').style.backgroundColor = '#690606';
}

function Bearbeitung() {
  var bearbeitungsseite = top.frames[3].location.href;
  top.frames[3].location.href="../../inhalt/bearbeitung.php?bearbeitungsseite= "+bearbeitungsseite+"";
}

// $(document).ready(function(){
//   FramesetPruefen();
// });
