// PRINT SCRIPT
var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
        if (document.getElementById != null)
        {
                var html = '<HTML>\n<HEAD><script LANGUAGE="JavaScript">setTimeout("self.close();", 7000);</script>\n';

                if (document.getElementsByTagName != null)
                {
                        var headTags = document.getElementsByTagName("head");
                        if (headTags.length > 0)
                                html += headTags[0].innerHTML;
                }

                html += '\n</HE' + 'AD>\n<BODY>\n';

                var printReadyElem = document.getElementById("printReady");

                if (printReadyElem != null)
                {
                                html += printReadyElem.innerHTML;
                }
                else
                {
                        alert("Keine Print ID gefunden.");
                        return;
                }

                html += '\n</BO' + 'DY>\n</HT' + 'ML>';

                var printWin = window.open("","printSpecial","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=550,height=400,screenX=+w2+,screenY=+h2+,left=+w2+,top=+h2;");
                printWin.document.open();
                printWin.document.write(html);
                printWin.document.close();
                if (gAutoPrint)
                        printWin.print();
        }
        else
        {
                alert("Dieses Script funktioniert nur in Browsern der neueren Generation.");
        }
}




// POPUP

w = parseInt(screen.width);
h = parseInt(screen.height);
w2 = (w-500)/2;
h2 = (h-400)/2;
theOpts="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=400,screenX="+w2+",screenY="+h2+",left="+w2+",top="+h2;
function open_window(url) {
mywin = window.open(url,"win",theOpts);
}




// ROLLOVER

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_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// FORM CHECK


function ResetCheck()
{
pruef=window.confirm("Sind Sie sicher, dass Sie die Eingaben verwerfen wollen?");
return pruef;
}

function chkFormular()
{
 if(document.Formular.name04.value == "")
  {
   alert("Bitte geben Sie Ihren Namen ein!");
   document.Formular.name04.focus();
   return false;
  }
 if(document.Formular.vname05.value == "")
  {
   alert("Bitte geben Sie Ihren Vornamen an!");
   document.Formular.vname05.focus();
   return false;
  }
if(document.Formular.s06.value == "")
  {
   alert("Bitte geben Sie die Straße an!");
   document.Formular.s06.focus();
   return false;
}
if(document.Formular.p07.value.length <=  4 )
 {
 alert("Bitte geben Sie die Postleitzahl korrekt an!");
 document.Formular.p07.focus();
 return false;
}
 if(document.Formular.o08.value == "")
  {
   alert("Bitte geben Sie den Wohnort an!");
   document.Formular.o08.focus();
   return false;
  }

 if(document.Formular.e09.value == "")
  {
   alert("Bitte geben Sie Ihre Telefonnummer ein!");
   document.Formular.e09.focus();
   return false;
  }

}
