function chkFormular () {
  if (document.Anfrage.txt_name.value == "") {
    alert("Bitte geben Sie Ihren Namen ein!");
    document.Anfrage.txt_name.focus();
    return false;
  }
  if (document.Anfrage.txt_email.value == "") {
    alert("Bitte geben Sie Ihre Emailadresse ein!");
    document.Anfrage.txt_email.focus();
    return false;
  }
  if (document.Anfrage.txt_email.value.indexOf("@") == -1) {
    alert("Bitte geben Sie eine korrekte Emailadresse ein!");
    document.Anfrage.txt_email.focus();
    return false;
  }
}

function preloadImages() {
   if (document.images) {
      for (var i = 0; i < preloadImages.arguments.length; i++) {
         (new Image()).src = preloadImages.arguments[i];
      }
   }
}

function bildgross(Bild,Breit,Hoch,Titel)
{
	xsize = Breit+35;// Zusatz für Rand rechts und links
	ysize = Hoch+85; //Zusatz für Rand oben und unten - damit Button angezeit werden kann 
		
	ScreenWidth = screen.width;
	ScreenHeight = screen.height;
	
	xpos = (ScreenWidth/2)-(xsize/2);
	ypos = (ScreenHeight/2)-(ysize/2);

	NewWindow=window.open("","Bild","height="+ysize+",width="+xsize+",scrollbars=no,status=no,resizable=no,top="+ypos+",left="+xpos+"");
	NewWindow.document.write ("<html><head><title>"+Titel+"</title>");
	NewWindow.document.write ("<link href='style/hirschmann.css' rel='stylesheet' type='text/css'>");
    NewWindow.document.write ("</head><body onload='focus();' class='popup'>");
	NewWindow.document.write ("<img src="+Bild+" onClick='javascript:window.close();' style='cursor:pointer;'>");
	NewWindow.document.write ("</body></html>");
	NewWindow.document.close();
    NewWindow.resizeTo(xsize,ysize);
}

/*
 * Toggles the background-color of an dom-element
 */
function
toggleBGColor(field)
{	
	if(field.style.backgroundColor == "#ffffcc") {
		field.style.backgroundColor = "#ffffff";
	} else {
		field.style.backgroundColor = "#ffffcc";
	}
}

