// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function OpenNewWindow(Picture,Breit,Hoch) // Script HTML in XHTML am 2.04.2006 optimiert, H. Kielblock
{
xsize = Breit+60;  //  Zusatz fuer Rand rechts und links
ysize = Hoch+175;  //  Zusatz fuer Rand oben und unten - damit Button angezeigt werden kann 

ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/2)-(xsize/2);
ypos = (ScreenHeight/2)-(ysize/2);

NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
NewWindow.document.write ("<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>");
NewWindow.document.write ("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='de' lang='de'><head>");
NewWindow.document.write ("<title>BILDANZEIGE</title></head>");
NewWindow.document.write ("<body style='background-color: #ffffcc' onload='focus()'>");
NewWindow.document.write ("<table width='100%' border='0'><tr>");
NewWindow.document.write ("<td align='center' valign='top'>");
NewWindow.document.write ("<table border='0' style='background-color: #ffffcc;' cellpadding='0' cellspacing='1'><tr><td align='center'>");
NewWindow.document.write ("<img src='");
NewWindow.document.write (Picture);
NewWindow.document.write ("' alt=' ' style='border: none 0px;' />");
NewWindow.document.write ("</td></tr><tr>");
NewWindow.document.write ("<td align='center' valign='bottom'>");
NewWindow.document.write ("<br /><form action='#'><p><input type='button' value='FENSTER SCHLIESSEN' style='font-family: verdana; font-size: 10px; color: #006600; font-weight: bold;' onclick='self.close()'></p>");
NewWindow.document.write ("</form></td></tr></table>");
NewWindow.document.write ("</td></tr></table>");
NewWindow.document.write ("</body></html>");
NewWindow.document.close();
NewWindow.resizeTo(xsize,ysize); 
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}

function fensteraufHK(adresse)
{
info=window.open(adresse,"Info","left=450,top=20,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=600,height=555")
return true;
}

function fensterzuHK()
{
info.close()
return true;
}

// Taschenrechner
function Check (Eingabe) {
  var nur_das = "0123456789[]()-+*%/.";
  for (var i = 0; i < Eingabe.length; i++)
    if (nur_das.indexOf(Eingabe.charAt(i)) < 0)
      return false;
  return true;
}

function Ergebnis () {
  var x = 0;
  if (Check(window.document.Rechner.Display.value))
    x = eval(window.document.Rechner.Display.value);
  window.document.Rechner.Display.value = x;
}

function Hinzufuegen (Zeichen) {
  window.document.Rechner.Display.value = window.document.Rechner.Display.value + Zeichen;
}

function Sonderfunktion (Funktion) {
  if (Check(window.document.Rechner.Display.value)) {
    if (Funktion == "sqrt") {
      var x = 0;
      x = eval(window.document.Rechner.Display.value);
      window.document.Rechner.Display.value = Math.sqrt(x);
    }
    if (Funktion == "pow") {
      var x = 0;
      x = eval(window.document.Rechner.Display.value);
      window.document.Rechner.Display.value = x * x;
    }
    if (Funktion == "log") {
      var x = 0;
      x = eval(window.document.Rechner.Display.value);
      window.document.Rechner.Display.value = Math.log(x);
    }
  } else
    window.document.Rechner.Display.value = 0}
// ENDE Taschenrechner

// setzt Curser in erstes Feld fuer Gaestebuch

function startnname(){
	document.forms['meldung'].nname.focus();
}

function startemail(){
	document.forms['meldung'].email.focus();
}

function startfirma(){
	document.forms['meldung'].firma.focus();
}
// ENDE Gaestebuch

//  Drucker - Befehl
function printPage() { print(document); }
// Ende Druckbefehl


