//rechter Mouseclick unterbinden
function click(evt)
  {
  if (navigator.appName.indexOf("Microsoft") != -1)
    {
    if (event.button==2)
      {
      alert('Das Bild ist urheberrechtlich von der Ludwig Schneider AG geschützt');
      return false
      };
    };
  if (navigator.appName.indexOf("Netscape") != -1)
    {
    if ( evt.which == 3 )
      {
      alert('Das Bild ist urheberrechtlich von der Ludwig Schneider AG geschützt');
      return false
      };
    };
  };
  if (navigator.appName.indexOf("Netscape") != -1)
    {
    document.captureEvents( Event.MOUSEDOWN )
    };
document.onmousedown = click




//zentriertes Pop-Up öffnen; Hochformat; Größe fix
function openWindowCentered(theURL)
{
	var width="330";
	var height="480";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}


//zentriertes Pop-Up öffnen; Material
function openMatWindowCentered(theURL)
{
	var width="490";
	var height="410";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}

function openTisWindowCentered(theURL)
{
	var width="490";
	var height="410";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=yes,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}

//zentriertes Pop-Up öffnen; Küchen Hochformat
function openKhWindowCentered(theURL)
{
	var width="374";
	var height="570";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}

//zentriertes Pop-Up öffnen; Küchen Quer
function openKqWindowCentered(theURL)
{
	var width="481";
	var height="435";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}
//zentriertes Pop-Up öffnen; Querformat; Größe fix
function openQuerWindowCentered(theURL)
{
	
	var width="440";
	var height="370";
	var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}


//zentriertes Pop-Up öffnen; Größe variabel
function openOwnWindowCentered(theURL,width,height)
{

	theURL = encodeURI(theURL);
	theURL = decodeURI(theURL);
	
    var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=no,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}


//zentriertes Pop-Up öffnen; Größe variabel, nicht anpassbar
function openOwnWindowCenteredFix(theURL,width,height)
{
	
    var args = "toolbar=no,"
		    + "location=no,"
		    + "status=no,"
		    + "menubar=no,"
		    + "scrollbars=no,"
		    + "resizable=yes,"			
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=" + (window.screen.width - width ) / 2  + ","  // NN Only
		    + "screeny=" + (window.screen.height - height) / 2  + ","  // NN Only
		    + "left=" + (window.screen.width - width ) / 2  + ","     // IE Only
		    + "top=" + (window.screen.height - height) / 2;           // IE Only

	var wnd = window.open(theURL,"newWin","width=" + width + ",height=" + height + "," + args);
	wnd.focus;
}


//variables Pop-Up öffnen
function openOwnWindow(theURL,winName,features) { //v2.0

    var args =  features + ","
		    + "location=0,"
		    + "menubar=0,"
		    + "scrollbars=no,"
		    + "resizable=no,"
		    + "status=0,"
		    + "titlebar=0,"
		    + "hotkeys=0,"

		    + "screenx=10,"  // NN Only
		    + "screeny=10,"  // NN Only
		    + "left=10,"     // IE Only
		    + "top=10";      // IE Only


  window.open(theURL,winName,args);
}



//Formular: Überprüfung Formulardaten
function chkFormular()
{
 if(document.Formular.Name.value == "")  {
   alert("Bitte geben Sie Ihren Namen ein!");
   document.Formular.Name.focus();
   return false;
   }
 if(document.Formular.Strasse.value == "")  {
   alert("Bitte geben Sie Ihre Straße ein!");
   document.Formular.Strasse.focus();
   return false;
   }
 if(document.Formular.Ort.value == "")  {
   alert("Bitte geben Sie Ihre Adresse ein!");
   document.Formular.Ort.focus();
   return false;
   } 
 if (document.Formular.Email.value == "")	{
    alert("Bitte geben Sie Ihre Email-Adresse ein!");
    document.Formular.Email.focus();
    return (false);
  }
 if(document.Formular.Email.value.indexOf('@') == -1)	{
       alert("Bitte korrigieren Sie Ihre Email-Adresse!");
       document.Formular.Email.focus();
       return (false);
  } 
 if(document.Formular.Anfrage.value == "") {
   alert("Bitte geben Sie Ihre Anfrage ein!");
   document.Formular.Anfrage.focus();
   return false;
   }
}

//Formular: Überprüfung Email
function chkEmailormular()
{
 if (document.Formular.Email.value == "")	{
    alert("Bitte geben Sie Ihre Email-Adresse ein!");
    document.Formular.Email.focus();
    return (false);
  }
 if(document.Formular.Email.value.indexOf('@') == -1)	{
       alert("Bitte korrigieren Sie Ihre Email-Adresse!");
       document.Formular.Email.focus();
       return (false);
  } 
}


//Formular: laden Bestätigungsschreiben
function laden(theURL) {
location.href=theURL;
}




//Navigation
function hideSub( ) {
if (!document.getElementsByTagName)
return;
var mnu = document.getElementById("menu");
var toplis = mnu.getElementsByTagName("li"); 
for (it = 0; it < toplis.length; it++) { 
/* each top li */
var sublis = toplis[it].getElementsByTagName("li");

for (is = 0; is < sublis.length; is++) 
{ /* each sub li */

if (sublis[is].style)
if (toplis[it].className == 'show')
sublis[is].style.display = 'block';

else

sublis[is].style.display = 'none';
}
}
}
function mShow(Me)
			{

if (!Me.getElementsByTagName)
return;
var mylis = Me.getElementsByTagName("li");
if (!mylis)
return;
for (j = 0; j < mylis.length; j++) {

if (mylis[j].style.display == 'block')
mylis[j].style.display = 'none';

else

mylis[j].style.display = 'block';
}
}
