/* DHTML-Bibliothek */

var DHTML = false, DOM = false, MSIE4 = false, NS4 = false, OP = false;

if (document.getElementById) {
  DHTML = true;
  DOM = true;
} else {
  if (document.all) {
    DHTML = true;
    MSIE4 = true;
  } else {
    if (document.layers) {
      DHTML = true;
      NS4 = true;
    }
  }
}
if (window.opera) {
  OP = true;
}

function getElement (Mode, Identifier, ElementNumber) {
  var Element;
  if (DOM) {
    if (Mode.toLowerCase() == "id") {
      if (typeof document.getElementById(Identifier) == "object") {
        Element = document.getElementById(Identifier);
      } else {
        Element = false;
      }
      return Element;
    }
    if (Mode.toLowerCase() == "name") {
      var ElementList = document.getElementsByName(Identifier);
      if (typeof ElementList == "object" || (OP && typeof ElementList == "function")) {
        Element = ElementList[ElementNumber];
      } else {
        Element = false;
      }
      return Element;
    }
    if (Mode.toLowerCase() == "tagname") {
      var ElementList = document.getElementsByTagName(Identifier);
      if (typeof ElementList == "object" || (OP && typeof ElementList == "function")) {
        Element = ElementList[ElementNumber];
      } else {
        Element = false;
      }
      return Element;
    }
    return null;
  }
  if (MSIE4) {
    if (Mode.toLowerCase() == "id") {
      if (typeof document.all[Identifier] == "object") {
        Element = document.all[Identifier];
      } else {
        Element = false;
      }
      return Element;
    }
    if (Mode.toLowerCase() == "tagname") {
      if (typeof document.all.tags(Identifier) == "object") {
        Element = document.all.tags(Identifier)[ElementNumber];
      } else {
        Element = false;
      }
      return Element;
    }
    if (Mode.toLowerCase() == "name") {
      if (typeof document[Identifier] == "object") {
        Element = document[Identifier];
      } else {
        Element = false;
      }
      return Element;
    }
    return false;
  }
  if (NS4) {
    if (Mode.toLowerCase() == "id" || Mode.toLowerCase() == "name") {
      if (typeof document[Identifier] == "object") {
        Element = document[Identifier];
      } else {
        Element = false;
      }
      return Element;
    }
    if (Mode.toLowerCase() == "index") {
      if (typeof document.layers[Identifier] == "object") {
        Element = document.layers[Identifier];
      } else {
        Element = false;
      }
      return Element;
    }
    return false;
  }
  return false;
}

function getContent (Mode, Identifier, ElementNumber) {
  var Content;
  var Element = getElement(Mode, Identifier, ElementNumber);
  if (!Element) {
    return false;
  }
  if (DOM && Element.firstChild) {
    if (Element.firstChild.nodeType == 3) {
      Content = Element.firstChild.nodeValue;
    } else {
      Content = "";
    }
    return Content;
  }
  if (MSIE4) {
    Content = Element.innerText;
    return Content;
  }
  return false;
}

function getAttribute (Mode, Identifier, ElementNumber, AttributeName) {
  var Attribute;
  var Element = getElement(Mode, Identifier, ElementNumber);
  if (!Element) {
    return false;
  }
  if (DOM || MSIE4) {
    Attribute = Element.getAttribute(AttributeName);
    return Attribute;
  }
  if (NS4) {
    if (typeof Element[ElementNumber] == "object") {
      Attribute = Element[ElementNumber][AttributeName];
    } else {
      Attribute = Element[AttributeName]
    }
    return Attribute;
  }
  return false;
}

function setContent (Mode, Identifier, ElementNumber, Text) {
  var Element = getElement(Mode, Identifier, ElementNumber);
  if (!Element) {
    return false;
  }
  if (DOM && Element.firstChild) {
    Element.firstChild.nodeValue = Text;
    return true;
  }
  if (MSIE4) {
    Element.innerText = Text;
    return true;
  }
  if (NS4) {
    Element.document.open();
    Element.document.write(Text);
    Element.document.close();
    return true;
  } 
}

/* Ende DHTML-Bibliothek --------------------------------------------------  */

// SHOP - Impressum START

shWin="";
popupWin="";

function shStart()
{
shWin = window.open('shop/index.htm','popupA','width=775,height=500,toolbar=no,directories=no,menubar=no,scrollbars=yes,scrolling=yes,status=no,location=no,resizable=no,left=0,top=0');shWin.focus();
if(shWin){shWin.focus();}
}

function imPr()
{
popupWin = window.open('impressum.htm','popup2','width=220,height=200,toolbar=no,directories=no,menubar=no,scrollbars=no,scrolling=no,status=no,location=no,resizable=no,left=0,top=0');popupWin.focus();
if(popupWin){popupWin.focus();}}


function clearWinAll()
{
if(popupWin) popupWin.close();
if(shWin) shWin.close();
}


function shStartHey()
{
shWin = window.open('../shop/index.htm','popupA','width=775,height=500,toolbar=no,directories=no,menubar=no,scrollbars=yes,scrolling=yes,status=no,location=no,resizable=no,left=0,top=0');shWin.focus();
if(shWin){shWin.focus();}
}

// end shopstart

function nofram()
{
   if(top.frames.length > 0)
    top.location.href=self.location;
}


function fram()

{
   if(top.frames.length < 1)
    document.location.href="sound.htm";
}


function frams()

{
   if(top.frames.length < 1)
    document.location.href="xtra.htm";
}




function change(id, newSrc) {
    var theImage = FWFindImage(document, id, 0);
    if (theImage) {
        theImage.src = newSrc;
    }
}

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}

function melden()
{
document.Form2Mail.submit();
}


function chkFormular2()
  {
     if(document.Form2Mail.date.value == "")
    {
     alert("Bitte ein Datum eingeben!");
     document.Form2Mail.date.focus();
    }
else if(document.Form2Mail.anz.value == "")
    {
     alert("Bitte die Anzahl der Personen eingeben!");
     document.Form2Mail.anz.focus();
    }
else if(document.Form2Mail.name.value == "")
    {
     alert("Bitte Ihren Namen eingeben!");
     document.Form2Mail.name.focus();
    }
else if(document.Form2Mail.mail.value == "")
    {
     alert("Bitte Ihre E-Mail-Adresse eingeben!");
     document.Form2Mail.mail.focus();
    }
else if(document.Form2Mail.mail.value.indexOf('@') == -1)
    {
     alert("Keine gültige E-Mail-Adresse!");
     document.Form2Mail.mail.focus();
    }
else { if (confirm("<<< FORMULAR WIRD ABGESCHICKT! >>>"))
	{ melden();}
        else { return(false); } }
  }


